一键导入
mcp-first-codebase-operations
Run mcp-local code exploration and impact analysis with MCP-first workflow, strict gates, and bounded fallback.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run mcp-local code exploration and impact analysis with MCP-first workflow, strict gates, and bounded fallback.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
"Browse Bitbucket Cloud repositories and pull requests, read PR diffs, and create pull requests via the {{DISPLAY_NAME}}. Triggers on: list repos/branches/PRs, view a pull request or its diff, open/create a PR. PR creation is gated and supports dryRun."
Audit SQL construction to ensure parameterized execution, anti-concatenation posture, and read-only safety.
Control DB query budget with timeout, row limits, and concurrency caps to prevent abuse and resource exhaustion.
Validate MCP contract stability for tools/list, tools/call, schemas, and backward compatibility before merge or release.
Standardize MCP errors into user-actionable vs developer/internal classes with stable codes and safe messages.
Harden MCP host/client integration with token hygiene, scope minimization, transport safeguards, and policy checks.
| name | mcp-first-codebase-operations |
| description | Run mcp-local code exploration and impact analysis with MCP-first workflow, strict gates, and bounded fallback. |
| argument-hint | Provide repoId, target symbol/file intent, and expected output (analysis, impact, re-index, DB check, or risk triage). |
postgres-mcprepoId=codebase-index-mcp or repoId=mcp-local by default for this workspace.repoId=wec.commnunication-hub only for benchmark/reference comparisons..claude/rules/mcp-hard-mode.md as policy source-of-truth for gates, blocked behaviors, and fallback rules.For any new analysis session, these 5 tools cover most tasks:
search_symbols — find any symbol by name or intentget_symbol_context_pack — full context for a symbol in one callfind_impact_files — blast radius for a changeget_change_context — callers/callees for deep traversalhealth_check + index_repository — ensure index is fresh| Intent | Use this tool | Instead of | Why |
|---|---|---|---|
| Find symbol by name | search_symbols (name) | get_symbol_context_pack | Search first to get symbolId; pack needs symbolId |
| Quick symbol + context | get_symbol_context_pack | get_change_context | Pack is one call; get_change_context needs BFS depth |
| Get callers (deep) | get_change_context | get_call_chain | get_call_chain shows path, not caller list |
| Understand a file | get_file_summary | get_file_context | Summary is lighter; use context only when you need all symbols+edges |
| Orient in module | get_folder_summary | Reading individual files | Returns per-file stats without reading content |
| Pre-refactor scoping | find_impact_files | get_dependency_graph | Impact is scoped by symbol; graph is broader and unfiltered |
| HTTP routes | route_map | find_entry_points | route_map returns HTTP verbs+paths; entry_points returns all graph entries |
| Raw SQL graph query | query_graph | structured tools | Use only when structured tools can't express the query |
All read tools support profile. Pick by session load:
| Profile | Use when |
|---|---|
nano | >15 MCP calls per session, Plan mode orientation, quick routing only |
compact | Default — most analysis tasks |
standard | Single deep query where you need all fields |
verbose | Debugging unexpected results |
For refactor tools: use nano first (no hunk content, just match count + affected files), then escalate to compact or standard to see hunk detail.
Use the smallest MCP set needed for the task and prefer focused calls with explicit limits.
health_check, list_repositories, index_repository, watch_reposearch_symbols, get_symbol_context_pack, get_change_context, get_call_chain, find_symbol_at_linefind_impact_files, get_file_summary, get_file_context, detect_changes, dead_code_scanroute_map, find_implementations, link_tests_to_sourcemcp__postgres-mcp__health_check, mcp__postgres-mcp__run_read_queryfind_entry_points or get_folder_summary).search_symbols (name first, then intent only if needed).find_impact_files and summarize with get_file_summary.health_check(repoId).list_repositories and copy exact registered repoPath.index_repository(repoId, repoPath, mode: full, docsMode: on).health_check(repoId) and report run summary.detect_changes (policy-based risk sort).find_impact_files (surface) to validate caller blast radius.link_tests_to_source (minScore >= 0.7) for coverage linkage.mcp__postgres-mcp__health_check.mcp__postgres-mcp__run_read_query with bounded limit and targeted SQL.detect_changes to prioritize impact follow-up.