DevTrace

DevTrace is a skill for Claude Code, Codex from kings0527/agent-skills. It costs 0 tokens per session (3,498 once invoked), scanned A, original, MIT.

An engineering decision framework for software architecture, technology choices, code reviews, refactoring, technical debt, and project risks. It examines dependency structure, abstraction layers, uncertainty, limits, and interactions before suggesting a change.

In plain words
What is it for?
Use it when deciding whether to introduce a dependency, split a service, refactor code, change an interface, assess release risk, or choose between technical approaches.
Why use it?
It reduces the risk of making a local code change that breaks dependent services or crosses an important system boundary. When information is missing, it favors asking for context and stating conditions instead of guessing.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/kings0527/agent-skills/devtrace
Any agent
npx skills add kings0527/agent-skills --skill devtrace
Clone the repo
git clone --depth 1 https://github.com/kings0527/agent-skills

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 DevTrace

README.md
[![agentmods](https://agentmods.dev/badge/skills/kings0527/agent-skills/devtrace.svg)](https://agentmods.dev/skills/kings0527/agent-skills/devtrace)
Your own site
<a href="https://agentmods.dev/skills/kings0527/agent-skills/devtrace"><img src="https://agentmods.dev/badge/skills/kings0527/agent-skills/devtrace.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,498 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.03498
Opus 5 $0.00000 $0.01749
Sonnet 5 $0.00000 $0.00700
Haiku 4.5 $0.00000 $0.00350

Measured 4d ago against content hash cf101ceb9ec8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

DevTrace 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 4d 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.

DevTrace/SKILL.md · 216 lines

How it starts

The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DevTrace 技术决策五算子(Agent Skill)

skill_name: DevTrace_Technical_Decision_Framework version: 1.1 定位: 给 Agent 增加"综合开发/架构判断能力"的决策自检框架(偏工程落地,不强制量化) 适用场景: 架构决策、技术选型、代码审查、重构方案评估、技术债务评估、项目风险预判 触发条件(自动启用): 当用户讨论"要不要做/怎么做/选哪个/改动影响/风险如何/能否上线/是否重构/是否拆分/是否引入依赖"等技术决策时启用 核心约束: 不凭空臆测。信息不足时先追问;若必须回答,用"条件化结论 + 前置条件"表达。


0. Skill 行为准则(Agent Operating Rules)

  1. 先画拓扑再谈方案:任何建议先说明影响范围、关键路径、故障域。
  2. 先守边界再谈优化:先检查抽象边界/契约是否被破坏,再谈实现细节。
  3. 默认可逆:优先推荐可灰度、可回滚、可旁路、可降级的方案。
  4. 默认先问缺口:如果缺少关键上下文,先问最小问题集;否则输出"需要补充的信息"。
  5. 红线触发就否决:任一算子出现"高风险且无可行缓解"必须输出"不建议实施"或"需先解决前置条件"。

1️⃣ 拓扑(Topology)——结构算子

核心定义

这不是孤立的代码,是依赖网络中的一个节点——改动它,依赖图会传导;依赖图变了,它会失效。

需要关注的工程问题

  • 调用链深度:影响直接下游/间接下游/是否可能级联雪崩?
  • 数据流向:是数据源(SSOT)还是数据汇(Consumer)?改动会污染、断裂、还是扩散?
  • 故障域边界:故障可隔离在进程/容器/服务/集群?是否会跨边界扩散?
  • 循环依赖/隐性耦合:是否形成 A→B→C→A,或"共享DB/共享缓存/共享配置"的隐性环?

默认追问(信息不足时至少问其中3个)

  • 变更发生在哪:服务/模块/仓库/接口/表/队列/定时任务?
  • 关键入口是什么(API/消息/批任务)?关键出口是什么(DB/外部服务)?
  • 同步调用还是异步事件?超时/重试/熔断策略是什么?
  • 故障时如何降级:返回兜底/跳过步骤/排队/人工介入?
  • 是否属于关键路径(支付/登录/下单/结算等)?

必出产物(输出中必须出现)

  • 拓扑图(文字描述):节点+边+关键路径+故障传播点(见输出模板)

2️⃣ 抽象(Abstraction)——分层算子

核心定义

你写的代码是接口还是实现?稳定层在哪,易变层在哪?——混淆层级是技术债务的主要源头。

需要关注的工程问题

  • Leaky Abstraction:抽象是否泄漏实现细节(ORM/框架/云厂商细节渗透到业务层)?
  • 依赖倒置:高层策略是否依赖低层细节?能否依赖接口/契约?
  • 正交性:变更是横向跨模块(容易扩散)还是纵向穿层(容易破坏边界)?
  • API 契约:对外暴露的是稳定承诺还是临时实现?是否有版本策略?

默认追问

  • 对外契约是什么:API/事件schema/表结构/配置字段?
  • 是否允许破坏性变更?有没有版本兼容策略(v1/v2、双写、双读)?
  • 上层代码是否出现基础设施细节(SQL方言、SDK对象、云服务特性)?
  • 是否出现"上帝类/上帝函数"跨层协调所有事情?

典型反模式提示(用于代码审查/方案评估)

  • 业务层直接拼SQL、直接依赖云SDK类型、直接跨服务读写别人的数据库
  • 为了"快"把基础设施对象一路透传到Controller/Domain
  • 以"内部接口"为名实际对外扩散,后续无法演进

3️⃣ 熵增(Entropy)——腐烂算子

核心定义

代码天然在腐烂——你要评估的不是"现在能跑",而是"6个月后维护它的痛苦程度"。

需要关注的工程问题(不强制量化)

  • 可维护性半衰期:新成员6个月后能否理解?是否依赖隐式知识?
  • Bug Surface:复杂度、影响范围、新颖度叠加后的缺陷暴露面
  • 技术债利息:现在省下的时间,将来以排障/返工/上线风险的形式偿还
  • Bus Factor:关键知识是否集中在少数人?

默认追问

  • 这段改动是否有自动化测试覆盖?(单测/集成/回归)
  • 可观测性如何:日志、指标、trace 是否能定位问题?
  • 是否存在 TODO/FIXME、临时开关、手工步骤、隐式约定?
  • 谁维护/谁值班?关键人是否单点?

Read the full file on GitHub · 216 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 216 lines · 0 tokens per session scan A cf101ceb9ec8

Subscribe to this mod's changes

DevTrace is a skill published in the GitHub repository kings0527/agent-skills (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,498 tokens. 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens