Borrowing it
Nothing to install: this file belongs to opencue/cuecards. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/opencue/cuecards/main/.agents/skills/trace-mcp-refactoring/SKILL.mdgit clone --depth 1 https://github.com/opencue/cuecardsWrote 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.
[](https://agentmods.dev/skills/opencue/cuecards/trace-mcp-refactoring)<a href="https://agentmods.dev/skills/opencue/cuecards/trace-mcp-refactoring"><img src="https://agentmods.dev/badge/skills/opencue/cuecards/trace-mcp-refactoring.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00039 | $0.00652 |
| Opus 5 | $0.00019 | $0.00326 |
| Sonnet 5 | $0.00008 | $0.00130 |
| Haiku 4.5 | $0.00004 | $0.00065 |
Grade A, and why
trace-mcp-refactoring 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 3d 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.
This is a copy
100% identical to trace-mcp-refactoring — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.
trace-mcp — Refactoring Workflow
Use this skill whenever you are about to rename, restructure, extract, or otherwise refactor code in a project indexed by trace-mcp. The goal is to never break cross-file references and never guess at what is affected.
When to Use
- Renaming a class, function, method, variable, or file
- Extracting a function or method
- Restructuring a module or splitting a file
- Changing a function signature
- Any change that touches more than one call site
Refactoring Workflow
1. Assess before touching anything
assess_change_risk({ file_path: "src/foo.ts" })
# or
assess_change_risk({ symbol_id: "<id>" })
This returns the risk level of the target change based on churn, complexity, fan-in/fan-out, and test coverage. Use it to decide whether to proceed, add tests first, or split the change.
2. Find what actually needs refactoring
get_refactor_candidates()
Do not guess. This surfaces high-complexity, high-churn, and anti-pattern-laden symbols that are the real refactor targets.
3. Know what will break
get_change_impact({ symbol_id: "<id>" })
Returns the reverse-dependency graph: every file, symbol, and test that depends on the target. Review this list before editing.
4. Quantify complexity
get_complexity_report({ file_path: "src/foo.ts" })
Gives you a baseline so you can verify the refactor actually reduced complexity.
Renaming a Symbol — MANDATORY Flow
Never rename with Edit and replace_all. It silently misses import sites, re-exports, type references, and cross-file usages.
# 1. Collision detection first
check_rename({ symbol_id: "<id>", target_name: "newName" })
# 2. Apply rename across ALL files (definition + every reference)
apply_rename({ symbol_id: "<id>", new_name: "newName" })
apply_rename updates the definition, imports, re-exports, call sites, JSX usages, and tests in one atomic operation.
Extracting a Function
extract_function({
file_path: "src/foo.ts",
start_line: 42,
end_line: 67,
new_name: "computeTotals"
})
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.
- 3d ago First seen · 87 lines · 39 tokens per session scan A 8cb8a409b09b
trace-mcp-refactoring is a skill published in the GitHub repository opencue/cuecards (5 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 652 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to trace-mcp-refactoring, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
autofix
Review and repair current local changes until they converge, or run Qwen Code Autofix issue and review workflows from GitHub Actions.
atomic-debug
Hypothesis-driven debugging skill. Use when a bug, test failure, crash, or unexpected behavior is reported. Auto-trigger on error pastes or "broken/doesn't work/failing" language. Explicit invocation: /atomic-debug. Output: symptom statement → hypothesis table → cheapest test first → root cause. No symptom-patching.…
code-review
Review code changes for concrete defects.
atomic-review
Compressed code review comments. Cuts noise from PR feedback while preserving the actionable signal. Each comment is one line: location, problem, fix. Use when user says "review this PR", "code review", "review the diff", or invokes /atomic-review. Auto-triggers when reviewing pull requests.
assess-findings
Triage static analysis findings, grade them against recorded decisions, and accept noise or irrelevant items.
system-health
Suggest whether the machine needs a DISK or MEMORY cleanup — and catch the case where Heimdall ITSELF is the hog (runaway orphaned python from the presence keeper). Use when the machine is slow / swapping / laggy, disk or "System Data" is full, memory is exhausted, at the start of a long session, or when the user asks…