ForgeKit: the safety and verification layer for AI coding agents

ForgeKit works around the coding agents you already use: Claude Code, Codex, Cursor, Gemini CLI,
Copilot, Kimi Code, OpenCode, Zed and more. It stops an invented package or a leaked secret before it
lands, keeps what your team learns in the repository so every agent sees it, and runs your real
tests before anyone calls a change done. One Node CLI, zero runtime dependencies, plain files in
git, MIT licensed.
60-second quickstart
See it work first. The demo makes its own throwaway project, so it changes nothing of yours:
npm install -g @codewithjuber/forgekit
forge demo # a test passes, a one-line change breaks it, forge verify catches it, the fix passes
Then turn it on in your repository:
forge init # set up the agents this repo uses, from one shared rulebook
forge doctor # check hooks, providers and MCP wiring (--fix repairs)
forge impact <symbol> # which files will this edit probably touch?
forge verify # run the tests on this exact tree: PASS, FAIL or INCOMPLETE
On Claude Code you can install the plugin instead:
/plugin install forgekit --marketplace CodeWithJuber/forgekit. Every install path, and what
forge init changes on your machine, is in Setup details.
What it catches
- A package that does not exist. Agents invent dependency names, and attackers register
them (slopsquatting). The dep-gate hook checks install commands and manifest edits in nine
ecosystems and blocks a name that is not on its registry or that OSV lists as malicious.
forge vet <name> runs the same check by hand.
- A secret in a commit.
forge precommit refuses a staged change with a credential-shaped
value, and a redaction hook scrubs secrets from tool output.
- An MCP server that quietly changes its tools.
forge sources probe <id> pins a SHA-256
digest of a server's tool list and fails when the surface changes, a direct check against
tool poisoning and rug-pull updates.
- "Done" with no passing tests.
forge verify runs the suites your repository already has
and binds the verdict to the exact tree it ran on. On Claude Code a completion gate stops a
session that moved code without test evidence.
- The bug the agent fixed last month and brought back.
forge remember and the ledger keep
lessons in the repository, with references to their evidence, and teammates get them by
pulling.
- A team of agents that costs more than it is worth.
forge team ladder grades a team
against independent agents spending the same tokens. It has to beat one agent, then a
majority vote, then best-of-n. Team plans give each agent different facts to forward to the
lead, because a team of agents that know the same things is not smarter.
- The same failure, again, next week.
forge guides turns a failure into a scoped rule.
A round admits a candidate playbook only when GUARD's gate (Google Cloud, arXiv 2611.23476)
shows its gain on a buffer of tasks outweighs its regressions. Mastered rules are pinned so
automation cannot rewrite them, and admitted rules reach AGENTS.md on forge sync.
forge harness stats adds trip wires that fire when cost, tokens, tool calls, repairs,
denials, JSON repairs or failures drift from their baseline.
- A trend brief built on a viral rumor.
forge research recent "<topic>" counts only dated
reports and collapses copies of one origin into a single provenance chain. Support is
noisy-OR corroboration over independent chains, with reliability earned from recorded
outcomes, and popularity is never counted as evidence. Contested, superseded and unverified
stories are labelled as such.
- An agent that grades its own app and always passes.
forge sprint runs a three-agent
harness. A planner writes the spec, a generator builds one sprint against a contract the
evaluator agreed, and the evaluator tests the running app. The gate refuses a grade from
anyone but the evaluator, or for code that changed since the hand-off. Any score under the
bar fails the sprint, and time and spend are tracked against a budget.
- Build and test logs that fill the context window.
forge squeeze -- <command> keeps every
error, failing test and summary, and folds the progress bars, repeats and passing tests.
On its fixtures that saves 81–99% of tokens, and the command's exit status passes through.
- A scrape that can't say where a claim came from.
forge crawl <url> --goal "<terms>"
obeys robots.txt and Crawl-delay, and fetches the links that best match the goal first. It
keeps each page's main content by text density and stamps every page with its final URL and
the SHA-256 of the bytes. Instruction-like text is flagged, and a public crawl never touches
a private address.
- An agent config nobody reviewed.
forge scan --config audits the settings your agents
already run with: a Bash(*) allow, bypass mode, a hook that pipes a download into a shell,
an unpinned npx -y MCP server, a literal token in env. Each finding points at the exact
entry and names the fix, and it exits 2 when one is critical.
- "What did the agents actually do this month?"
forge recap counts it from the records
on disk: spend and sessions, commits, verify verdicts, harness runs and trip wires, sprint
grades, lessons and earned guides. Each number is set against the month before, or shown as
n/a when there is no record, never a guess.
- Skills that cost tokens on every turn.
forge skill-audit measures what each skill costs
to carry: its description on every turn, its body on each trigger. It names the sections an
oversized body should move to references/, and the paragraphs repeated across skills. It
also flags descriptions too vague to route on, each with an estimated saving.
- The same memory paid for every session, relevant or not.
forge memory puts a decision
in each memory layer: what enters the context window, which past session is replayed, whether
a fact is worth storing, which repeated verified work becomes a skill, and what is archived.
Each is asked of Jev (TypeSafe System One) with a probability; without a key the existing
rule decides, unchanged. forge memory admit "<task>" measures full memory against what was
admitted.
- The rename that broke files nobody opened.
forge impact <symbol> lists the files an edit
will probably touch, including coupled ones you did not name. It is a heuristic, so an empty
answer means "unknown", not "safe".
These checks run as hooks, not as text in a prompt, so they still apply after a context
compaction. forge hooks on writes the same wiring into the repository for Claude Code, Codex,
Gemini CLI, Cursor and Copilot, so a teammate's agent and CI run them too.
ForgeKit does not ask you to replace the rest of your setup. Keep your workflow skills, your
code-intelligence server and your task tracker: the checks above run on the agent's own tool
calls and commits, whichever of those you use.
See it in action
A missing module breaks the project's npm test. forge verify runs that test and reports a failed verdict.
forge precommit checks the staged diff and refuses the synthetic credential.
forge recall add saves a fact. A separate invocation of forge recall list retrieves it.
Start here: eight commands
These are what forge --help shows first. The other commands are still there:
forge --help --all lists every one, and the full table is below.
| Command |
What it does |
forge init |
set up ForgeKit for the coding agents this repo uses |
forge doctor |
check that hooks, providers and MCP wiring work (--fix repairs) |
forge sync |
rewrite every agent's config after you edit the shared rules |
forge remember |
save a fact for every agent (run sync to deliver it) |
forge impact |
list the files an edit to a symbol will probably touch |
forge verify |
run the repo's tests and report PASS, FAIL or INCOMPLETE |
forge precommit |
stop a commit that leaks a secret or changes code without docs |
forge vet |
check a package is real and not known malicious before installing |
Works with
| Tool |
Native config |
MCP server entry |
Automatic hooks |
| Claude Code |
✅ |
✅ |
Plugin or project hooks |
| Local Codex |
✅ |
✅ |
Trusted plugin or project hooks |
| Cursor, Gemini CLI, Copilot |
✅ |
✅ |
Project hooks |
| Zed, Continue |
✅ |
✅ |
— |
| Windsurf / Devin |
✅ |
— |
Devin can use trusted Claude project hooks |
| Kimi Code |
✅ |
Project MCP |
Native user plugin |
| OpenCode |
✅ |
Project MCP |
Generated JavaScript plugin |
| Aider |
✅ |
— |
— |
| OpenClaw |
✅ |
Operator registration or bundle |
— |
| Hermes Agent |
✅ |
Profile registration (hermes mcp add) |
— |
| Pi |
✅ |
Project MCP (after project trust) |
— |
| Roo Code, VS Code |
— |
✅ |
— |
Claude Code has the deepest real-world testing. What each integration does, and how it is
tested, is in docs/INTEGRATIONS.md.
How it works
ForgeKit checks a task before the agent acts, lets the agent work, and records evidence from
tests, CI or a person afterwards. Only those independent checks raise a lesson's confidence,
so a wrong lesson fades instead of hardening into a rule.
Open the interactive diagram: pan, zoom, search, and trace any node.
Every agent also gets a short working method in AGENTS.md: check the goal and the means, act
on evidence, change one thing at a time, prove the result, fix without breaking anyone. Longer
protocols for debugging, research, building and security fixes ship as skills, and the prompt
hook names the right one for the task. The working method
For a task that needs approval gates, spending limits and a signed verification result, use
the supervised harness.
Measured, with limits
Every number comes from npm run bench on this repository and is recorded with its
environment in reports/benchmarks.md.
- A full pre-action gate in 851 ms on a warm graph with no model call (one repository, a
4-core Linux VM).
- Blast radius in 1.68 ms for a warm impact query. On six hand-labelled cases recall is
1.00 and precision 0.17.
- 20.2% more cost than always-premium. The white paper's 62.1% routing saving did not hold
on 80 held-out tasks, so the project publishes it as refuted.
Refutations, boundaries and the research prototypes are in docs/EVIDENCE.md.
Honest limits
- Beta. Releases follow Semantic Versioning, and support is best effort with no SLA. What is
stable today, the deprecation policy and the criteria for dropping the label are in
docs/STABILITY.md.
- Impact is heuristic. A regex-derived code graph, not a sound call graph: it can miss
files and over-warn. On this repository it named 40% of the test files that broke when a
function broke;
forge impact --record adds the tests that actually run the code, which named
all of them, but only for code some test runs.
- Guardrails are defence in depth, not a sandbox. Commands are normalized the way the shell
reads them (quotes, variables, substitutions, inline programs) before they are judged. It is
static analysis: a program the guard cannot evaluate can still get past it.
- Memory is external state. Facts live in files and are retrieved into context; no model is
retrained. A policy a program can test can instead be compiled into a commit check
(
forge know --enforce), which holds whether or not a model read it.
The full list is in docs/OVERVIEW.md.
Teams
The ledger merges over plain git: forge ledger sync keeps it under refs/forge/ledger, and two
teammates' copies converge whoever syncs first. forge cloud and forge relay sync encrypted
workspace evidence through a receiver you run, which stores only ciphertext.
Team memory
All commands