webiny-local-development
Deploying, developing locally, managing environments, and debugging Webiny projects. Use this skill when the developer asks about deployment commands (deploy, destroy, info), local development with watch mode (API or Admin), the Local Lambda Development system, environment management (long-lived vs short-lived, production vs dev modes), build parameters, state files, debugging API/Admin/Infrastructure errors, or the redeploy-after-watch requirement.
Best use case
webiny-local-development is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Deploying, developing locally, managing environments, and debugging Webiny projects. Use this skill when the developer asks about deployment commands (deploy, destroy, info), local development with watch mode (API or Admin), the Local Lambda Development system, environment management (long-lived vs short-lived, production vs dev modes), build parameters, state files, debugging API/Admin/Infrastructure errors, or the redeploy-after-watch requirement.
Teams using webiny-local-development should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/local-development/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How webiny-local-development Compares
| Feature / Agent | webiny-local-development | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Deploying, developing locally, managing environments, and debugging Webiny projects. Use this skill when the developer asks about deployment commands (deploy, destroy, info), local development with watch mode (API or Admin), the Local Lambda Development system, environment management (long-lived vs short-lived, production vs dev modes), build parameters, state files, debugging API/Admin/Infrastructure errors, or the redeploy-after-watch requirement.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
SKILL.md Source
# Local Development and Deployment
## TL;DR
Webiny is a serverless platform on AWS. Deploy with `yarn webiny deploy`, develop locally with `yarn webiny watch` (API uses Local Lambda Development, Admin runs a local React dev server). Projects support multiple environments (long-lived and short-lived). Always redeploy after stopping watch mode.
## Deployment
### Initial Deployment
Deploy all three applications (Core, API, Admin) at once:
```bash
yarn webiny deploy
```
This deploys to the `dev` environment by default. First deployment takes 5-15 minutes.
### Deploying Individual Applications
```bash
yarn webiny deploy core # Infrastructure only
yarn webiny deploy api # Backend API only
yarn webiny deploy admin # Admin frontend only
```
### Deploy to a Specific Environment
```bash
yarn webiny deploy --env prod
yarn webiny deploy api --env staging
```
### Get Deployment Info
```bash
yarn webiny info # Shows all URLs (Admin, API, CloudFront)
yarn webiny info --env prod # Info for a specific environment
```
## Local Development
Before developing locally, you must deploy Core and API first:
```bash
yarn webiny deploy core api
```
### Admin Development
```bash
yarn webiny watch admin
```
- Starts a local dev server at `http://localhost:3001`
- Hot module replacement for instant feedback
- Standard React development experience
- Use for: custom Admin UI extensions, white-label branding, custom views
### API Development (Local Lambda Development)
```bash
yarn webiny watch api
```
How it works:
1. **Lambda stubs deployed** -- real Lambda functions are replaced with stubs that forward events
2. **Events forwarded** -- requests to AWS get forwarded to your local machine
3. **Local execution** -- your code runs locally with full AWS Lambda environment
4. **Response routing** -- responses sent back through the Lambda stub
Benefits:
- See backend code changes instantly (no redeployment)
- Debug locally with standard Node.js tools
- Console logs appear directly in your terminal
**IMPORTANT: Redeploy After Watch**
When you stop `yarn webiny watch api`, your Lambda functions still contain stub code. You **must** redeploy:
```bash
yarn webiny deploy api
```
The watch command prints a reminder when you stop it.
### Running Both
You can run both watch commands simultaneously in separate terminals:
```bash
# Terminal 1
yarn webiny watch api
# Terminal 2
yarn webiny watch admin
```
## Environments
### Long-Lived Environments
Persistent environments maintained over time:
- **dev** -- daily development
- **staging** -- pre-production testing
- **prod** -- production
Best practice: manage via CI/CD pipelines.
### Short-Lived Environments
Temporary environments for specific purposes:
- Feature branch testing
- PR previews
- Experimentation
```bash
# Create a short-lived environment
yarn webiny deploy --env feature-123
# Destroy when done
yarn webiny destroy --env feature-123
```
### Deployment Modes
Webiny has two deployment templates:
- **dev** -- smaller, cheaper infrastructure for development
- **prod** -- production-grade infrastructure with HA, backups, auto-scaling
The mode is determined by whether the environment name is in the `ProductionEnvironments` list:
```tsx
// webiny.config.tsx
<Infra.ProductionEnvironments environments={["prod", "staging"]} />
```
## State Files
State files are JSON files that track the current state of your deployment:
- Store infrastructure resource info, configurations, and metadata
- Essential for managing environments and tracking changes
- Stored in S3 by default
## Debugging
### API Errors
During `yarn webiny watch api`:
- **Console logs** appear directly in the terminal
- Use `console.log()` for quick debugging
- Use `Logger` (DI-injected) for production logging to CloudWatch
```typescript
import { Logger } from "webiny/api/logger";
// In your extension class
this.logger.info("Processing request...");
this.logger.warn("Something unexpected");
this.logger.error("Something failed");
```
### Admin Errors
Use browser DevTools:
- **Console** -- view logs and errors
- **Network tab** -- inspect GraphQL requests/responses
- **React Developer Tools** -- debug component state/props
- **GraphQL Network Inspector** -- inspect GraphQL operations
### Infrastructure Errors
Deployment errors from Pulumi typically relate to:
- IAM permission issues
- AWS service quotas
- Resource configuration problems
Check the deployment output for specific error messages.
## CLI Commands Reference
| Command | Purpose |
| --------------------------------------- | ---------------------------------- |
| `yarn webiny deploy` | Deploy all applications |
| `yarn webiny deploy [core\|api\|admin]` | Deploy specific application |
| `yarn webiny deploy --env <name>` | Deploy to specific environment |
| `yarn webiny destroy --env <name>` | Destroy an environment |
| `yarn webiny watch api` | Start local API development |
| `yarn webiny watch admin` | Start local Admin development |
| `yarn webiny info` | Show deployment info and URLs |
| `yarn webiny info --env <name>` | Show info for specific environment |
| `yarn webiny extension <name>` | Install a pre-built extension |
## Quick Reference
```
First deploy: yarn webiny deploy
Dev API: yarn webiny watch api
Dev Admin: yarn webiny watch admin
Get URLs: yarn webiny info
Deploy env: yarn webiny deploy --env staging
After watch: yarn webiny deploy api (MUST redeploy!)
```
## Related Skills
- `webiny-project-structure` -- Project layout and `webiny.config.tsx`
- `webiny-infrastructure-extensions` -- Customizing AWS infrastructure and environmentsRelated Skills
webiny-v5-to-v6-migration
Migration patterns for converting v5 Webiny code to v6 architecture. Use this skill when migrating existing v5 plugins to v6 features, converting context plugins to DI services, adapting v5 event subscriptions to v6 EventHandlers, or understanding how v5 patterns translate to v6. Targeted at AI agents performing migrations.
webiny-api-permissions
Schema-based permission system for API features. Use this skill when implementing authorization in use cases, defining permission schemas with createPermissionSchema, creating injectable permissions via createPermissionsAbstraction/createPermissionsFeature, checking read/write/delete/publish permissions, handling own-record scoping, or testing permission scenarios. Covers the full pattern from schema definition to use case integration to test matrices.
webiny-admin-permissions
Admin-side permission UI registration and DI-backed permission checking. Use this skill when adding permission controls to the admin UI — schema-based auto-generated forms, injectable permissions via createPermissionsAbstraction/ createPermissionsFeature, typed hooks (createUsePermissions), the HasPermission component (createHasPermission), and the Security.Permissions component props. Covers both simple apps and complex multi-entity permission schemas.
webiny-sdk
Using @webiny/sdk to read and write CMS data from external applications. Use this skill when the developer is building a Next.js, Vue, Node.js, or any external app that needs to fetch or write content to Webiny, set up the SDK, use the Result pattern, list/get/create/update/publish entries, filter and sort queries, use TypeScript generics for type safety, work with the File Manager, or create API keys programmatically. Covers read vs preview mode, the `values` wrapper requirement, correct method names, and the `fields` required parameter.
webiny-project-structure
Webiny project layout, webiny.config.tsx anatomy, and extension registration. Use this skill when the developer asks about folder structure, where custom code goes, how to register extensions, what webiny.config.tsx does, or how the project is organized. Also use when they need to understand the relationship between extensions/, webiny.config.tsx, and the different extension types (Api, Admin, Infra, CLI).
webiny-infrastructure-extensions
Modifying AWS infrastructure using Pulumi handlers and declarative Infra components. Use this skill when the developer wants to customize AWS infrastructure, add Pulumi handlers, configure OpenSearch, VPC, resource tags, regions, custom domains, blue-green deployments, environment-conditional config, or manage production vs development infrastructure modes. Covers CorePulumi.Interface, all <Infra.*> declarative components, and <Infra.Env.Is>.
webiny-infra-catalog
Infrastructure — 33 abstractions. Infrastructure extensions.
webiny-extensions-catalog
extensions — 5 abstractions.
webiny-cli-command-catalog
cli/command — 1 abstractions.
webiny-cli-catalog
cli — 2 abstractions.
webiny-api-tenant-manager-catalog
API — Tenant Manager — 2 abstractions. Tenant management event handlers and use cases.
webiny-api-tasks-catalog
api/tasks — 2 abstractions.