ClaudeMap

Ratchet

Typecheck your skills: a single ~5 MB Rust binary that turns CLAUDE.md, AGENTS.md and SKILL.md guardrails into deterministic rules — linting the markdown for unchecked claims, stale paths and contradictions in milliseconds, then enforcing them at tool-call time (~1.8 ms) across 9 coding-agent harnesses

SDKs & Toolingrustclihooksworkflow

Ratchet turns the prose guardrails in your guidance files into rules a machine can check. ratchet lint reads CLAUDE.md, AGENTS.md and SKILL.md like a typechecker: it flags unchecked claims (W102 — "Always use pnpm" with nothing enforcing it), stale paths and scripts (W103), broken links (W105), and contradictions across files or with your lockfile (E005, W106 — the pnpm/npm, uv/poetry, vitest/jest, biome/eslint, pytest/unittest and ruff/flake8 pairs), separating what is deterministically enforceable from what should stay prose. ratchet setup then audits history, installs rules and syncs hooks — enforcing by default, though hedged sentences like "prefer pnpm" stay capped at warn, and every rule can be demoted (ratchet demote --to warn|shadow --reason), muted locally (ratchet wrong) or paused (RATCHET=0 / ratchet off). At tool-call time (README-stated ~1.8 ms) it blocks forbidden commands, protected writes, diff patterns and skipped test runs before they execute, returning a structured reason of at most 600 bytes with the rule ID, a verbatim quote from your guidance file and a concrete fix: command; repeated denials in one session escalate to break retry loops. Nine harnesses are hooked out of the box — Claude Code, Antigravity, Codex CLI, Cursor, Gemini CLI, Amp, GitHub Copilot CLI, OpenCode and Windsurf — plus Git pre-commit and GitHub Actions CI. Everything runs offline with zero API keys; subjective taste stays plain prose, with ratchet test --models benchmarking real agents on prose scenarios offline and ratchet propose piping candidate rules through any agent CLI into a deterministic fixture verifier. Curated starter packs (git-hygiene, package-manager, secrets, ts-hygiene and more) cover common policy sets. MIT.

What it does

  • ratchet lint flags unchecked claims (W102), stale paths and scripts (W103), broken links (W105) and cross-file or lockfile contradictions (E005/W106)
  • Enforcement lands before the tool call (README-stated ~1.8 ms): blocked commands return a concrete fix: command, and repeat denials escalate to break retry loops
  • Nine harnesses wired: Claude Code, Antigravity, Codex CLI, Cursor, Gemini CLI, Amp, GitHub Copilot CLI, OpenCode, Windsurf — plus Git pre-commit and CI modes
  • Deterministic and offline: a single ~5 MB Rust binary, no API keys; hedged prose stays capped at warn instead of hard-blocking
  • Graduated control: demote with a recorded reason, mute locally with ratchet wrong, dry-run any command with ratchet try before wiring hooks
  • Starter packs (git-hygiene, package-manager, secrets, ts-hygiene) and a propose pipeline that verifies candidate rules against fixtures before installing

When to use it

Best for teams whose CLAUDE.md rules keep getting ignored — when "Always use pnpm" should actually block npm install, or when the guidance files themselves have drifted out of sync with the repo and need lint-style feedback.

Getting started

# Prebuilt release binary (Linux x86_64/arm64, macOS arm64/x86_64, SHA-256 verified):
curl -fsSL https://raw.githubusercontent.com/itsthecsguy/ratchet/main/scripts/install.sh | sh

# Or install from source via Git (Rust 1.82+):
cargo install --git https://github.com/itsthecsguy/ratchet --locked ratchet-cli

Things to know

Enforcement is deny-first by design — roll out with --level warn or --level shadow (or pick interactively during setup) before trusting hard blocks, and pause everything with RATCHET=0 or ratchet off. Deterministic rules cover four trigger classes (shell actions, protected writes, diff patterns, test freshness); subjective taste remains prose by design, benchmarked offline via ratchet test --models rather than enforced. The performance figures (~1.8 ms enforce, ~36 ms lint on a 35k-file repo), the 9-harness table and the test counts (529 unit and integration tests, 548 end-to-end checks) are the README's own claims for a brand-new repo (created 2026-11-28) — CI-badged, but young. The install script pipes a remote shell script; prefer the cargo install path if that bothers you. MIT.

Repository

itsthecsguy/ratchet

Charted

Related on the map

  • The open Agent Skills standard — SKILL.md folders any agent can load, governed by the Agentic AI Foundation since 2026-10-22.

    • official
    • spec
    • agent-skills
    • standard
  • Harness Bridge

    SDK / Tool

    A local launcher that points Claude Code and seven other coding harnesses at any OpenAI-, Anthropic- or Responses-compatible endpoint — without editing a single config file.

    • launcher
    • local-models
    • cli
    • menu-bar
  • Claude for Siri

    SDK / Tool

    Answers macOS Spotlight and Siri prompts with your signed-in Claude Code account — an experimental macOS 27 model-delegation provider.

    • macos
    • siri
    • spotlight
    • model-delegation
  • A local privacy gateway for AI coding assistants — masks credentials, connection strings and PII into structured placeholders on the way out, restores them mid-stream on the way back.

    • privacy
    • gateway
    • pii
    • proxy
  • agent-memory

    SDK / Tool

    A long-term memory runtime for AI agents: a markdown store with local ranked retrieval, shared by Claude Code and Codex CLI, no API keys.

    • memory
    • retrieval
    • markdown
    • local-first
  • Codenotch

    SDK / Tool

    A macOS notch app that shows how much of each coding assistant's usage limit you've burned — Claude Code, Cursor, Codex, and more at a glance.

    • macos
    • usage-tracking
    • monitoring
    • desktop-app