Skip to content
Back to skills

Protect Test Integrity

ASecurity

Blocks weakening tests: a deleted test file (commit only), more assertions removed than added, an added vacuous assertion (assert True). Runs: commit, agent write, turn's end. Waiver: 'chock: allow test-integrity' on an added line; an agent needs it already in HEAD. Misses: in-place weakening (a changed value), a removal offset by any added assertion, a commented-out assertion, styles off assertion_pattern, tests off test_path_regex, vacuous forms not listed, a deletion at agent write.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 29, 2026
ai-agentsshellgit

Works with

  • cli

Security analysis

A100/100

Scanned December 5, 2026

npx -y skills add open-coder-ai/chock-catalog --skill protect-test-integrity --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Protect Test Integrity?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Protect Test Integrity
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/open-coder-ai-protect-test-integrity/badge)](https://www.skillsdirectory.com/skills/open-coder-ai-protect-test-integrity)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: protect-test-integrity
description: "Blocks weakening tests: a deleted test file (commit only), more assertions removed than added, an added vacuous assertion (assert True). Runs: commit, agent write, turn's end. Waiver: 'chock: allow test-integrity' on an added line; an agent needs it already in HEAD. Misses: in-place weakening (a changed value), a removal offset by any added assertion, a commented-out assertion, styles off assertion_pattern, tests off test_path_regex, vacuous forms not listed, a deletion at agent write."
metadata:
  chock.artifact: hook
  chock.enforcement: block
  chock.coverage_without_chock: advisory
---

# Protect Test Integrity

Blocks weakening tests: a deleted test file (commit only), more assertions removed than added, an added vacuous assertion (assert True). Runs: commit, agent write, turn's end. Waiver: 'chock: allow test-integrity' on an added line; an agent needs it already in HEAD. Misses: in-place weakening (a changed value), a removal offset by any added assertion, a commented-out assertion, styles off assertion_pattern, tests off test_path_regex, vacuous forms not listed, a deletion at agent write.

```
on(commit|tool_use): block(test_integrity) test_path_regex(regex) assertion_pattern(regex) dummy_assertion_pattern(regex) ...
Test integrity: this change deletes a test file, removes more assertions than it adds, or adds a vacuous assertion. Fix the code under test, not the test. If the removal is deliberate (obsolete behaviour, a test moved elsewhere), a person adds 'chock: allow test-integrity' on an added line of that test file and commits from their own shell. In the agent (tool use, the turn's end, an agent's commit) only a waiver already committed in HEAD counts, so an agent asks a person.
```

This skill is advisory: the client reading it has no mechanism to enforce it. The same policy compiled by `chock` blocks at commit, on an agent's file writes and at turn end. See https://github.com/open-coder-ai/chock

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.