About implement-frontend
A frontend implementation skill for repositories using React, TypeScript, and Next.js, with guidance for state ownership, typing, reliability, and accessibility. It helps coding agents follow local conventions while structuring and checking frontend changes.
Key features
- 01Set component and hook boundaries
- 02Use strict typing and explicit mappings
- 03Handle loading, error, and empty states
- 04Manage async cancellation and cleanup
- 05Preserve keyboard accessibility and focus
- 06Apply stack-specific form and API patterns
Use cases
- 01Implement frontend features in a supported stack
- 02Organize API mapping and state ownership
- 03Review async behavior and accessibility
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ mblode/ agent-skills --skill implement-frontendAfter installing, type/implement-frontendin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
react-patterns.mdtypescript-patterns.mdagents/openai.yamlDetails
From the project READMEImplement Frontend
Apply this skill when the repository already follows this stack:
- React + TypeScript + Next.js
- React Hook Form + Zod
- React Query or Connect Query
- Proto-generated API types (when present)
If local conventions differ, preserve existing project standards and apply only the transferable principles.
Core workflow
- Set ownership boundaries before editing.
- Keep render-only concerns in components.
- Keep fetching, mapping, and business rules in hooks.
- Keep server state in query cache, form state in RHF, and UI-only state in
useState.
- Implement with strict typing and explicit mappings.
- Avoid type escapes such as
any,as any, and ignore directives. - Map API models to UI models in mappers instead of casting.
- Avoid type escapes such as
- Verify reliability and UX before finishing.
- Cover loading, error, and empty states.
- Add cancellation and cleanup for async work when race conditions are possible.
- Preserve keyboard accessibility and focus behavior.
Non-negotiable checks
- Remove duplicate state and
useEffectsync loops. - Keep API calls and business logic out of render components.
- Invalidate or update only affected query keys.
- Use rollback-safe optimistic updates only.
- Remove
console.*,debugger, dead code, and unused imports.
Stack guardrails
- If the repo uses RHF + Zod, use
createZodResolver; avoidzodResolver(schema as any). - If using RHF, avoid putting the entire
formobject in dependency arrays. - Keep proto-to-UI transforms in a dedicated mapper file (for example
utils/proto-mappers.ts) when proto contracts are used.
References
- Use
react-patterns.mdfor forms, hooks, state ownership, query usage, and accessibility. - Use
typescript-patterns.mdfor type hygiene, proto typing, and code organization.
Comments
Markdown supported