by itsthecsguy
Typecheck your skills. Turn CLAUDE.md, AGENTS.md, and SKILL.md guardrails into deterministic rules across coding-agent harnesses.
# Add to your Claude Code skills
git clone https://github.com/itsthecsguy/ratchetGuides for using ai agents skills like ratchet.
Last scanned: 11/30/2026
{
"issues": [
{
"file": "README.md",
"line": 74,
"type": "remote-install",
"message": "Install command (remote install script piped to a shell — review the source before running): \"curl -fsSL https://raw.githubusercontent.com/itsthecsguy/ratchet/main/scripts/in\"",
"severity": "low"
}
],
"status": "PASSED",
"scannedAt": "2026-11-30T14:55:52.441Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}See how ratchet compares with popular alternatives.
ratchet is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by itsthecsguy. Typecheck your skills. Turn CLAUDE.md, AGENTS.md, and SKILL.md guardrails into deterministic rules across coding-agent harnesses. It has 131 GitHub stars.
Yes. ratchet passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/itsthecsguy/ratchet" and add it to your Claude Code skills directory (see the Installation section above).
ratchet is primarily written in Rust. It is open-source under itsthecsguy on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh ratchet against similar tools.
No comments yet. Be the first to share your thoughts!
From $49 · 30 days · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM lists this project for discovery and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
Typecheck your skills. Turn CLAUDE.md, AGENTS.md, and SKILL.md guardrails into deterministic rules that lint in milliseconds and enforce at tool-call time (~1.8 ms) — across every coding agent you use.
ratchet lint) — catches unchecked claims (W102), stale paths/scripts (W103), broken links (W105), and cross-file or lockfile contradictions (E005, W106) in ~36 ms on a 35k-file repo.~1.8 ms) — blocks forbidden commands, protected writes, diff patterns, and skipped test runs before they happen, returning a concrete fix: command to the agent.## pnpm-only
Always use pnpm. Never use npm, npx or yarn.
```rule
when: run
level: enforce
deny: npm *, npx *, yarn *
use: npx => pnpm dlx {{args}}
say: This repo uses pnpm; {{program}} would write a second lockfile.
ok: pnpm install
bad: npm install
```
No LLM is involved in enforcement. Ratchet hooks directly into your coding agent's native lifecycle hooks (PreToolUse, PostToolUse, Stop):
Your CLAUDE.md / AGENTS.md / SKILL.md
│
▼ ratchet setup (compiles rules + wires native hooks)
Agent tries: Bash("npm test")
│
▼ harness pauses BEFORE execution and pipes JSON to `ratchet`
ratchet (5 MB Rust binary, ~1.8 ms, 100% offline, zero API calls)
• lexes the shell command deterministically (even inside `sh -c`, pipes, env prefixes)
• matches against your rules -> returns `deny` + `fix: pnpm test`
│
▼ command never executes; harness hands the error back to the model
Agent self-corrects: Bash("pnpm test") -> allowed
Rules support four enforcement levels (shadow < warn < ask < enforce):
enforce (default): blocks violations before execution and gives the agent a concrete fix: command. Need a one-time exception without turning the rule off? Run ratchet approve (or !ratchet approve in Claude Code) to allow that exact command once.ask: pops the harness's native interactive [Allow once / Deny] confirmation prompt on Claude Code and Cursor (and falls back to deny + ratchet approve on binary allow/deny harnesses).warn: shows a user-visible warning without blocking.shadow: logs hits silently so you can measure before enforcing.# 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
# Update anytime to the latest release (SHA-256 verified, atomic swap):
ratchet update
# Or install from source via Git (Rust 1.82+):
cargo install --git https://github.com/itsthecsguy/ratchet --locked ratchet-cli
# Or from a local checkout:
cargo install --path crates/ratchet-cli
$ ratchet lint
CLAUDE.md:3:3: warning[W102]: unchecked claim: "Always use `pnpm`, never `npm` or `yarn`."
hint: enforceable as `pnpm-only` (when: run / deny: npm, npx, yarn)
CLAUDE.md:5:21: warning[W105]: broken link `docs/legacy-auth.md` does not exist
hint: fix the path or remove the broken link/include
Claim split: 1 enforceable (deterministic hooks), 2 prose/judgment (keep as prose; eval with `ratchet test --models`).
0 rules, 0 examples run, 1 unchecked claim, 0 stale references, ~41 always-loaded tokens.
$ ratchet setup
Detected: 1 guidance file · pnpm · harnesses: claude (CLAUDE.md)
Audit: 0 historical hits across 0 commits and 0 sessions.
Install 6 new rules (enforce) and sync hooks for claude?
[Enter] enforce [w] warn [s] shadow [n] abort >
Wrote 6 rules to .ratchet/checks.yaml (enforce).
Setup complete: 6 rules installed (enforce), 37 fixtures passed, hooks synced for claude.
Enforcing by default. Downgrade any rule: `ratchet demote <id> --to warn|shadow --reason "..."` (or `ratchet wrong <id>` to mute locally).
Pass --level warn or --level shadow for non-blocking rollout, --inline to embed ```rule blocks directly into markdown, and --git-hook --ci to wire pre-commit and GitHub Actions.
$ ratchet try "npm install lodash"
enforce pnpm-only This repo uses pnpm; npm would write a second lockfile.
fix: pnpm install lodash
deny (dry-run — would block tool call; command not executed; 1 rule matched: 1 enforce · 0 warn · 0 shadow)
$ ratchet try "pnpm add lodash"
allow (no rules matched) [dry-run — command not executed]
ratchet setup and ratchet sync auto-detect harnesses in your repo or on PATH (or target explicitly with --harness <name|all>). Ratchet-created hook files are locally excluded in .git/info/exclude and cleanly removed by ratchet uninstall.
Harness (--harness) |
Hook / Plugin File | PreToolUse | PostToolUse | Stop / Finish | test --models |
|---|---|---|---|---|---|
Claude Code (claude) |
.claude/settings.local.json |
Deny / Warn | Yes | Block | claude[:model][@effort] |
Antigravity (antigravity, agy) |
.agents/hooks.json |
Deny | Yes | Continue | agy[:model] |
Codex CLI (codex) |
.codex/hooks.json |
Bash + apply_patch |
Yes | Block | codex[:model][@effort] |
Cursor (cursor) |
.cursor/hooks.json |
Shell + Write | Yes | Follow-up | cursor[:model] |
Gemini CLI (gemini) |
.gemini/settings.json |
Deny / Warn | Yes | AfterAgent |
gemini[:model] |
Amp (amp) |
.amp/plugins/ratchet.ts |
tool.call |
tool.result |
agent.end |
amp[:model|smart|rush] |
GitHub Copilot CLI (copilot) |
.github/hooks/ratchet.json |
Deny | Yes | agentStop |
copilot[:model] |
OpenCode (opencode) |
.opencode/plugins/ratchet.ts |
tool.execute.before |
tool.execute.after |
ratchet check / CI* |
opencode[:provider/model] |
Windsurf (windsurf) |
.windsurf/hooks.json |
Deny (exit 2) | post_run_command |
ratchet check / CI* |
.ratchet/models.yaml |
*OpenCode and Windsurf enforce pre/post tool calls natively; finish/commit rules run via ratchet check and CI. Any custom LLM CLI can be added via .ratchet/models.yaml.
warn). Choose [w] warn or [s] shadow interactively during ratchet setup (or pass --level warn|shadow), lower any rule later with ratchet demote <id> --to warn|shadow --reason "...", mute locally in one command with ratchet wrong <id>, or pause hooks with RATCHET=0 / ratchet off.fix: command so it self-corrects immediately. If a model retries the same denied action in the same session, Ratchet escalates (Blocked again (attempt #N)... Do not retry) to break retry loops.ratchet propose --prompt | claude -p | ratchet propose --stdin
when: run), protected writes (when: write), diff patterns (when: commit), and test freshness (when: finish) enforce deterministically in ~1.8 ms. Subjective taste stays plain prose; ratchet lint separates the two explicitly, and ratchet test --models benchmarks real models on prose scenarios offline.E005 catches rule/example/fix:/finish conflicts and W106 catches cross-file and lockfile contradictions (pnpm/npm, uv/poetry, vitest/jest, biome/eslint, pytest/unittest, ruff/flake8). ratchet git-hook install also runs ratchet lint on staged guidance files in git pre-commit.| Command | Purpose |
|---|---|
ratchet setup [--level enforce|ask|warn|shadow] [--inline] [--git-hook] [--ci] [--yes] |
One-command onboarding: audit, install rules, sync hooks, run fixture self-test. |
ratchet lint [PATH...] [--fix [--rules]] [--strict] [--all] [--json] |
Typecheck skills (E001–E005, W101–W107) and optionally auto-fix / insert rule blocks. |
ratchet try [--write <PATH>] [--json] <COMMAND> |
Instant dry-run (~2 ms) against loaded rules without executing or modifying anything. |
| `ratchet propose --prompt | --stdin | --file [--level ...] |