- Home
- Skills
- Code Quality & Review
- Check AI Agent Commits for Deleted Tests and Leaked Keys
Check AI Agent Commits for Deleted Tests and Leaked Keys
Checks your branch's commits once: runs your tests itself, flags removed or skipped tests, and finds keys added in any commit, even if deleted later. Observation mode. No model, no network.
Free
What it does
- Runs your tests itself and reports the command, the exit code and the result
- Flags tests and assertions the change removed or skipped, in Python and JS/TS
- Finds keys added in any commit on the branch, even if a later commit deleted them
- Reports changes to the paths your policy protects
- Writes a receipt of every check, and blocks nothing
- Never reports a check that could not run as a pass
Who it's for
Developers who merge what an AI agent wrote
Before merging, see whether the agent's "all tests pass" came from deleting the tests that failed.
Try asking: “Check my agent's branch against main before I merge it.”
Team leads trying out AI coding agents
One run on a real branch shows what a required check would have stopped, with no CI changes.
Try asking: “Run the SkillLayer gate once on this branch in observation mode.”
Anyone who pasted a key and removed it in the next commit
The key is still in the history that gets pushed. The gate checks every commit, not only the final diff.
Try asking: “Did any commit on this branch add a key, even one I deleted later?”
Check AI Agent Commits for Deleted Tests and Leaked Keys
Example session with this skill installed
My agent finished the discount change on this branch and says all tests pass. Check it against main before I merge.
- Read your context and instructions
- Compiled the check ai agent
The output below is real: the packaged tool, run on 2026-12-05 with the network blocked, on a small test repository. An agent-style branch changed the discount logic, deleted the test that covered it, and added the AWS documentation example key in one commit and removed it in the next. Only the receipt path is shortened.
I'll run SkillLayer's gate once in observation mode. It runs your test suite and writes a
receipt to .skilllayer-receipts/. It blocks nothing and changes no git state. You said yes.
skilllayer gate — ✗ BLOCKED
change set: a0593d3f97..7fcab31e17 (2 commits, 0 marked AI-assisted, 3 files)
✓ protected paths: none changed
✗ secrets: 1 added — settings.py:1 (aws_access_key, commit 5535bbbe7061)
✗ test integrity: signs the suite was weakened: 2 (test functions +0/−1, assertions +0/−1)
fewer tests by 1 — test_cart.py:8
fewer assertions by 1 — test_cart.py:9
✓ tests: python3 -m unittest discover -> Ran 2 tests in 0.000s (exit 0, 0.0s)
note: test files changed — test_cart.py
receipt: .skilllayer-receipts/20261205T075406621033Z-7fcab31e1798-BLOCKED.json
Not accepted: a required check failed on the commits that would land. Fix it and push again.
(warn mode: reported only, nothing was blocked)
What this means
| Check | Result |
|---|---|
| Tests | Pass, but only 2 tests ran: one fewer than on main |
| Test integrity | ✗ test_discount and its assertion were deleted in this branch |
| Secrets | ✗ An AWS key was added in commit 5535bbb. The next commit removed it, but it is still in the history you would push |
| Protected paths | No policy, nothing protected |
So "all tests pass" is true only because the test that covered the discount change is gone.
Nothing was blocked: this was observation mode.
Next steps
- Restore
test_discountand run it against the new discount code. - Treat the key as leaked: rotate it, then rewrite the branch so commit
5535bbbis not pushed. - Run the gate again. The receipt is in
.skilllayer-receipts/; add that folder to.gitignoreif you want to keep receipts locally.
Connects securely to your tools. The creator never sees your data.
About this skill
Your agent says "done, all tests pass". Sometimes that is true because it deleted the test that failed. This skill checks the commits themselves, without trusting anyone's account of the work.
It runs SkillLayer's change gate once on the commits between your base branch and the current checkout, in observation mode: nothing is blocked and no git state changes.
What it checks
| Check | What it looks at |
|---|---|
| Tests | Runs your test command itself (pytest, unittest or npm test are found automatically) and reads the real exit code |
| Test integrity | Fewer tests or assertions, added skip/xfail, deleted test files (Python, JavaScript/TypeScript) |
| Secrets | Every added line of every commit, so a key deleted in a later commit is still found |
| Protected paths | Paths listed in your .skilllayer-policy.yml, if you have one |
The result is one verdict, VERIFIED, BLOCKED (what would have been stopped), UNVERIFIED
(a check could not run; never counted as a pass) or NO_CHANGES, plus a receipt in
.skilllayer-receipts/.
Test integrity compares counts for the whole change, so a test deleted in a branch that also adds tests can go unflagged. Read the diff of changed test files too.
No model and no network are involved, so the same commits always get the same verdict.
Which keys it finds
AWS access keys, GitHub tokens, Anthropic keys, OpenAI keys in the classic sk- format, private key blocks, bearer tokens,
database URLs with a password, and assignments such as api_key = "...", token = "..." or
password = "..." with a long value. It does not yet find Stripe, Slack or Google keys, or
prefixed names such as DB_PASSWORD = "...". Use a dedicated secret scanner if those matter.
What it does not do
- It does not look for vulnerabilities, review design, or replace code review.
- A passing suite is not proof the code is right. A test whose expected value was changed is reported as a changed test file, not judged.
- Weakened-test detection is for Python and JavaScript/TypeScript. Tests in other languages still run.
Licence
The bundled source is under the Business Source License 1.1 (full text in the package). Use is free for non-commercial use, for an evaluation or pilot of up to 90 days per organisation, and in an organisation where up to 10 developers use it.
Secret formats: finds AWS, GitHub, Anthropic and classic OpenAI keys, private key blocks, bearer tokens, database URLs with a password, and api_key/token/password assignments; not yet Stripe, Slack or Google keys, or prefixed names like DB_PASSWORD. One run in observation mode only; making it a required check in CI is a separate setup. Weakened-test detection covers Python and JavaScript/TypeScript. Needs a base branch to compare against, usually origin/main. It does not find vulnerabilities or review design.
The whole tool is one file, scripts/skilllayer.py: 182 KB of Python, standard library only, cut from SkillLayer v0.3.1. It contains no network code and installs nothing. SKILL.md gives its SHA-256, and the agent checks its copy before running it; if the skill arrives through a connector, the agent writes the file unchanged to a temporary path and deletes it afterwards unless you agree to keep a checked copy in ~/.skilllayer/tools/. Needs Python 3.10+ and git. The agent asks before running anything, then runs: python3 <tool> gate --base origin/main --mode warn --receipt-dir .skilllayer-receipts. The gate reads git read-only and runs your project's own test command. It writes only the receipt and a run log to .skilllayer-receipts/ in the repository. In observation mode the exit code is 0 whatever the verdict; 1 means the tool itself failed. --lang ru gives the report in Russian.
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 buying a skill.
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 to use
No account required to browse
Trust & safety
Security scan
Security scan passed today
- Free with an Agensi account
- Software
Python 3.10+
Git
Your test command is your own code and runs as it normally does.
Permissions
File Scopes
Terminal: runs the skill's Python tool, git (read-only) and your own test command. Read Files: reads git history, test files and an optional .skilllayer-policy.yml. Write Files: only the receipt and run log in .skilllayer-receipts/, and, if you agree, a checked copy of the tool in ~/.skilllayer/tools/. Environment Variables: the tool reads its own optional settings, such as a receipt-signing key; the skill sets none. No network: the tool has no network code; the URLs in it are secret-detection patterns.
What's inside
Frequently Asked Questions
New in Code Quality & Review
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.