add-feature
Implements new features across the API and frontend, enforcing strict test coverage standards.
Install
mkdir -p .claude/skills/add-feature-adamint && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19331" && unzip -o skill.zip -d .claude/skills/add-feature-adamint && rm skill.zipInstalls to .claude/skills/add-feature-adamint
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Adds new features to the application including API endpoints, React pages, components, and curriculum content. USE FOR: implementing new features, adding API endpoints, creating React components, adding curriculum content, writing unit/API tests. DO NOT USE FOR: E2E browser tests (use add-e2e-tests skill), adversarial/break testing (use adversarial-tester skill).Key capabilities
- →Implement API endpoints with structured logging
- →Create React components with theme tokens
- →Write unit and API tests using WebApplicationFactory
- →Develop Playwright E2E tests for user flows
- →Manage application lifecycle with aspire commands
How it works
The skill guides the implementation of full-stack features by enforcing specific patterns for API endpoints and React components, followed by mandatory unit and E2E testing.
Inputs & outputs
When to use add-feature
- →Implement a new API endpoint
- →Create a new curriculum UI component
- →Add full-stack feature functionality
About this skill
Skill: Add Feature
When to use
When adding any new feature to the application — API endpoint, React page, component, or curriculum content.
Process
1. Implement the feature
API changes:
- Add endpoint in
AspireAcademy.Api/Endpoints/ - Use constants from
Models/Enums.cs(no magic strings) - Use
EndpointHelpers.GetUserId()for auth - Return
ErrorResponsefor all errors - Add structured logging with
ILogger - Add OTel metrics/traces where appropriate
Frontend changes:
- Add
data-testidattributes on all interactive elements - Use constants from
src/constants.ts - Use theme tokens (no hardcoded colors)
- Add loading states, error states, empty states
- Add
console.erroron all API failures - Disable buttons during submission
2. Write API tests
Add tests in AspireAcademy.Api.Tests/ using WebApplicationFactory:
- Test happy path (correct input → correct output)
- Test validation errors (bad input → 400)
- Test auth (no token → 401, wrong user → 403)
- Test edge cases (duplicate, not found, already completed)
3. Write Playwright E2E tests (MOST IMPORTANT)
E2E tests are the highest-priority deliverable for any feature. Think carefully about what flows a real user would exercise and ensure every meaningful path has E2E coverage. A feature without adequate E2E tests is not done.
Add tests in AspireAcademy.Api.Tests/E2E/ using C# Microsoft.Playwright:
- Test the full user flow through the browser
- Seed prerequisites via
fixture.ApiClient - Assert both API response AND visual state
- Test error cases (what does the user see when it fails?)
- Cover edge cases — empty states, validation errors, concurrent actions
4. Verify
# Build
dotnet build AspireAcademy.Api/
npx tsc --noEmit # in AspireAcademy.Web/
# Run API + unit tests
dotnet test AspireAcademy.Api.Tests/ --filter "Category!=E2E"
# Run E2E tests (app must be running)
E2E_WEB_URL=http://localhost:<PORT> dotnet test AspireAcademy.Api.Tests/ --filter "Category=E2E"
# Run React component tests
cd AspireAcademy.Web && npx vitest run
ALL tests must pass before the feature is considered done. E2E coverage is non-negotiable — if you're unsure whether you have enough, you probably don't. Add more.
Checklist
- API endpoint has structured logging
- API endpoint has error handling (returns ErrorResponse, not 500)
- API endpoint has at least 1 happy path test
- API endpoint has at least 1 error case test
- Frontend has data-testid on interactive elements
- Frontend has loading state
- Frontend has error state (user-friendly message)
- Frontend buttons disabled during submission
- Playwright E2E test covers the full user flow
- All existing tests still pass
Restarting the app
Use aspire start NOT kill or kill -9.
NEVER mock API responses (e.g. playwright-cli route with --body) when testing UI. If the API isn't running, restart it with aspire start. All visual checks and tests must hit the real backend.
# Stop gracefully (preserves data)
aspire stop --all
# Start fresh (rebuilds Docker images if Dockerfile changed)
aspire run
NEVER use kill -9 on the aspire process — it can corrupt the PostgreSQL WAL, causing invalid checkpoint record errors on next startup. Always use aspire stop.
NEVER delete aspire-academy-pgdata volume — it contains user data. Only delete if schema migration fails and user explicitly asks.
When not to use it
- →For E2E browser tests (use add-e2e-tests)
- →For adversarial or break testing (use adversarial-tester)
Prerequisites
Limitations
- →E2E tests are mandatory for feature completion
- →Must use aspire stop for graceful shutdown
How it compares
It mandates E2E coverage as a non-negotiable deliverable for every feature, ensuring full-stack verification before completion.
Compared to similar skills
add-feature side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| add-feature (this skill) | 0 | 3mo | Review | Advanced |
| component-development | 1 | 4mo | Review | Intermediate |
| frontend-mobile-development-component-scaffold | 1 | 3mo | No flags | Intermediate |
| shadmin-dev | 0 | 1mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by adamint
View all by adamint →You might also like
component-development
FritzAndFriends
Guidance for creating Blazor components that emulate ASP.NET Web Forms controls. Use this when implementing new components or extending existing ones in the BlazorWebFormsComponents library.
frontend-mobile-development-component-scaffold
sickn33
You are a React component architecture expert specializing in scaffolding production-ready, accessible, and performant components. Generate complete component implementations with TypeScript, tests, s
shadmin-dev
ahaodev
Apply Shadmin feature-development standards (backend Go/Gin/Ent + frontend React/TS). Use when adding/modifying features, CRUD modules, API routes/controllers/usecases/repositories, Ent schemas, frontend pages/routes, React components, TanStack hooks, or any full-stack work in this project. Trigger
api
birdgg
Create an agent team for full-stack feature development. One agent writes the Haskell Servant backend API, another builds the React frontend UI consuming that API. Use when asked to "build a feature", "add a new page", "create an endpoint with UI", or "fullstack feature".
scaffold-feature
niklasbrandt
Scaffold a complete full-stack feature: FastAPI endpoint, dashboard Web Component, i18n keys, test stubs, and documentation checks.
zustand
lobehub
Zustand state management guide. Use when working with store code (src/store/**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.