- Home
- Skills
- Testing & Debugging
- carveout-gate
Carveout Gate
Before your agent calls a TypeScript change done: what the change reaches, the exact tests to run, and a hold on weakened or skipped tests, CI and config edits, and new suppressions.
Free
Works with the AI Agents you already use
carveout-gate
Example session with this skill installed
I fixed the discount bug. Check my change before I call it done: what does it reach, and which tests should run?
- Read your context and instructions
- Compiled the carveout-gate
$ carveout impact
2 script file(s) changed since HEAD; 1 file(s) import them, 1 test(s) among them and the change (graph 15 ms, types 178 ms).
Exports whose type changed or that are gone:
(none)
Importers, nearest first:
src/cart.ts (1 hop)
Tests that run the changed code:
test/price.test.ts (node, changed)
Run them:
(cd . && node --experimental-strip-types --test test/price.test.ts)
$ carveout gate
2 changed file(s) since HEAD; 1 held for review:
test/price.test.ts: removes or rewrites 1 assertion of a test, and skips 1 more test, and rewrites or removes 1 other statement of a test (the data, setup, mocks or helpers its assertions rest on): review it and pass --allow to carry it
exit 6
The gate held it: the change skipped the test that rejects a 120% discount instead of keeping the range check. Undo the skip, restore the check, and run the one test file impact named. Only src/cart.ts imports price.ts, so nothing else needs a run.
Connects securely to your tools. The creator never sees your data.
About this skill
A coding agent that cannot make a test pass has easy ways out: skip the test, loosen its assertion, mock the module under test, add a @ts-ignore, or edit the test runner's config. Its report still says all green. carveout-gate checks the change itself, from Git, before anyone calls it done.
What it does
carveout impactlists the files the change reaches, nearest importers first, the exports whose type changed and the files that take them (those may no longer compile), and one command per package that runs just the affected tests.--runruns them when you agree.carveout gateexits 6 and names each hold with why: deleted tests, helpers or fixtures; assertions removed, rewritten, skipped, focused with .only or swallowed by a catch; a new mock of the code's own module; code that could pass a test without the code passing it (an early process.exit, a check for a test run); edited tsconfig, linter or test-runner config; protected paths such as CI workflows; new suppressions (@ts-ignore, eslint-disable, coverage ignores); and with --scope, files outside it.- Runs as a Claude Code Stop hook:
carveout gate --hooksends the holds back to the agent once per stop, so it fixes them before it reports.
Neither command runs the repository's code, except impact --run. A hold the task asked for (the behaviour an assertion held was meant to change) is kept and named; --allow lets a reviewed file through.
Requirements
Node 22.12 or later, git and npm, in a TypeScript repository. The skill runs the open-source carveout CLI from npm (MIT) and asks before installing it. No model calls.
Limits
It traces imports and names, not runtime: a module loaded by a computed name, or a file read by path, is not traced. Tests under node:test, Vitest and Jest are named and run; another runner falls back to the package's npm test.
Static import tracing only, no runtime path analysis. Native support limited to node:test, Vitest, and Jest. Requires Node 22.12+.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account
Requires
Permissions
Terminal: runs the open-source carveout CLI (MIT, npm), pinned to a version; the skill asks before installing it. Read files: it reads the change from Git and the repository's import graph; neither command runs the repository's code, except impact --run when you agree. Network: the npm registry, to install the CLI. No model calls.