save-debug-experience

save-debug-experience is a skill for Claude Code, Codex from magic3007/dotfiles. It costs 113 tokens per session (1,203 once invoked), scanned A, original, MIT.

A skill for recording the findings from a difficult debugging session in a timestamped Markdown file. It captures the problem, root cause, solution, verification, and lessons learned.

In plain words
What is it for?
Documenting tricky bugs, edge cases, failed approaches, fixes, and preventive measures under a debug_experience directory.
Why use it?
It preserves non-obvious debugging knowledge so the same issue is easier to understand and solve later.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Documenting tricky bugs, edge cases, failed approaches, fixes, and preventive measures under a debug_experience directory.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magic3007/dotfiles/save-debug-experience
Install

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.

Any agent
npx skills add magic3007/dotfiles --skill save-debug-experience
Clone the repo
git clone --depth 1 https://github.com/magic3007/dotfiles

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for save-debug-experience

README.md
[![agentmods](https://agentmods.dev/badge/skills/magic3007/dotfiles/save-debug-experience/github.svg)](https://agentmods.dev/skills/magic3007/dotfiles/save-debug-experience)
Your own site
<a href="https://agentmods.dev/skills/magic3007/dotfiles/save-debug-experience"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/save-debug-experience/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for save-debug-experience

Your own site · 80×15
<a href="https://agentmods.dev/skills/magic3007/dotfiles/save-debug-experience"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/save-debug-experience.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,203 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00113 $0.01203
Opus 5.5 $0.00045 $0.00481
Sonnet 5.5 $0.00023 $0.00241
Haiku 4.5 $0.00011 $0.00120

Measured 1mo ago against content hash a5b79abd3279, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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.

skills/save-debug-experience/SKILL.md · 112 lines

What it actually says

Save Debug Experience

调试结束后,把本次 session 的调试过程整理成带时间戳的 Markdown 文件,保存到 debug_experience/ 目录,供未来参考和团队共享。

这是手动触发的 skill:在解决完一个值得记录的问题后调用。 依赖 Claude 对当前会话的理解来智能归纳,不做机械 dump。

什么值得记录

只记录非显而易见、对未来有价值的内容:

  • 需要多次尝试才能定位的 bug
  • 文档未覆盖的特殊情况或边界条件
  • 容易再次踩的坑
  • 反直觉的根因("居然是这个原因")

工作流程

第 1 步:确定保存文件夹

按以下优先级确定目标文件夹:

  1. 用户调用时传入的路径参数(args),如 /save-debug-experience ~/myproject/debug_experience
  2. 若无参数,检查当前工作目录下是否已有 debug_experience/ 目录,有则用它
  3. 都没有,则默认用 <cwd>/debug_experience/,创建前明确告知用户

确定后用 mkdir -p <目标文件夹> 确保目录存在。

第 2 步:收集调试经历

回顾当前整个 session,重点提取:

  1. 问题:什么东西出错了?症状是什么?
  2. 根因:为什么会发生?深入到真正的原因,不只是表面现象
  3. 解决方案:最终走通的步骤,干净有序
  4. 弯路:试过但没走通的方案,以及为什么没走通(要有结论)
  5. 关键学习:这次调试中最重要的非显而易见的教训

收集时:

  • 优先从工具调用、命令输出、文件改动中提取事实,不要编造
  • 对"已验证"的结论和"推断"的结论分开表述
  • 如需确认当前状态,可运行只读命令(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 用于日常记录单次调试经验。
Changes

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.

  1. 1mo ago First seen · 112 lines · 113 tokens per session scan A a5b79abd3279

Subscribe to this mod's changes

save-debug-experience is a skill published in the GitHub repository magic3007/dotfiles (11 stars, last pushed 3d ago), licensed MIT. It adds 113 tokens to every session and 1,203 once invoked, about $0.0005 per session on Opus 5.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.

Related

Other skills, from other repositories

diagnose-ci

Investigate failing REMOTE CI runs on GitHub Actions: find the failed run, pull the failed-step logs with gh, identify the root cause (compile error, test failure, lint, missing secret, timeout), and recommend a fix. Read-only: it does not commit, push, or edit. Use when CI is red, a GitHub Actions run failed, or the…

urmzd/dotfiles · 130 tokens

triage-dotfiles-env

Playbook of known failure modes in this dotfiles stack: pipx "bad interpreter" after Python rebuilds, gpg commit-signing failures, direnv/nix shellHook running bash instead of zsh, Powerlevel10k instant-prompt warnings, and Neovim plugin errors from removed Lua APIs. Use when a shell startup error, git signing…

urmzd/dotfiles · 138 tokens

fix-and-retry

Diagnose a failing CI run, apply the code fix, commit it, push, and watch the re-run until it passes or fails -- the full fix-and-retry loop in one shot. Use after a pipeline fails and the user says "fix it and retry", "fix the CI and push", or "make CI green". Do NOT use for a read-only investigation that stops at a…

urmzd/dotfiles · 106 tokens

diagnose-runtime

Triage LOCAL runtime failures on your own machine: crashes and errors, hangs and deadlocks, slowness and high CPU/memory, and hardware/serial/USB issues. Method: reproduce, isolate (bisect, log, strace/dtruss, sample), form a hypothesis, verify the fix holds. Read-mostly: it inspects processes and logs, it does not…

urmzd/dotfiles · 171 tokens

use-next-devtools

Reference for using the NextJS Dev Tools via the nextjs-agent. Use to debug or observe Next.js framework internals.

ooloth/dotfiles · 30 tokens

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…

urmzd/dotfiles · 83 tokens