搜索

PythonReactSEOPDF
GitHub Skill

trace

TRACE (Type/Readability/Atomic/Cognitive/Essential) lens for explaining code and proposing improvements (no edits applied).

tkersey☆ 37 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Trace

Intent

Explain code by tracing what it does and scoring friction through TRACE.

Deliver actionable suggestions (file/line targets + minimal patch sketches) but do not modify files.

When to use

  • “trace it” / “what is this doing?”
  • Explain confusing control flow or hidden side effects.
  • Readability/cognitive-load feedback when you want analysis-only.
  • Refactor planning (“what would you change?”) without implementation.

Workflow

  1. Choose the slice: entrypoint, inputs, outputs, and state.
  2. Build a cognitive heat map (hotspots + surprises).
  3. Trace behavior: happy path + key failure paths; call out mutations/IO.
  4. Apply the TRACE checklist (below) to each hotspot.
  5. Propose suggested edits:
    • 1–3 smallest improvements per hotspot.
    • Include file:line targets.
    • Use short pseudo-diffs or code sketches.
  6. Stop before editing; if changes are desired, escalate to $fix.

Guardrails

  • No file edits, no commits.
  • No running commands unless explicitly requested.
  • If expected behavior is unclear/product-sensitive, stop and ask.
  • If you suspect crash/corruption risk, recommend $fix.

TRACE checklist

  • Type: make invalid states unrepresentable; eliminate “maybe” states where possible.
  • Readability: understandable in 30 seconds; names match behavior.
  • Atomic: one responsibility per unit; explicit side effects.
  • Cognitive: minimize branching, hidden dependencies, and cross-file hops.
  • Essential: keep only domain-required complexity; delete incidental ceremony.

Activation cues

  • "trace" / "walk me through" / "explain"
  • "what is this doing" / "why is this complex"
  • "readability" / "cognitive load" (analysis-only)
  • "suggest improvements" / "refactor plan"

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!