Skip to content

Claude Code self-check before committing

Claude Code can use Maina’s MCP tools to verify its own work before committing.

  1. Ensure MCP is configured

    maina init creates .claude/settings.json automatically. Or add manually:

    .claude/settings.json
    {
    "mcpServers": {
    "maina": { "command": "maina", "args": ["--mcp"] }
    }
    }
  2. Add instructions to CLAUDE.md

    CLAUDE.md
    Before committing, always:
    1. Call `verify` to run the full verification pipeline
    2. Call `checkSlop` on changed files
    3. Call `reviewCode` with your diff
    4. Fix any findings before committing
  3. Use maina commit instead of git commit

    Tell Claude Code to use maina commit — it runs verification automatically and only commits if everything passes.