trace-mcp Pre-Commit & Pre-PR Checks
Makes the agent run trace-mcp's security, quality-gate, and antipattern checks before every commit or pull request.
What it does
Whenever you ask to stage, commit, push, or open a PR, the agent runs the trace-mcp validation suite first instead of committing blindly.
scan_security({ rules: ["all"] })for an OWASP Top-10 scan, plustaint_analysisto trace untrusted sources into SQL, shell, filesystem, and HTTP sinkscheck_quality_gates({ scope: "changed" })for complexity, coverage, and duplication gates on changed files onlydetect_antipatternsfor N+1 queries, eager loading, and inefficient iterationcompare_branchesfor a symbol-level diff (functions added/removed, signature and export changes) as the basis of an accurate PR descriptionpredict_bugsandget_risk_hotspotsfor risky changes in high-churn, high-complexity files
It also sets triage rules: fix Critical/High before committing, fix Medium if cheap, document Low/Info in the PR.
Who it's for
- Developers who let Claude Code write code and then commit or open PRs immediately
- Teams that want security and quality issues caught before human review
- Anyone who wants PR descriptions and changelogs grounded in real code changes rather than commit messages
Examples
- "Commit these changes" → the agent runs a security scan and changed-scope quality gates, fixes High findings, then commits.
- "Open a PR" →
compare_branchesproduces a symbol-level change list used to write the PR body. - Touching a payment or auth module →
get_risk_hotspotsflags it as a hotspot, so extra tests are added.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/nikolai-vysotskyi/trace-mcp/HEAD/skills/trace-mcp-pre-commit/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/trace-mcp-pre-commit folder from the GitHub repo nikolai-vysotskyi/trace-mcp into my ~/.claude/skills/trace-mcp-pre-commit/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/nikolai-vysotskyi/trace-mcp.git /tmp/trace-mcp && mkdir -p ~/.claude/skills && cp -r /tmp/trace-mcp/skills/trace-mcp-pre-commit ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Install the trace-mcp MCP server and index your project first (see the repo README). The skill does nothing without it.
- Clone the repository:
git clone https://github.com/nikolai-vysotskyi/trace-mcp.git /tmp/trace-mcp - Create the skills directory:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r /tmp/trace-mcp/skills/trace-mcp-pre-commit ~/.claude/skills/ - Restart Claude Code and ask it to "commit my changes" to confirm the check suite runs automatically.
- If it doesn't trigger, run
/mcpto verify the trace-mcp connection and that the project is indexed.