Agent skill
local-development
Running functions and web app locally, troubleshooting emulator issues, Storybook. Use when running or debugging locally.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/local-development
SKILL.md
Local Development
When to Use
Use this skill when running the web app or functions locally, troubleshooting emulator issues, or running Storybook.
Important
The user runs functions and web app locally for testing. Claude writes code and creates PRs -- Claude does NOT deploy or run dev servers.
Running Functions Locally (user runs this)
npx nx run functions:serve
This command:
- Builds the functions
- Copies
.env.devtodist/apps/functions/.env - Starts watch mode for rebuilds (background)
- Runs
firebase serve --only functions --project=devon port 5001
Running Web App Locally (user runs this)
npx nx run maple-spruce:serve
Runs on http://localhost:3000
Running Storybook
npx nx run maple-spruce:storybook
# Opens http://localhost:6006
Building Storybook:
npx nx run maple-spruce:build-storybook
# Output: dist/storybook/maple-spruce
Running Tests
npm test
Deployment
User decides when to deploy to dev. Production deploys automatically via CI/CD on merge to main.
Troubleshooting Local Functions
Emulator prompts for environment variables
The Firebase emulator is not finding the .env file. This happens when:
- The build clears
dist/apps/functions/before the.envis copied - A stale watch process is interfering
Fix:
# Kill any stale processes
pkill -f "firebase serve"
pkill -f "nx run functions"
# Clean and restart
rm -rf dist/apps/functions
npx nx run functions:serve
Why this happens:
- Firebase reads
.envfromdist/apps/functions/ - The
nx run functions:buildclears this directory - The serve command copies
.env.devafter build, before starting the emulator - If ordering is wrong or stale processes exist, the emulator starts without the
.env
Key indicator it's working:
i functions: Loaded environment variables from .env.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?