BumpyClock/agent-templates / skills/programming
programming
UnverifiedImplement, debug, refactor, or review code with scoped changes and evidence.
references/web-development.md
View on GitHub# Web Development
**Load when:** changing browser-rendered UI or web app behavior. Repo conventions, installed versions, and browser support policy win.
## Interaction Correctness
- Prefer semantic elements and browser-native behavior. Add ARIA or custom interaction only where native semantics fall short.
- Associate labels with controls, choose input types that match data, and preserve native form submission.
- Support keyboard and touch alongside pointer input. Keep focus visible, return it after transient UI closes, and avoid hover-only behavior.
- Give compact controls usable hit areas without requiring their visual bounds to grow.
- Cover loading, empty, error, retry, and feedback states in user flows; control rendering cost and handle concurrent or stale async requests.
- Reuse existing design tokens, components, and styling conventions before adding one-off primitives.
## Layout And Motion
- Reserve known space for media and async content to avoid layout shifts.
- Use motion to explain state or spatial change, not by default. Frequent product actions often need less motion than occasional or marketing interactions.
- Honor `prefers-reduced-motion`. Name transitioned properties instead of using `transition: all`.
- Check hover behavior on touch-capable devices and interruption behavior for interactive animations.
## React
- Keep state ownership clear. Derive values where possible instead of syncing duplicate state through effects.
- Respect server/client boundaries already used by repo.
- Use the repo's existing data-fetching and state libraries. Check installed framework versions in `package.json` before using newer APIs.
- For TypeScript domain types or external input contracts, use [TypeScript patterns](languages/typescript-patterns.md).
## Security
- Prefer `textContent` over `innerHTML`; sanitize untrusted HTML with a vetted library.
- Validate URLs and redirects that come from user input.
- Follow the repo's existing CSP, token storage, and framing policy; changing them is a separate decision.
- Use project-provided diagnostics when useful. Treat findings and scores as signals, then re-run relevant checks after fixes.
## Verification
- Verify rendered behavior at relevant viewport sizes and input modes, not only types/tests.
- Check keyboard path, focus order, reduced motion, form errors, loading/empty states, and layout stability when change touches them.
- Measure before performance work. Prefer repo's existing browser tests and accessibility tooling.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |