一键导入
hotfix
Fix bugs or modify existing features with deep exploration, root-cause analysis, and quality-first long-term solutions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Fix bugs or modify existing features with deep exploration, root-cause analysis, and quality-first long-term solutions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Orchestrate the /dev methodology across ALL phases of a feature spec via a background ultracode run, one fresh agent per bounded (sub-)phase, sequentially. Handles the DB migration itself, splits oversized phases, monitors progress, recovers from agent overruns, independently certifies each block, and reconciles the spec. Encodes the failure modes seen in practice so they do not recur.
Develop phase with exploration and plan validation
Deep codebase exploration to answer specific questions
Quick implementation without a full spec file
Create complete development plan with parallel exploration
Universal code review - auto-detects scope from git changes, spec, commit, or brief
| name | hotfix |
| description | Fix bugs or modify existing features with deep exploration, root-cause analysis, and quality-first long-term solutions |
| model | opus |
| argument-hint | <issue description> |
| hooks | {"PostToolUse":[{"matcher":"Edit|Write","hooks":[{"type":"command","command":"if [[ -d \"backend\" ]]; then\n cd backend && go build ./... 2>&1 | head -10 && golangci-lint run ./... 2>&1 | head -20 || true\nfi\n","once":true}]}]} |
YOU ARE EXECUTING THE /hotfix SKILL. The user triggered this skill. Follow ALL instructions below step by step. Do NOT treat this as a freeform conversation - execute the skill workflow.
Follow CLAUDE.md rules for Clean Architecture.
This skill exists to find the best long-term solution, not the fastest patch. The recommended fix must score highest on:
A lean / simple solution IS the right call when the scope is small and isolated, the logic is genuinely throwaway, or YAGNI clearly applies. But it must be the outcome of an explicit arbitration, not a reflex. When the trade-off is genuinely unclear, lean toward the more robust and maintainable option.
When multiple approaches exist, the option tagged "Recommended" MUST:
A more economical variant CAN be proposed as an alternative, with trade-offs spelled out so the user can choose knowingly.
Ultra think before each phase transition:
From: $ARGUMENTS
Extract:
Use AskUserQuestion to clarify before exploration:
Do not proceed until the issue is fully understood.
Launch focused agents in a single message (parallel execution). There is no upper limit on agent count. Spawn one agent per distinct concern, area, or file-cluster the task actually has, and scale up freely with its breadth. The lists below are a starting menu, not a quota: add as many agents as full coverage requires.
explore-codebase: "Find entities, repository interfaces, value objects, and DTOs related to [feature] in backend/internal/domain/ and backend/internal/application/dto/"explore-codebase: "Find usecases related to [feature] in backend/internal/application/usecases/. Read their Execute methods, dependencies, and error handling"explore-codebase: "Find HTTP handlers and routes related to [feature] in backend/internal/presentation/. Check middleware, validation, response patterns"explore-codebase: "Find repo implementations, external service adapters, and config related to [feature] in backend/internal/infrastructure/"explore-codebase: "Find the most similar existing feature to [feature] in backend/. I need to replicate its patterns"explore-codebase: "Find components related to [feature] in frontend/src/components/. Check props, state, Shadcn UI usage"explore-codebase: "Find hooks, React Query calls, and state management related to [feature] in frontend/src/hooks/ and frontend/src/lib/"explore-codebase: "Find pages and layouts related to [feature] in frontend/src/app/. Check route structure, data fetching, i18n"explore-codebase: "Find TypeScript types, API client functions related to [feature] in frontend/src/types/ and frontend/src/lib/"explore-codebase: "Find the most similar existing feature to [feature] in frontend/src/. I need to replicate its patterns"The supporting agents below fan out the SAME way as the code agents: one agent per distinct concern, no maximum. None of them is capped at a single instance.
Launch one explore-db per distinct DB concern in the same single message. One agent is enough for a single-table lookup; scale up freely when the task spans multiple table clusters, both dev and prod, or several concerns. First token of each prompt selects the env (dev/prod, defaults to dev).
explore-db: "dev - Map tables and foreign keys related to [feature]: columns, types, FK relationships"explore-db: "dev - Inspect constraints and RLS policies (if used) on tables related to [feature]"explore-db: "dev - List migrations touching [feature] tables, run get_advisors for security/perf issues"Add one agent per distinct table cluster, or to cover prod alongside dev.
Launch one explore-docs per distinct library or per distinct feature within a library. One agent is enough for a single lib question; scale up when the fix touches multiple libraries or several independent features of one.
explore-docs: "[library A] [specific feature] documentation"explore-docs: "[library B] [specific feature] documentation"Launch one websearch per distinct external question. One agent is enough for a single topic; scale up when there are several independent questions.
websearch: "[topic A] best practices 2025 2026"websearch: "[topic B] ..."After agents return, verify coverage across all dimensions:
explore-codebaseexplore-codebaseexplore-db agents (one per missing concern / cluster / env)explore-docs agents (one per missing library / feature)Do NOT proceed with incomplete context.
Produce analysis:
## Bug Analysis
### Current Behavior
[What the code currently does]
### Expected Behavior
[What it should do]
### Root Cause
[Why the bug happens - with file:line references]
### Files Affected
- `path/to/file.go:123` - [how it's affected]
Create and display the complete fix strategy, then STOP. Do NOT proceed without user validation.
## Fix Strategy
### Root Cause Summary
[One sentence]
### Approach (Recommended)
[2-3 sentences describing the chosen approach and WHY it is the long-term, quality-first answer (elegance + maintainability + scalability).]
### Alternatives Considered
- **[Alt A]**: [What it does]. Rejected because [what it sacrifices: robustness, scale ceiling, testability, etc.].
- **[Alt B]**: [What it does]. Rejected because [...].
(Skip this section ONLY if there is genuinely no alternative worth mentioning, and state so explicitly.)
### Changes Required
**Backend:**
- `path/to/file.go:XX` - [specific change]
**Frontend:**
- `path/to/file.tsx:XX` - [specific change]
### Patterns to Follow
[From exploration - exact code snippets]
### Risks & Mitigations
- [Risk]: [Mitigation]
MANDATORY: You MUST wait for user approval before ANY implementation.
Ask with AskUserQuestion: "Validate this fix approach?"
DO NOT proceed to implementation without explicit user selection.
ONLY after user selects "Apply fix", implement:
Rules:
*_test.go for Go fixes, *.test.ts / *.test.tsx for frontend fixesFor significant UI: Skill(skill="frontend-design:frontend-design")
cd backend && go build ./... && go vet ./... && golangci-lint run ./... && go test ./...
cd frontend && npm run test:run && npm run build
Backend and frontend tests are MANDATORY: All existing tests must pass (zero regressions). The regression test for the fix must also pass.
Database verification (if schema/policies changed): run get_advisors via explore-db (dev/prod).
## Fix Complete
### Issue
[Original issue]
### Root Cause
[What was wrong]
### Changes Made
- `path/to/file.go` - [change]
### Testing Recommendation
- [How to verify]