MCP prompt patterns¶
Prompt patterns¶
Good prompts include scope, goal, and constraint:
Health check
Use codeclone MCP to analyze this repository.
Give me a concise structural health summary and the top findings to look at first.
Changed-files review
Use codeclone MCP in changed-files mode for my latest edits.
Focus only on findings that touch changed files and rank them by priority.
Gate preview
Run codeclone through MCP and preview gating with fail_on_new.
Explain the exact reasons. Do not change any files.
AI-generated code check
I added code with an AI agent. Use codeclone MCP to check for new structural drift.
Separate accepted baseline debt from patch-local before/after regressions.
Best practices
- Use
analyze_changed_pathsfor PRs, not full analysis. - Prefer
get_run_summaryorget_production_triageas the first pass. - Prefer
list_hotspotsor narrowcheck_*tools before broadlist_findings. - Use
get_finding/get_remediationfor one finding instead of raisingdetail_levelon larger lists. - Pass an absolute
root— MCP rejects relative roots like.. - Use
coverage_xmlonly withanalysis_mode="full". - Use
source_kind="production"(ortests,fixtures,mixed,other) to cut test/fixture noise. - Use
mark_finding_reviewed+exclude_reviewed=truein long sessions.