重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
debug-like-expert by glittercowboy/taches-cc-resources
npx skills add https://github.com/glittercowboy/taches-cc-resources --skill debug-like-expert该技能强调对你自己编写的代码要比对不熟悉的代码持有更多的怀疑态度,因为关于“它应该如何工作”的认知偏见可能会让你对实际的实现错误视而不见。使用科学方法系统地识别根本原因,而不是应用快速修复。
<context_scan> 在每次调用时运行,以检测特定领域的调试专业知识:
# What files are we debugging?
echo "FILE_TYPES:"
find . -maxdepth 2 -type f 2>/dev/null | grep -E '\.(py|js|jsx|ts|tsx|rs|swift|c|cpp|go|java)$' | head -10
# Check for domain indicators
[ -f "package.json" ] && echo "DETECTED: JavaScript/Node project"
[ -f "Cargo.toml" ] && echo "DETECTED: Rust project"
[ -f "setup.py" ] || [ -f "pyproject.toml" ] && echo "DETECTED: Python project"
[ -f "*.xcodeproj" ] || [ -f "Package.swift" ] && echo "DETECTED: Swift/macOS project"
[ -f "go.mod" ] && echo "DETECTED: Go project"
# Scan for available domain expertise
echo "EXPERTISE_SKILLS:"
ls ~/.claude/skills/expertise/ 2>/dev/null | head -5
在开始调查前展示发现。 </context_scan>
<domain_expertise> 特定领域的专业知识位于 ~/.claude/skills/expertise/
领域技能包含全面的知识,包括调试、测试、性能和常见陷阱。在调查之前,确定是否需要加载领域专业知识。
<scan_domains>
ls ~/.claude/skills/expertise/ 2>/dev/null
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
这将显示可用的领域专业知识(例如,macos-apps, iphone-apps, python-games, unity-games)。
如果未找到专业知识技能: 在没有领域专业知识的情况下继续(优雅降级)。该技能使用通用的调试方法也能正常工作。 </scan_domains>
<inference_rules> 如果用户的描述或代码库包含领域关键词,则推断领域:
| 关键词/文件 | 领域技能 |
|---|---|
| "Python", "game", "pygame", ".py" + 游戏循环 | expertise/python-games |
| "React", "Next.js", ".jsx/.tsx" | expertise/nextjs-ecommerce |
| "Rust", "cargo", ".rs" 文件 | expertise/rust-systems |
| "Swift", "macOS", ".swift" + AppKit/SwiftUI | expertise/macos-apps |
| "iOS", "iPhone", ".swift" + UIKit | expertise/iphone-apps |
| "Unity", ".cs" + Unity 导入 | expertise/unity-games |
| "SuperCollider", ".sc", ".scd" | expertise/supercollider |
| "Agent SDK", "claude-agent" | expertise/with-agent-sdk |
如果推断出领域,请确认:
Detected: [domain] issue → expertise/[skill-name]
Load this debugging expertise? (Y / see other options / none)
</inference_rules>
<no_inference> 如果没有明显的领域,请提供选项:
What type of project are you debugging?
Available domain expertise:
1. macos-apps - macOS Swift (SwiftUI, AppKit, debugging, testing)
2. iphone-apps - iOS Swift (UIKit, debugging, performance)
3. python-games - Python games (Pygame, physics, performance)
4. unity-games - Unity (C#, debugging, optimization)
[... any others found in build/]
N. None - proceed with general debugging methodology
C. Create domain expertise for this domain
Select:
</no_inference>
<load_domain> 当选择领域时,从该技能中读取所有参考资料:
cat ~/.claude/skills/expertise/[domain]/references/*.md 2>/dev/null
这将在调查之前加载全面的领域知识:
宣布:"Loaded [domain] expertise. Investigating with domain-specific context."
如果未找到领域技能: 通知用户,并提供使用通用方法继续或创建该专业知识的选项。 </load_domain>
<when_to_load> 当已知领域时,领域专业知识应在调查之前加载。
领域专业知识不需要用于:
重要提示:如果你编写或修改了正在调试的任何代码,你对其工作原理存在认知偏见。你关于“它应该如何工作”的心理模型可能是错误的。对你编写的代码要比对不熟悉的代码持有更多的怀疑态度——你对自己做出的假设视而不见。
<core_principle> 验证,而非假设。 每个假设都必须经过测试。每个“修复”都必须经过验证。没有证据就没有解决方案。
尤其注意:你设计或实现的代码在被证明无辜之前都是有罪的。你的意图无关紧要——只有代码的实际行为才重要。像质疑别人的设计决策一样严格地质疑你自己的设计决策。 </core_principle>
<quick_start>
<evidence_gathering>
在提出任何解决方案之前:
A. 记录当前状态
B. 映射系统
C. 收集外部知识(需要时)
有关研究策略的详细指导,请参阅 references/when-to-research.md。
</evidence_gathering>
<root_cause_analysis>
A. 形成假设
基于证据,列出可能的原因:
B. 测试每个假设
对于每个假设:
有关科学方法的应用,请参阅 references/hypothesis-testing.md。
C. 排除或确认
在你能回答以下问题之前,不要继续前进:
</root_cause_analysis>
<solution_development>
仅在确认根本原因之后:
A. 设计解决方案
B. 实施并验证
C. 彻底测试
有关全面的验证方法,请参阅 references/verification-patterns.md。
</solution_development>
</quick_start>
<critical_rules>
</critical_rules>
<success_criteria>
开始之前:
调查期间:
如果你不能对所有这些问题回答"是",请继续调查。
关键:在此清单通过之前,不要将调试任务标记为完成。
</success_criteria>
<output_format>
## 问题:[问题描述]
### 证据
[你观察到的内容 - 确切的错误、行为、输出]
### 调查
[你检查了什么,你发现了什么,你排除了什么]
### 根本原因
[实际的潜在问题及其证据]
### 解决方案
[你更改了什么以及**为什么**它能解决根本原因]
### 验证
[你如何确认这有效且没有破坏其他东西]
</output_format>
<advanced_topics>
关于更深层次的主题,请参阅参考文件:
</advanced_topics>
每周安装
62
仓库
GitHub 星标
1.7K
首次出现
2026年1月23日
安全审计
安装于
claude-code55
opencode49
gemini-cli47
codex47
github-copilot44
cursor43
The skill emphasizes treating code you wrote with MORE skepticism than unfamiliar code, as cognitive biases about "how it should work" can blind you to actual implementation errors. Use scientific method to systematically identify root causes rather than applying quick fixes.
<context_scan> Run on every invocation to detect domain-specific debugging expertise:
# What files are we debugging?
echo "FILE_TYPES:"
find . -maxdepth 2 -type f 2>/dev/null | grep -E '\.(py|js|jsx|ts|tsx|rs|swift|c|cpp|go|java)$' | head -10
# Check for domain indicators
[ -f "package.json" ] && echo "DETECTED: JavaScript/Node project"
[ -f "Cargo.toml" ] && echo "DETECTED: Rust project"
[ -f "setup.py" ] || [ -f "pyproject.toml" ] && echo "DETECTED: Python project"
[ -f "*.xcodeproj" ] || [ -f "Package.swift" ] && echo "DETECTED: Swift/macOS project"
[ -f "go.mod" ] && echo "DETECTED: Go project"
# Scan for available domain expertise
echo "EXPERTISE_SKILLS:"
ls ~/.claude/skills/expertise/ 2>/dev/null | head -5
Present findings before starting investigation. </context_scan>
<domain_expertise> Domain-specific expertise lives in~/.claude/skills/expertise/
Domain skills contain comprehensive knowledge including debugging, testing, performance, and common pitfalls. Before investigation, determine if domain expertise should be loaded.
<scan_domains>
ls ~/.claude/skills/expertise/ 2>/dev/null
This reveals available domain expertise (e.g., macos-apps, iphone-apps, python-games, unity-games).
If no expertise skills found: Proceed without domain expertise (graceful degradation). The skill works fine with general debugging methodology. </scan_domains>
<inference_rules> If user's description or codebase contains domain keywords, INFER the domain:
| Keywords/Files | Domain Skill |
|---|---|
| "Python", "game", "pygame", ".py" + game loop | expertise/python-games |
| "React", "Next.js", ".jsx/.tsx" | expertise/nextjs-ecommerce |
| "Rust", "cargo", ".rs" files | expertise/rust-systems |
| "Swift", "macOS", ".swift" + AppKit/SwiftUI | expertise/macos-apps |
| "iOS", "iPhone", ".swift" + UIKit | expertise/iphone-apps |
| "Unity", ".cs" + Unity imports | expertise/unity-games |
| "SuperCollider", ".sc", ".scd" | expertise/supercollider |
| "Agent SDK", "claude-agent" | expertise/with-agent-sdk |
If domain inferred, confirm:
Detected: [domain] issue → expertise/[skill-name]
Load this debugging expertise? (Y / see other options / none)
</inference_rules>
<no_inference> If no domain obvious, present options:
What type of project are you debugging?
Available domain expertise:
1. macos-apps - macOS Swift (SwiftUI, AppKit, debugging, testing)
2. iphone-apps - iOS Swift (UIKit, debugging, performance)
3. python-games - Python games (Pygame, physics, performance)
4. unity-games - Unity (C#, debugging, optimization)
[... any others found in build/]
N. None - proceed with general debugging methodology
C. Create domain expertise for this domain
Select:
</no_inference>
<load_domain> When domain selected, READ all references from that skill:
cat ~/.claude/skills/expertise/[domain]/references/*.md 2>/dev/null
This loads comprehensive domain knowledge BEFORE investigation:
Announce: "Loaded [domain] expertise. Investigating with domain-specific context."
If domain skill not found: Inform user and offer to proceed with general methodology or create the expertise. </load_domain>
<when_to_load> Domain expertise should be loaded BEFORE investigation when domain is known.
Domain expertise is NOT needed for:
Important : If you wrote or modified any of the code being debugged, you have cognitive biases about how it works. Your mental model of "how it should work" may be wrong. Treat code you wrote with MORE skepticism than unfamiliar code - you're blind to your own assumptions.
<core_principle> VERIFY, DON'T ASSUME. Every hypothesis must be tested. Every "fix" must be validated. No solutions without evidence.
ESPECIALLY : Code you designed or implemented is guilty until proven innocent. Your intent doesn't matter - only the code's actual behavior matters. Question your own design decisions as rigorously as you'd question anyone else's. </core_principle>
<quick_start>
<evidence_gathering>
Before proposing any solution:
A. Document Current State
B. Map the System
C. Gather External Knowledge (when needed)
See references/when-to-research.md for detailed guidance on research strategy.
</evidence_gathering>
<root_cause_analysis>
A. Form Hypotheses
Based on evidence, list possible causes:
B. Test Each Hypothesis
For each hypothesis:
See references/hypothesis-testing.md for scientific method application.
C. Eliminate or Confirm
Don't move forward until you can answer:
</root_cause_analysis>
<solution_development>
Only after confirming root cause:
A. Design Solution
B. Implement with Verification
C. Test Thoroughly
See references/verification-patterns.md for comprehensive verification approaches.
</solution_development>
</quick_start>
<critical_rules>
</critical_rules>
<success_criteria>
Before starting:
During investigation:
If you can't answer "yes" to all of these, keep investigating.
CRITICAL : Do NOT mark debugging tasks as complete until this checklist passes.
</success_criteria>
<output_format>
## Issue: [Problem Description]
### Evidence
[What you observed - exact errors, behaviors, outputs]
### Investigation
[What you checked, what you found, what you ruled out]
### Root Cause
[The actual underlying problem with evidence]
### Solution
[What you changed and WHY it addresses the root cause]
### Verification
[How you confirmed this works and doesn't break anything else]
</output_format>
<advanced_topics>
For deeper topics, see reference files:
Debugging mindset : references/debugging-mindset.md
Investigation techniques : references/investigation-techniques.md
Hypothesis testing : references/hypothesis-testing.md
Verification patterns : references/verification-patterns.md
Research strategy : references/when-to-research.md
</advanced_topics>
Weekly Installs
62
Repository
GitHub Stars
1.7K
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code55
opencode49
gemini-cli47
codex47
github-copilot44
cursor43
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
123,700 周安装