Agent Skill
2/7/2026check-test-diff
Guard skill to prevent accidental mass deletion or modification of Go test files in diffs.
C
coldturnip
0GitHub Stars
1Views
npx skills add COLDTURNIP/longhorn-workspace
SKILL.md
| Name | check-test-diff |
| Description | Guard skill to prevent accidental mass deletion or modification of Go test files in diffs. |
name: check-test-diff description: Guard skill to prevent accidental mass deletion or modification of Go test files in diffs. compatibility: opencode metadata: version: "0.2" impact: High tags: ["tests", "diff", "guard", "qa"]
Skill: check-test-diff
Description
This skill enforces QA safety by guarding against accidental or excessive changes to Go test files (*_test.go) in git diffs. It fails if any test file is deleted, or if any test file has more than 100 lines deleted in a single diff.
When to Use
- As a pre-merge or CI guard to prevent accidental removal or mass modification of test coverage.
- When reviewing large or automated changes that may unintentionally impact test files.
Usage
Run the shell script in this directory to check the current diff:
bash .opencode/skills/check-test-diff/check_test_diff.sh
To check a specific repository (optional):
bash .opencode/skills/check-test-diff/check_test_diff.sh --repo repo/<repo-name>
Expected Outcomes
- Exit code 0: No forbidden test file deletions or excessive line deletions detected. Prints a summary of test file changes.
- Exit code 1: One or more
*_test.gofiles deleted, or a test file has >100 lines deleted. Prints details of violations and fails the check.
Notes
- This skill does not run or select test suites; it only guards against risky test file diffs.
- ASCII-only output and file compliance enforced.
Skills Info
Original Name:check-test-diffAuthor:coldturnip
Download