agentleFS
opencueopencue/cuecards/.agents/skills/trace-mcp/SKILL.md

trace-mcp

Skill10 starsChanged 4 months agoMITView on GitHub

Use trace-mcp tools for code navigation, impact analysis, and framework-aware queries instead of Read/Grep/Glob/Bash. Activate whenever the agent needs to explore, understand, or modify a codebase that has trace-mcp indexed.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 0 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Batch independent queries: Use batch when you need 2+ independent tool calls:

    line 52
  2. Very specific:

    Never read the same file twice: Use get_outline once, then get_symbol for specific pieces.

    line 60
  3. Very specific:

    Read-before-Edit optimization: When you must Read a file to edit it:

    line 62
  4. Very specific:

    Call get_outline first to find the line range of the target symbol.

    line 63
  5. Very specific:

    Read only that range with offset + limit.

    line 64
  6. Very specific:

    Call register_edit with the edited file_path to reindex just that file and invalidate caches.

    line 69
  7. Very specific:

    If the response includes _duplication_warnings, review the referenced symbols — you may be duplicating existing logic.

    line 70
  8. Very specific:

    Do not re-read the file to "verify" the edit.

    line 71
  9. Very specific:

    Call check_duplication with { name, kind } to verify no similar symbol exists.

    line 75

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

trace-mcp — Code Intelligence Routing

trace-mcp is a framework-aware code intelligence MCP server. It exposes 120+ tools that return semantic, structured results over a cross-language dependency graph. When trace-mcp is available, it is almost always cheaper and more accurate than native file tools.

When to Use

Activate this skill whenever you need to:

  • Find a function, class, method, route, component, or any symbol
  • Understand a file, module, or feature before editing
  • Determine what breaks if you change something
  • Trace a request flow, call graph, or data flow
  • Audit architecture, dead code, tests, or security

Do not use Read, Grep, Glob, or shell ls/find/cat/head/tail for exploring source code (.ts, .js, .py, .php, .go, .rb, .java, etc.). Use trace-mcp tools instead. Native tools stay allowed only for non-code files (.md, .json, .yaml, configs) or immediately before an Edit on a known file.

Start-of-Session Checklist

  1. get_project_map with summary_only=true — orient yourself to the project structure
  2. get_task_context with task: "<natural-language description>" — gather all relevant code in a single call instead of chaining search → get_symbol → Read

Decision Matrix

Tasktrace-mcp toolInstead of
Find a symbol by namesearchGrep
Understand a file before editingget_outlineRead (full file)
Read one symbol's sourceget_symbolRead (full file)
Multiple symbols + shared importsget_context_bundlechained get_symbol
What breaks if I change Xget_change_impactguessing
Who calls this / what does it callget_call_graphGrep
All usages of a symbolfind_usagesGrep
Implementations of an interfaceget_type_hierarchyGrep / ls
Classes implementing Xsearch with implements filterGrep
Tests for a symbol or fileget_tests_forGlob + Grep
Project overviewget_project_map (summary_only)Bash ls/find
Context for a taskget_task_context / get_feature_contextreading many files
HTTP request flowget_request_flowreading route + controller files
DB model relationshipsget_model_contextreading model + migrations
Component treeget_component_treereading component files
Circular dependenciesget_circular_importsmanual tracing
Dead code / dead exportsget_dead_code / get_dead_exportsGrep for unused
Project health / coverage gapsself_auditmanual inspection
Complexity / hotspotsget_complexity_report / get_risk_hotspotsguessing

Token-Efficiency Rules

  1. Batch independent queries. Use batch when you need 2+ independent tool calls:
    batch({ calls: [
      { tool: "get_outline", args: { path: "src/foo.ts" } },
      { tool: "get_outline", args: { path: "src/bar.ts" } },
      { tool: "search",      args: { query: "handleRequest", kind: "function" } }
    ]})
  2. Never read the same file twice. Use get_outline once, then get_symbol for specific pieces.
  3. Prefer get_context_bundle over chained get_symbol calls — it deduplicates shared imports.
  4. Read-before-Edit optimization. When you must Read a file to edit it:
    • Call get_outline first to find the line range of the target symbol.
    • Read only that range with offset + limit. Never read a 500-line file to edit 5 lines.
  5. Do not delegate code exploration to subagents. Agent subprocesses carry ~50k tokens of overhead before doing anything. Use trace-mcp tools in the main conversation instead.

After Editing a File

  • Call register_edit with the edited file_path to reindex just that file and invalidate caches. This is much lighter than a full reindex and keeps subsequent queries accurate.
  • If the response includes _duplication_warnings, review the referenced symbols — you may be duplicating existing logic.
  • Do not re-read the file to "verify" the edit. The Edit tool already confirmed success.

Before Creating New Symbols

  • Call check_duplication with { name, kind } to verify no similar symbol exists. Prevents reinventing existing logic.

Health Checks (Once Per Session)

  • audit_config — stale references in AGENTS.md / settings
  • self_audit — dead exports, untested code, hotspots
  • get_tech_debt — per-module tech-debt grades
  • get_optimization_report — detects repeated reads, Bash grep usage, missed trace-mcp opportunities

Related Skills

  • trace-mcp-refactoring — safe refactoring workflow (risk assessment → rename → impact check)
  • trace-mcp-codemod — bulk mechanical changes via apply_codemod
  • trace-mcp-pre-commit — security, quality-gate, and antipattern checks before commit

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.