Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/magic3007/dotfiles/save-debug-experiencenpx skills add magic3007/dotfiles --skill save-debug-experiencegit clone --depth 1 https://github.com/magic3007/dotfilesWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00113 | $0.01203 |
| Opus 5 | $0.00056 | $0.00602 |
| Sonnet 5 | $0.00023 | $0.00241 |
| Haiku 4.5 | $0.00011 | $0.00120 |
Grade A, and why
save-debug-experience scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Save Debug Experience
调试结束后,把本次 session 的调试过程整理成带时间戳的 Markdown 文件,保存到
debug_experience/ 目录,供未来参考和团队共享。
这是手动触发的 skill:在解决完一个值得记录的问题后调用。 依赖 Claude 对当前会话的理解来智能归纳,不做机械 dump。
什么值得记录
只记录非显而易见、对未来有价值的内容:
- 需要多次尝试才能定位的 bug
- 文档未覆盖的特殊情况或边界条件
- 容易再次踩的坑
- 反直觉的根因("居然是这个原因")
工作流程
第 1 步:确定保存文件夹
按以下优先级确定目标文件夹:
- 用户调用时传入的路径参数(
args),如/save-debug-experience ~/myproject/debug_experience - 若无参数,检查当前工作目录下是否已有
debug_experience/目录,有则用它 - 都没有,则默认用
<cwd>/debug_experience/,创建前明确告知用户
确定后用 mkdir -p <目标文件夹> 确保目录存在。
第 2 步:收集调试经历
回顾当前整个 session,重点提取:
- 问题:什么东西出错了?症状是什么?
- 根因:为什么会发生?深入到真正的原因,不只是表面现象
- 解决方案:最终走通的步骤,干净有序
- 弯路:试过但没走通的方案,以及为什么没走通(要有结论)
- 关键学习:这次调试中最重要的非显而易见的教训
收集时:
- 优先从工具调用、命令输出、文件改动中提取事实,不要编造
- 对"已验证"的结论和"推断"的结论分开表述
- 如需确认当前状态,可运行只读命令(
git status、git log --oneline -5等)
第 3 步:按模板写入文件
用 date +%Y-%m-%d 获取日期,文件命名:YYYY-MM-DD_<kebab-case-问题描述>.md
# [问题标题]
**日期**: YYYY-MM-DD
**相关组件/模块**: [组件名称]
**状态**: 已解决 / 部分解决 / 未解决
## 问题描述
清晰描述遇到的问题——什么不工作,预期行为是什么。
## 症状与错误信息
具体的错误消息、异常行为、最小复现步骤。
## 根本原因分析
为什么会发生?深入到根因,不要只写表面现象。
## 解决方案
最终走通的干净步骤序列,可直接复现。
## 验证方法
如何确认问题已解决。
## 关键学习经验
从这次调试中得到的非显而易见的教训。
## 预防措施(可选)
如何避免类似问题再次发生。
## 弯路记录(可选)
- **试过**: <做了什么> — **结果**: <为什么没走通> — **教训**: <结论>
## 相关资源
相关代码文件、配置、文档链接等。
第 4 步:确认
写完后向用户报告:文件路径、问题状态、关键学习经验摘要(1-2 句)。不要复述全文。
安全与质量约束
- 不泄密:密钥、token、
.env内容用键名引用(API_KEY=<redacted>),绝不写明文值 - 诚实记录:状态如实标;未解决的问题在"解决方案"一节写明"尚未找到根本解决方案"
- 弯路要有结论:每条弯路都落到"教训",不写只是流水账
- 精炼:只记有价值的内容;显而易见的试错不必记
- 不覆盖:每次生成新的时间戳文件,绝不覆盖已有文件
与其他 skill 的关系
- save-pipeline-memory:关注"工作流程的固化";本 skill 关注"单个问题的调试经验"。 两者可配合:save-pipeline-memory 的"弯路与经验"里若有重要 bug,可用本 skill 单独沉淀。
- debug-experience-system:用于建立整套调试知识库体系(目录规范、团队流程等); 本 skill 用于日常记录单次调试经验。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 112 lines · 113 tokens per session scan A a5b79abd3279
save-debug-experience is a skill published in the GitHub repository magic3007/dotfiles (10 stars, last pushed 7d ago), licensed MIT. It adds 113 tokens to every session and 1,203 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
assess-quality
Foundational quality framework: the five questions (readable, easy to start, expands without bloat, consistent, intentional) every other dev skill is judged against, plus the dual-audience and workshop principles. Use when onboarding to a project, defining a quality bar, setting an assessment checklist, or arbitrating…
create-oss-skill
Create well-formed Agent Skills following the agentskills.io specification. Scaffold directories, write SKILL.md files, bundle scripts, and structure instructions for progressive disclosure. Use when creating a new skill, reviewing skill structure, optimizing a skill description, or setting up evals for skill quality.
extend-oss-skills-to-claude
Extend standard agentskills.io skills with Claude Code-specific features. Invocation control, subagent execution, dynamic context injection, string substitutions, model/effort overrides, and deployment scoping. Use when adapting a portable skill for Claude Code, adding Claude-specific frontmatter, setting up subagent…
orchestrate-agents
Orchestrate multiple agent CLIs (Claude, Codex, Antigravity) via tmux with a shared fleet store, dispatching one guardian subagent per pane. Survey-first: inspects and adopts existing tmux sessions, windows, and agent panes before creating anything new. Use when running a multi-agent session, dispatching parallel…
scaffold-project
Generates cross-language standard files (README, AGENTS.md, LICENSE, CONTRIBUTING.md, SECURITY.md, sr.yaml, .envrc, llms.txt), documentation conventions, and project structure, then dispatches to language-specific scaffolds. Use first for cross-language standard files and structure, THEN load the matching scaffold…
test-code
Testing philosophy, test types (unit, integration, golden, fuzz, property, benchmark, smoke, E2E), per-language conventions (Rust, Go, Python, TypeScript), file organization, fixtures/mocks, CI strategy, and what NOT to test. Use when writing tests, reviewing test coverage, setting up test infrastructure, or deciding…