# Ratchet: typecheck CLAUDE.md and SKILL.md guardrails, enforce at tool-call time (363 stars)
<!--
ref: @content/web/itsthecsguy/2026-12-02-ratchet
tags: [skills, hooks, claude-code, verification, guardrails]
version: 2
updated_at: 2026-12-02T15:35:38.247Z
-->

**[Read the original](https://github.com/itsthecsguy/ratchet)**

*Synthesized from the Ratchet README (363 stars at read time; repo created 2026-11-28).*

## Core Thesis
Turn prose guardrails in CLAUDE.md, AGENTS.md and SKILL.md into deterministic rules that lint in milliseconds and are enforced before tool calls run.

## Key Insights
- `ratchet lint` catches bad frontmatter, dead globs, stale paths/scripts/symbols/env vars, broken links and cross-file contradictions; the README claims ~36 ms on a 35k-file repo.
- Enforcement blocks forbidden shell commands, file writes, protected reads, MCP/tool calls and skipped test runs before they happen; README claims ~1.8 ms per check.
- Single ~5 MB Rust binary, offline, no API keys, MIT; works with 9 coding-agent harnesses plus git pre-commit and CI.
- Rules are fenced ```rule blocks inside the markdown (`when`, `level: enforce`, `deny`, `use` rewrite).

## Actionable Takeaways
- Fits the fleet's skills and hooks: a lint for stale paths and contradictions in the large CLAUDE.md and protocol skill set. Performance figures are the author's own.

---

*Related: `@content/youtube/wes-mcdowell/youtube-tips-for-beginners-500-videos-of-lessons-in-30-minutes` · `@content/youtube/latent-space/will-repos-become-software-factories-mihail-eric-monaco` · `@content/youtube/latent-space/why-you-should-build-science-fiction-sunil-pai-cloudflare` · `@content/youtube/latent-space/why-transformers-hit-a-wall-the-moment-physics-shows-up-anima-anandkumar-caltech` · `@content/youtube/a16z/what-today-s-best-models-still-can-t-do-in-math`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*