web-bugfix
Fix frontend bugs with minimum-touch changes, keep other surfaces stable, and sync schema, types, hooks, constants, tests, and related docs when impacted.
- License 许可
- MIT
- 最近更新
- 2026-08-18
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- web-bugfix
- description
- Fix frontend bugs with minimum-touch changes, keep other surfaces stable, and sync schema, types, hooks, constants, tests, and related docs when impacted.
02 资源文件 7
- 参考文档agents/openai.yaml295 B
- 参考文档references/citation-formats.md3.2 KB
- 参考文档references/context.md1.2 KB
- 参考文档references/summary-templates.md4.0 KB
- 脚本scripts/extract_citations.py9.5 KB
- 脚本scripts/format_summary.py10.6 KB
- 参考文档templates/checklist.md593 B
03 SKILL.md 正文
Skill: Web Bugfix
Context (Required)
- Folder scope + impact map:
references/context.md - Execution checklist:
templates/checklist.md
Use this skill when the user asks to fix a frontend bug. Core principle: minimum touch. Find the root cause, change as little as possible, do not refactor unrelated areas, then sync artifacts that are actually impacted. Leave no drift behind.
Workflow
1. Reproduce or Define the Bug Clearly
Before changing code:
- understand the symptoms
- find reproduction steps or a clear failing behavior
- define the bug's boundary: page, hook, component, shared schema/type, or API integration
If possible, add or update a test that represents the bug.
2. Localize the Root Cause
Find the smallest viable root cause. Prioritize these locations:
*-page-content.tsxand its_components/- transaction hooks
- shared schema/type consumed by the frontend
- constants (
api-routers,query-keys) - reusable components that are actually the source of the bug
Do not refactor large areas just because the bug surfaced in messy code.
3. Apply Minimum-Touch Fix
Minimum-touch rules:
- touch as few files as possible
- fix the wrong behavior without redesigning the surrounding area
- do not replace architectural patterns unrelated to the bug
- do not clean up unrelated old debt
4. Sync Impacted Artifacts
If the bug touches a contract or data shape, update what truly needs updating:
packages/schemaspackages/types- frontend transaction hooks
- related constants or utils
- relevant tests
- contract docs if the frontend's expectation of the API genuinely changed
If the bug actually originates from a wrong backend contract, do not hide the problem in the frontend. Patch the frontend surface as needed, then route or continue with the appropriate backend skill.
5. Verify Narrowly but Thoroughly
Minimum verification:
- test that reproduces or guards the bug
- typecheck/lint on touched surfaces
- confirm no new contract drift
If the bug lives in an active starter surface, prioritize keeping the homepage, shared contract, and transaction hooks consistent.
Prohibitions
- NEVER do large refactors when the user only asked for a bug fix.
- NEVER change other files just because they look messy.
- NEVER leave schema/type/hooks/docs drift when the fix changes data shape.
- NEVER cover up a backend bug with a frontend workaround that adds state lies or contract mismatch.
- NEVER finish without targeted verification.
Pre-Completion Checklist
- [ ] Bug reproduced or wrong behavior defined clearly
- [ ] Root cause localized to the smallest reasonable surface
- [ ] Change remains minimum touch
- [ ] Shared schema/types/constants/hooks updated if actually impacted
- [ ] Relevant tests added or updated
- [ ] No new drift in the frontend contract
- [ ] All files end with a newline (EOF)
04 同仓库更多 Skills
web-slicing
Convert screenshot/Figma designs into pixel-perfect frontend UI with reusable components. Use when the task focuses on visual and layout implementation.
web-seo-geo-friendly
Optimize public Next.js App Router pages for SEO and GEO (Generative Engine Optimization). Use when the user explicitly requests SEO/GEO optimization on public pages.
web-code-review
Review frontend code with a firm senior-lead standard, focusing on bugs, regressions, architecture risks, and test gaps in apps/web and the shared contracts the frontend depends on.
web-bugfix
Fix frontend bugs with minimum-touch changes, keep other surfaces stable, and sync schema, types, hooks, constants, tests, and related docs when impacted.
web-api-integrated
Integrate API endpoints into the frontend with Zod schemas, response types, constants, and react-query hooks. Use when implementing endpoints from an API contract, Postman, or Swagger.
skill-creator
Create a new skill from scratch with full structure — SKILL.md, references, templates, openai.yaml, Claude wrapper, and registration in manifest + AGENTS.md + CLAUDE.md.