From codesage-tools
Routes codebase retrieval through CodeSage for semantic search, symbol tracing, dependency analysis, and impact analysis. Use before edits or reviews needing structural context.
How this skill is triggered — by the user, by Claude, or both
Slash command
/codesage-tools:codesage-retrievalThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run from the repository under work:
Run from the repository under work:
test -f .codesage/index.db && codesage status
Use CodeSage only when both checks succeed. Otherwise use rg, or ask whether to onboard the repository when indexing would materially improve the task.
Resolve the repository root to an absolute path and pass that path as project on every CodeSage MCP call. Do not pass a parent workspace. For work spanning multiple repositories, make separate calls per repository. If the scope is unclear, establish the target repository before searching; never fan out across all indexed projects.
The CodeSage MCP is registered globally outside this plugin. Do not add per-project or per-tool entries to ~/.codex/config.toml. After upgrading CodeSage, start a fresh Codex thread if the current session does not expose newly added tools.
Use CodeSage for semantic and code-graph questions: behavior discovery, definitions, callers, imports, dependencies, feature ownership, blast radius, history-derived coupling, risk, and test selection.
Use rg for exact literal strings, error messages, configuration keys, test names, documentation, and generated files. Prefer the smallest query that answers the question; do not export a broad context bundle when a symbol or dependency lookup is enough.
mcp__codesage__project_overview when its combined language, freshness, feature, risk, and convention summary replaces several narrower calls.mcp__codesage__find_symbol for exact definitions and mcp__codesage__find_references for callers, imports, inheritance, and type uses.mcp__codesage__search for intent, behavior, or symptoms when the symbol name is unknown.mcp__codesage__list_features to discover mapped behavior slices and mcp__codesage__find_feature to identify the slice owning a file.mcp__codesage__feature_bundle after feature discovery when the entrypoint, owned files, tests, and context for one slice are needed together.mcp__codesage__export_context for a curated bundle around a free-form query or symbol when no mapped feature is the right anchor.mcp__codesage__list_dependencies for immediate imports and importers. Use mcp__codesage__impact_analysis before renames, broad changes, or API-contract edits to inspect downstream blast radius.mcp__codesage__find_coupling for historical co-change context. Read response.coupled; an empty list plus note can mean no history, no pair above the threshold, or a path mismatch.mcp__codesage__assess_risk for one file, mcp__codesage__assess_risk_batch for an explicit file set, and mcp__codesage__assess_risk_diff for a patch. Inspect top_symbols when present. Treat clustered directories and cycles touching the patch as evidence to investigate, not proof the patch introduced them.mcp__codesage__session_start before substantive edits when a structural baseline is useful, then mcp__codesage__session_end before completion to check for new cycles or top-risk-file drift.mcp__codesage__recommend_tests after edits to select focused tests from changed files. Run the relevant tests; recommendations are not verification.When MCP tools are unavailable, run the corresponding CLI from the target repository:
codesage overview
codesage search --limit 5 'query'
codesage find-symbol <name>
codesage find-references <name>
codesage features-list
codesage feature-for <file>
codesage feature-bundle <feature_id>
codesage export 'query'
codesage dependencies <file>
codesage impact <symbol-or-file>
codesage coupling <file> --limit 5
codesage risk <file>
codesage risk-batch <files...>
git diff --name-only | codesage risk-diff
codesage session-start
codesage session-end
git diff --name-only | codesage tests-for
If daemon startup itself is the suspected failure, run codesage mcp --direct to exercise the single-process stdio path. Do not use that diagnostic as a second persistent MCP registration.
npx claudepluginhub iliaal/codesage --plugin codesage-toolsExplores and answers questions about codebases indexed by Repowise, providing architecture overviews, symbol search, and context-aware answers.
Enables semantic code search, blast-radius analysis for refactors, risk-scored PR reviews, and health audits via local MCP server. Use for large codebases needing deep structural insights.
Semantic code search, call graph tracing, and impact analysis via codanna MCP tools. Use before grep to find code by intent and assess refactor risk.