---
name: skill-edit-validation
description: Content-assertion sweep after editing SKILL.md files. Triggered when a task changes skill or prompt content that tests assert against. Prevents stale-assertion CI failures.
Skill Edit Validation
Trigger
After editing ANY .md file under .opencode/skills/, .claude/skills/, or .agents/skills/ that changes content wording (not just whitespace/formatting).
Protocol
Extract changed phrases: Identify old wording vs new wording (e.g., "spec.md does NOT exist" changed to "NO effective spec exists")
Targeted sweep: For each OLD phrase, grep test files:
rg "<old-phrase>" tests/ src/ --type ts -l
Focus on: *-audit*, *-security*, *-spec-gate*, *skill-mirror*, *soft-spec*, *prompt*, *workflow*
For each match: Read the assertion context (surrounding 10 lines). Verify:
Does the assertion still hold against the new content?
Is it checking a substring containing the old phrase?
Is it checking for the ABSENCE of a word the new wording introduces? (e.g., not.toContain('skip') catches "this check is skipped")
Update stale assertions in the same changeset. Do NOT defer to CI.
Preserve behavioral intent: When updating, preserve what the assertion TESTS (e.g., "the plan skill has a spec-absent branch"), not just the string match.
Constraint
Do NOT rubber-stamp brittle assertions. If an assertion tests implementation detail rather than behavioral intent, flag it for refactoring to a semantic check.
Root cause
A skill-content test registry would auto-adjust (issue #1746 item 3). This playbook is the manual safety net.
1---2name: skill-edit-validation-23description: ---4---5---6name: skill-edit-validation7description: Content-assertion sweep after editing SKILL.md files. Triggered when a task changes skill or prompt content that tests assert against. Prevents stale-assertion CI failures.8---910# Skill Edit Validation1112## Trigger13After editing ANY `.md` file under `.opencode/skills/`, `.claude/skills/`, or `.agents/skills/` that changes content wording (not just whitespace/formatting).1415## Protocol161. **Extract changed phrases:** Identify old wording vs new wording (e.g., "spec.md does NOT exist" changed to "NO effective spec exists")172. **Targeted sweep:** For each OLD phrase, grep test files:18 ```19 rg "<old-phrase>" tests/ src/ --type ts -l20 ```21 Focus on: `*-audit*`, `*-security*`, `*-spec-gate*`, `*skill-mirror*`, `*soft-spec*`, `*prompt*`, `*workflow*`223. **For each match:** Read the assertion context (surrounding 10 lines). Verify:23 - Does the assertion still hold against the new content?24 - Is it checking a substring containing the old phrase?25 - Is it checking for the ABSENCE of a word the new wording introduces? (e.g., `not.toContain('skip')` catches "this check is skipped")264. **Update stale assertions in the same changeset.** Do NOT defer to CI.275. **Preserve behavioral intent:** When updating, preserve what the assertion TESTS (e.g., "the plan skill has a spec-absent branch"), not just the string match.2829## Constraint30Do NOT rubber-stamp brittle assertions. If an assertion tests implementation detail rather than behavioral intent, flag it for refactoring to a semantic check.3132## Root cause33A skill-content test registry would auto-adjust (issue #1746 item 3). This playbook is the manual safety net.
Run npx skillmds@latest add zaxbyhub/skill-edit-validation-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
--- It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
zaxbyhub (@zaxbyhub) published this skill. Their other Agent Skills are listed on their SkillMD profile.