通用 Bugfix 工作流知识库,包含 TDD 流程、输出格式规范、置信度评分标准和通用最佳实践。适用于所有技术栈(backend/frontend/e2e)。
Provides a standardized 6-phase TDD bugfix workflow with confidence scoring for root cause analysis and automated fix validation. Triggers when fixing bugs to ensure systematic debugging, test coverage, and quality gate compliance across all tech stacks.
/plugin marketplace add penkzhou/swiss-army-knife-plugin/plugin install swiss-army-knife@swiss-army-knife-pluginThis skill inherits all available tools. When active, it can use any tool Claude has access to.
本 Skill 提供标准化 6 阶段 Bugfix 工作流的通用知识,适用于所有技术栈。
验证命令模板:
make test TARGET={stack} FILTER={test_file}
最终验证:
make test TARGET={stack}
make lint TARGET={stack}
make typecheck TARGET={stack}
| 分数范围 | 行为 |
|---|---|
| ≥60 | 自动继续 |
| 40-59 | 暂停询问用户 |
| <40 | 停止并收集更多信息 |
| 分数范围 | 级别 | 行为 |
|---|---|---|
| ≥90 | Critical | 自动修复 |
| 80-89 | Important | 自动修复 |
| <80 | 低于阈值 | 不报告 |
{
"id": "BF-{YYYY}-{MMDD}-{NNN}",
"file": "文件路径",
"line": 行号,
"severity": "critical|high|medium|low",
"category": "错误类型",
"description": "问题描述",
"evidence": ["支持判断的证据"],
"stack": "堆栈信息"
}
{
"total": 总数,
"by_type": { "类型": 数量 },
"by_file": { "文件": 数量 }
}
{
"solution": {
"approach": "修复思路概述",
"steps": ["步骤1", "步骤2"],
"risks": ["风险1", "风险2"],
"estimated_complexity": "low|medium|high"
},
"tdd_plan": {
"red_phase": { "tests": [...] },
"green_phase": { "changes": [...] },
"refactor_phase": { "items": [...] }
},
"impact_analysis": {
"affected_files": [...],
"api_changes": [...],
"test_impact": [...]
},
"security_review": {
"performed": true/false,
"vulnerabilities": [...],
"passed": true/false
}
}
{
"issue_id": "BF-2025-MMDD-001",
"phases": {
"red": { "status": "pass|fail|skip", "duration_ms": 1234 },
"green": { "status": "pass|fail|skip", "changes": [...] },
"refactor": { "status": "pass|fail|skip", "changes": [...] }
},
"overall_status": "success|partial|failed"
}
仅在涉及敏感代码(认证、输入处理、数据存储等)时进行:
# [问题简述] Bugfix 报告
> 日期:{YYYY-MM-DD}
> 置信度:{confidence}/100
> 技术栈:{stack}
## 1. 问题描述
### 1.1 错误信息
[结构化错误列表]
### 1.2 根因分析
[根因描述 + 证据]
## 2. 修复方案
### 2.1 TDD 计划
#### RED Phase
[失败测试代码]
#### GREEN Phase
[最小实现代码]
#### REFACTOR Phase
- [ ] 重构项
### 2.2 影响分析
[影响范围]
## 3. 验证计划
- [ ] 测试通过
- [ ] 覆盖率达标
- [ ] 无回归
| 检查项 | 标准 | 阻塞级别 |
|---|---|---|
| 测试通过 | 100% | 阻塞 |
| 覆盖率 | >= 90% | 阻塞 |
| 新代码覆盖率 | 100% | 阻塞 |
| Lint | 无错误 | 阻塞 |
| TypeCheck | 无错误 | 阻塞 |
| 回归测试 | 无回归 | 阻塞 |
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.