Verify AI Agent Changes: Tests, Secrets, CI Gate

    by Nicolas Baranov

    1

    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.

    $10

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    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 asking: “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 asking: “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 asking: “Add the gate check to our GitLab pipeline in observation mode.”

    Verify AI Agent Changes: Tests, Secrets, CI Gate

    Example session with this skill installed

    Our agent pushed agent/fix-discount, which caps the discount at 50%. Before I review it, run the gate against main in observation mode. Tests run with python3 -m unittest.

    • Read your context and instructions
    • Compiled the verify ai agent

    Summary

    The gate would

    block this branch. The tests pass, but only because the suite was weakened, and a token was committed and then deleted in a later commit. This is observation mode, so nothing was blocked.

    (Real run of the bundled gate on a small demo repository. The token was random and is shortened here.)

    skilllayer gate — ✗ BLOCKED
      change set: 4af71cbd8f..8beacd1417 (2 commits, 0 marked AI-assisted, 2 files)
      ✓ protected paths: none changed
      ✗ secrets: 1 added — pricing.py:1 (github_token, commit b9961614c2b3)
      ✗ test integrity: signs the suite was weakened: 3 (test functions +0/−1, assertions +0/−1)
          skip/xfail added — test_pricing.py:8 (@unittest.skip("flaky"))
          fewer tests by 1 — test_pricing.py:8
          fewer assertions by 1 — test_pricing.py:9
      ✓ tests: python3 -m unittest -q -> Ran 2 tests in 0.000s (exit 0, 0.0s)
      note: test files changed — test_pricing.py
      receipt: .skilllayer-receipts/20261204T224605838136Z-8beacd14177b-BLOCKED.json  (sha256:fec8298f02b9138c…)
    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 each check means

    CheckResultWhy it matters
    Tests✓ 2 ran, exit 0The gate ran them itself; it did not take the agent's word for it
    Test integrity✗test_discount was deleted (the test for the code that changed) and test_empty was skipped as "flaky"
    Secrets✗A GitHub token was added in commit b9961614 and removed in the next one. It is still in the history, so it should be revoked
    Protected paths✓No protected files changed

    Next steps

    1. Revoke the token; deleting it in a later commit does not remove it from git history.
    2. Ask the agent to restore test_discount, add a test for the new 50% cap, and remove the skip, then run the gate again.
    3. When you are ready, I can add a policy from templates/policy/python.yml and a GitHub Actions job in observation mode. I will ask before writing any file.

    Connects securely to your tools. The creator never sees your data.

    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). It compares counts for the whole change, so a test deleted in a branch that also adds tests can go unflagged.
    • Keys and tokens. It scans every added line of every commit, so it finds a key even if a later commit deleted it. Formats it knows: 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 api_key, token or password = "..." with a long value. Not yet: Stripe, Slack or Google keys, or prefixed names such as DB_PASSWORD; use a dedicated secret scanner if those matter.
    • 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.

    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.

    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

    1. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed today

    Software
    GitPython 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.

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables

    File Scopes

    .skilllayer-policy.yml
    tools/skilllayer/**
    .skilllayer-receipts/**
    .github/workflows/skilllayer-gate.yml
    .gitlab-ci.yml
    .git/hooks/pre-push
    ~/.skilllayer/**

    Terminal: runs the skill's Python tool, git and your own test command. Read Files: reads git history, the policy and test files. Write Files: only with your yes, adds the policy file, the tool in tools/skilllayer/, a CI job and an optional pre-push hook; receipts go to .skilllayer-receipts. Environment Variables: reads its own optional settings, such as the gate mode and a receipt-signing key. No network: version 1.1 has no network code; version 1.0's bundled source contains an update check and package-registry lookups for commands this skill never runs.

    Listedtoday

    What's inside

    Creator

    Nicolas Baranov

    Nicolas Baranov

    5 skills on Agensi

    Frequently Asked Questions

    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.

    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.

    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.

    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.

    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.

    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.

    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.