# Verify AI Agent Changes: Tests, Secrets, CI Gate

> Sets up a deterministic check for code written by AI agents: it runs your tests itself, flags weakened tests and leaked keys, and adds the gate to GitHub Actions or GitLab CI in observation mode. No model and no network are involved in the check.

Verify AI Agent Changes: Tests, Secrets, CI Gate is a paid AI agent skill on Agensi by Nicolas Baranov, in Code Quality & Review. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $10 (one-time purchase)
- Creator: [Nicolas Baranov](https://www.agensi.io/creators/creator-1633)
- Category: [Code Quality & Review](https://www.agensi.io/skills/code-quality-review)
- Version: 1.0
- Last updated: 2026-12-05
- Security: scan passed (2026-12-04); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/verify-ai-agent-changes-tests-secrets-ci-gate
- Tags: code-review, python, javascript, github-actions, gitlab-ci, testing

## What it does

- Runs the gate once in observation mode and explains each check and the verdict
- Adds and validates a repository policy from a template (Python, JS/TS, or per-agent scopes)
- Adds a CI job for GitHub Actions or GitLab CI that a pull request cannot rewrite
- Adds an optional git pre-push check
- Runs a two-week rollout and reports what would have been stopped and the false-positive share
- Runs your tests itself, flags weakened tests, and finds keys even if a later commit deleted them

## Who it's for

- **Engineering leads using AI coding assistants:** Set up a safety net that catches broken tests or leaked secrets before AI code gets merged. Try: "Set up the change gate for our GitHub repo."
- **Founders building with AI agents:** Know when your AI agent deleted tests, added skips or committed a key, before the change is merged. Try: "I want to start a two-week rollout for the code gate."
- **DevOps freelancers managing team workflows:** Add a deterministic check to CI that flags weakened tests and leaked keys in agent commits, starting in observation mode. Try: "Add the gate check to our GitLab pipeline in observation mode."

## About this skill

Your agent says "done, all tests pass". This skill sets up a required check for AI-written code that runs the tests itself instead of trusting anyone's account of the work.

### What the gate checks

- **Tests.** It runs your tests itself and records the command, the exit code and the result.
- **Weakened tests.** It flags removed tests, removed assertions and added skips (Python, JavaScript/TypeScript).
- **Keys and tokens.** It scans every added line of every commit, so it finds a key even if a later commit deleted it.
- **Protected paths.** It reports changes to paths your policy protects, and per-agent path scopes.
- **Receipts.** Each run writes a receipt: base, head, each check and its result. Receipts can be signed with a key kept in a masked CI secret.

No model and no network are involved in the check, so the same change always gets the same verdict.

### How the skill sets it up

1. **First run** in observation mode, with each check and the verdict explained.
2. **Policy** from a template, validated. The gate reads the policy from the base commit, so a change cannot loosen its own rules.
3. **CI job** for GitHub Actions or GitLab CI, in observation mode. The job takes the gate from the base commit, so a pull request cannot rewrite the checker that judges it. CI needs no network access to install it.
4. **Pre-push** check, optional.
5. **Two-week rollout:** collect the receipts, label each stop as right or wrong, and end with four numbers: what would have been stopped, why, the false-positive share, and the minutes spent.

### Evidence

On 1,800 recent changes of six open-source projects, 0.7% were flagged without reason. Most flags were real test removals that a person should approve. This was not measured on agent-written code.

### What it does not do

It does not find vulnerabilities (it can require your scanner to run), review design, or replace code review. The CI templates start in observation mode because they have not yet run in your CI.

### 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 or have their changes checked by it.

## Requires

- Git
- Python 3.10+

Version 1.1 has no network code. Version 1.0, served until 1.1 is approved, bundles an update check and package-registry lookups that the skill never runs.

## Known limitations

Test weakening checks are for Python and JS/TS only. CI templates start in warn-only mode. Does not check for design quality or logic errors.

## Technical details

Version 1.1 (in review; buyers get 1.0 until it is approved): 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. SKILL.md gives its SHA-256, and the agent checks its copy before running it. CI setup copies it to tools/skilllayer/skilllayer.py in your repository; the CI job takes it from the base commit, so a pull request cannot rewrite the checker. Version 1.0 bundles the same tool as about 85 .py files with a launcher; the commands the skill runs (gate, policy check, cases, --version) make no network calls.

Both need Python 3.10+ and git, install nothing and change no environment variables. Runs git and your project's own test command as subprocesses. Writes receipts to .skilllayer-receipts inside the repository. Reads a few of its own optional environment variables, such as a receipt-signing key. Includes policy templates, CI templates (GitHub Actions, GitLab CI, pre-push) and references (GATE.md, POLICY.md, ROLLOUT.md).

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Verify AI Agent Changes: Tests, Secrets, CI Gate skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill prevent AI agents from cheating on my code tests?

This skill adds a neutral judge to your code repository that checks every change for deleted tests, exposed secrets, and unauthorized file edits. It ensures that AI agents or team members do not skip safety steps or weaken your existing tests just to make their code pass.

### What do I need to have ready before I use this skill?

A git repository and Python 3.10+. The gate runs your existing test command, so a test suite helps; without one, the tests check is reported as not verified rather than passed. Weakened-test detection covers Python and JavaScript/TypeScript; the secrets and protected-path checks work on any repository. GitHub Actions or GitLab CI is only needed for the CI step.

### What kind of reports or proof of work will I receive?

Every gate run writes a receipt: the base and head commits, each check and its result, including the test command and its exit code. In CI the receipt can be signed with a key kept in a masked secret. After the two-week rollout, the cases summary reports what the gate would have stopped, why, the false-positive share and the minutes spent, so you can decide whether to switch to blocking.

### Are there specific types of code or errors this skill cannot catch?

It does not check for general security vulnerabilities or review the quality and intent of the code design. The specific feature that detects when tests have been removed or weakened is currently limited to Python, JavaScript, and TypeScript projects.

### Do I need to pay for a separate license to use this tools code?

The tool is free for non-commercial use, internal pilots lasting up to 90 days, or for small teams of up to 10 developers. If your team is larger or you are moving into full production after the pilot, you will need to obtain a separate license from the author.

### How should I tell my AI agent to start the setup process?

You can start by asking your agent to perform an observation run using this skill to see how your current code measures up against the default rules. Once you are comfortable, you can ask it to copy the checker tools into your repository and set up a policy for your specific programming language.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
