Agent skill

trace-mcp Pre-Commit Checks

by nikolai-vysotskyi in nikolai-vysotskyi/trace-mcp

Runs trace-mcp security, quality-gate and antipattern checks before a commit or pull request, and builds a symbol-level diff for the PR description.

MITAuto-check passedDevelopment

Install trace-mcp Pre-Commit Checks

skills CLI
$ npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-pre-commit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nikolai-vysotskyi/trace-mcp trace-mcp-pre-commit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nikolai-vysotskyi/trace-mcp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/trace-mcp-pre-commit .claude/skills/trace-mcp-pre-commit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
trace-mcp-pre-commit
GitHub stars
189
Token cost
~565 tokens
SKILL.md length
249 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Runs trace-mcp security, quality-gate and antipattern checks before a commit or pull request, and builds a symbol-level diff for the PR description.

  • Works in 5 steps: Security scan → Quality gates on the changed scope → Antipattern scan → …
  • About to commit or push changes in a project indexed by trace-mcp
  • SKILL.md covers When to Use, Checklist, Fix or Escalate and After Commit
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Before committing or opening a pull request in a project indexed by trace-mcp, the agent works through a checklist and fixes critical or high findings first. The checklist is a security scan of the changed scope against the OWASP Top-10, plus taint analysis when untrusted data flows are touched, quality gates on changed files only for complexity, coverage and duplication, and an antipattern scan for things like N+1 queries and inefficient iteration.

A symbol-level diff of added, removed and modified functions, changed signatures and exports serves as the basis for the PR description. For risky changes, bug prediction and risk hotspots flag files with high complexity and high churn. Critical and high findings are fixed before committing, medium ones fixed if cheap or noted in the PR, and low ones noted. After a commit in a series, changed symbols since a base ref can feed a changelog entry.

When your agent uses it

  • About to commit or push changes in a project indexed by trace-mcp
  • Opening a pull request that needs a symbol-level description of the change
  • Checking a risky change for hotspots before merging

Example prompts

  • “Commit these changes, but run the trace-mcp pre-commit checks first.”
  • “Open a PR for this branch and base the description on the symbol-level diff.”
  • “Run the security scan and quality gates on only the files I changed.”

Requirements

  • The trace-mcp MCP server connected to your agent
  • A project indexed by trace-mcp

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Security scan
  2. Quality gates on the changed scope
  3. Antipattern scan
  4. Symbol-level diff for the PR description
  5. Bug prediction (optional, for risky changes)

What it can do on your machine

Read from SKILL.md and the folder at commit 54e1404. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

trace-mcp Pre-Commit Checks loads about 565 tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 249 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~565

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from nikolai-vysotskyi/trace-mcp at commit 54e1404, republished under its MIT licence (© nikolai-vysotskyi). 249 words, ~565 tokens.

Download SKILL.mdSave it as .claude/skills/trace-mcp-pre-commit/SKILL.md (or your agent's skills folder).
name
trace-mcp-pre-commit
description
Run trace-mcp security, quality-gate, and antipattern checks before committing or opening a PR. Activate when the agent is about to create a commit or pull request in a project indexed by trace-mcp.

trace-mcp — Pre-Commit & Pre-PR Checks

Before creating a commit or opening a pull request, run the trace-mcp validation suite. Fix any critical or high findings before committing.

When to Use

  • The user asks to commit, stage, or push changes
  • The user asks to open a PR
  • The agent has finished implementing a feature or fix and is about to hand off

Checklist

1. Security scan
scan_security({ rules: ["all"] })

OWASP Top-10 vulnerability scan across the changed scope. If the change touches untrusted data flows, add:

taint_analysis({})

Trace untrusted sources to sensitive sinks (SQL, shell, file system, HTTP).

2. Quality gates on the changed scope
check_quality_gates({ scope: "changed" })

Validates complexity, coverage, duplication, and any project-configured gates on only the files you changed.

3. Antipattern scan
detect_antipatterns({})

Flags N+1 queries, eager loading, inefficient iteration, and language-specific performance footguns.

4. Symbol-level diff for the PR description
compare_branches({ branch: "current" })

Produces a symbol-level diff (functions added/removed/modified, signatures changed, exports changed). Use this as the basis for an accurate PR description instead of a raw line diff.

5. Bug prediction (optional, for risky changes)
predict_bugs({})
get_risk_hotspots({})

Flags files where the combination of high complexity and high churn makes regressions likely. If your change touches a hotspot, add extra tests.

Fix or Escalate

  • Critical / High findings: fix before committing. Do not suppress without discussion.
  • Medium findings: fix if cheap, otherwise note in the PR description.
  • Low / Info findings: note in the PR description.

After Commit

If the commit is part of a larger series, consider:

get_changed_symbols({ since: "<base-ref>" })

to generate an accurate changelog entry grounded in the symbol graph rather than commit messages.

© nikolai-vysotskyi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/trace-mcp-pre-commit of nikolai-vysotskyi/trace-mcp.

Open the folder on GitHubat commit 54e1404

Compare with similar skills

trace-mcp Pre-Commit Checks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

trace-mcp Pre-Commit Checks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
trace-mcp Pre-Commit Checks this skillnikolai-vysotskyi/trace-mcp189—~565Automated safety check: PassMIT
QA FrontendPostHog/posthog40k—~5.9kAutomated safety check: NotesCustom licence
Verdaccio Code Reviewverdaccio/verdaccio18k—~853Automated safety check: PassMIT
Bug Huntercodexstar69/bug-hunter520—~5kAutomated safety check: PassMIT
Code Review with Beads Tasksmaslennikov-ig/claude-code-orchestrator-kit260—~2kAutomated safety check: PassCustom licence
Code Review Specialist (Ukrainian)luongnv89/claude-howto42k—~484Automated safety check: PassMIT

Similar skills

  • QA Frontend

    PostHog/posthog

    Official

    Internal PostHog developer frontend/browser QA skill. An agent skill from PostHog/posthog.

    40k GitHub stars~5.9k tokensUpdated today
    DevelopmentAuto-check: notes
  • Verdaccio Code Review

    verdaccio/verdaccio

    Reviews a verdaccio diff, branch or PR against the repository's review guide, verifies each finding in the code and reports only actionable issues.

    18k GitHub stars~853 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Bug Hunter

    codexstar69/bug-hunter

    Precision-first adversarial bug hunting for runtime, logic, data, concurrency, and security defects.

    520 GitHub stars~5k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Code Review with Beads Tasks

    maslennikov-ig/claude-code-orchestrator-kit

    Reviews staged changes, a branch, a PR or a path for bugs, security gaps and performance issues, then writes an evidence-based report and creates Beads tasks.

    260 GitHub stars~2k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed
  • Code review covering security, performance, quality and maintainability, with a fixed report layout and two analysis scripts; the SKILL.md itself is in Ukrainian.

    42k GitHub stars~484 tokensUpdated 10 days ago
    DevelopmentAuto-check passed
  • Simplify And Harden CI

    pskoett/pskoett-ai-skills

    CI-only Simplify & Harden workflow for pull requests using gh-aw (GitHub Agentic Workflows).

    315 GitHub stars~1.1k tokensUpdated 5 days ago
    DevelopmentAuto-check passed

More from nikolai-vysotskyi/trace-mcp

  • Trace MCP

    nikolai-vysotskyi/trace-mcp

    Use trace-mcp tools for code navigation, impact analysis, and framework-aware queries instead of Read/Grep/Glob/Bash.

    189 GitHub stars~1.6k tokensUpdated today
    Auto-check: notes
  • trace-mcp Codemods

    nikolai-vysotskyi/trace-mcp

    Replaces repeated hand edits with the trace-mcp apply_codemod tool, previewing matches in a dry run before bulk mechanical changes across one file or many.

    189 GitHub stars~729 tokensUpdated today
    Auto-check passed
  • Trace-MCP Refactoring

    nikolai-vysotskyi/trace-mcp

    Refactors code safely in projects indexed by trace-mcp: assess risk, find candidates, check impact and rename symbols across every file without missing a reference.

    189 GitHub stars~672 tokensUpdated today
    Auto-check passed
  • trace-mcp Code Navigation

    nikolai-vysotskyi/trace-mcp

    Routes code exploration through trace-mcp's indexed dependency graph, using symbol search, outlines, call graphs and change-impact tools instead of Read, Grep and Glob.

    189 GitHub stars~354 tokensUpdated today
    Auto-check passed

Questions about trace-mcp Pre-Commit Checks

What does trace-mcp Pre-Commit Checks do?

Runs trace-mcp security, quality-gate and antipattern checks before a commit or pull request, and builds a symbol-level diff for the PR description. Before committing or opening a pull request in a project indexed by trace-mcp, the agent works through a checklist and fixes critical or high findings first. The checklist is a security scan of the changed scope against the OWASP Top-10, plus taint analysis when untrusted data flows are touched, quality gates on changed files only for complexity, coverage and duplication, and an antipattern scan for things like N+1 queries and inefficient iteration.

When should I use trace-mcp Pre-Commit Checks?

trace-mcp Pre-Commit Checks fits situations like: about to commit or push changes in a project indexed by trace-mcp; opening a pull request that needs a symbol-level description of the change; checking a risky change for hotspots before merging.

How do I install trace-mcp Pre-Commit Checks in Claude Code?

Run `npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-pre-commit -a claude-code`. Or copy the skill folder (skills/trace-mcp-pre-commit in nikolai-vysotskyi/trace-mcp) into .claude/skills/trace-mcp-pre-commit in your project. Claude Code loads it when a task matches its description.

How do I install trace-mcp Pre-Commit Checks in Codex?

Run `npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-pre-commit -a codex`. Or copy the skill folder (skills/trace-mcp-pre-commit in nikolai-vysotskyi/trace-mcp) into .agents/skills/trace-mcp-pre-commit in your project. Codex loads it when a task matches its description.

Can I use trace-mcp Pre-Commit Checks in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-pre-commit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trace-mcp-pre-commit, .gemini/skills/trace-mcp-pre-commit, .github/skills/trace-mcp-pre-commit and .opencode/skills/trace-mcp-pre-commit in your project.

What does trace-mcp Pre-Commit Checks need to run?

SKILL.md names no scripts, command-line tools or credentials: trace-mcp Pre-Commit Checks is instructions for the agent only. Our summary lists: The trace-mcp MCP server connected to your agent; A project indexed by trace-mcp.

Does trace-mcp Pre-Commit Checks access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is trace-mcp Pre-Commit Checks safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does trace-mcp Pre-Commit Checks use?

trace-mcp Pre-Commit Checks is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does trace-mcp Pre-Commit Checks use?

About 565 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to trace-mcp Pre-Commit Checks?

Skills that share tags, products or a category with trace-mcp Pre-Commit Checks: QA Frontend (PostHog/posthog, 40k stars), Verdaccio Code Review (verdaccio/verdaccio, 18k stars), Bug Hunter (codexstar69/bug-hunter, 520 stars) and Code Review with Beads Tasks (maslennikov-ig/claude-code-orchestrator-kit, 260 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains trace-mcp Pre-Commit Checks?

nikolai-vysotskyi (a GitHub user) maintains it in nikolai-vysotskyi/trace-mcp, which has 189 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 10, 2026.

Source: nikolai-vysotskyi/trace-mcp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.