Skip to content

unit-9: extend validator with 5 conservative checks#13

Merged
sent-dm merged 1 commit into
devfrom
batch/unit-9-validator
May 19, 2026
Merged

unit-9: extend validator with 5 conservative checks#13
sent-dm merged 1 commit into
devfrom
batch/unit-9-validator

Conversation

@sent-dm
Copy link
Copy Markdown
Contributor

@sent-dm sent-dm commented May 19, 2026

Scope

Extends scripts/validate-skills.sh with five conservative best-practice checks. All five pass against the current 7 in-repo skills (verified — exit 0). Reference-existence and cross-skill-existence checks are deferred to v0.4 to keep this unit decoupled from the other batch units.

The five checks

  1. Description in third person (FAIL). Greps the description (after stripping "quoted phrases", which are verbatim user triggers and exempt) for \b(I|you|we|us|my|your|our)\b (case-sensitive — US country shouldn't match us pronoun) or can help (case-insensitive).
  2. No XML angle brackets in description (FAIL). Matches <[a-zA-Z/] — these break manifest parsing.
  3. No Windows path separators in body (FAIL). Strips fenced code blocks first via awk, then greps for a literal \.
  4. No vague description openers (WARN, doesn't fail). Flags descriptions starting with Helps , Manages , Tools for , Utility for , Provides . Warning only — does not increment the errors counter.
  5. Extended reserved-name list (FAIL). Adds meta and google to the existing anthropic/claude block. Refactored the if-chain into a case statement for extensibility.

Why "conservative"

The instructions explicitly required these checks to pass on the current 7 skills. Two existing descriptions contain quoted user trigger phrases like "why are my messages failing" and "how do I model tenants" — verbatim user phrases that legitimately contain first-person pronouns. The third-person check strips "..." quoted text before grepping, so verbatim triggers are exempt.

Verification

Baseline:

bash scripts/validate-skills.sh   # → exits 0, "OK: 7 skill(s) validated"

Manually tested each check with throwaway fixtures (symlinked into skills/ then removed; not committed):

  • Check 1 (third person): fixture description "I can help you with bad stuff." → fails with description uses first/second person — rewrite in third person
  • Check 2 (XML): fixture description containing <tag>bad</tag> → fails with description contains XML-style tags
  • Check 3 (Windows paths): fixture body containing scripts\helper.py outside a code fence, plus some\code\path inside a fence → fails on the outside-fence one only, fence content correctly ignored
  • Check 4 (vague opener): fixture description starting with Helps test vague verb → emits warning, exit 0 (not a failure)
  • Check 5 (reserved 'meta'): fixture name meta → fails with name 'meta' is a reserved word

Constraints honored

  • Only scripts/validate-skills.sh is touched.
  • No reference-existence or cross-skill-existence checks (deferred to v0.4).
  • Existing fail/ok helpers reused.
  • Existing description_value and fm_end reused (no re-extraction).

🤖 Generated with Claude Code

Adds five best-practice checks to scripts/validate-skills.sh, all of
which pass against the current 7 in-repo skills:

  - description in third person (FAIL) — strips "quoted phrases" first
    so verbatim user triggers don't trip the check
  - no XML angle brackets in description (FAIL)
  - no Windows-style backslash paths in body outside code fences (FAIL)
  - vague description openers (Helps/Manages/Tools for/...) (WARN only)
  - extend reserved name list to include 'meta' and 'google' (FAIL)

Reference-existence and cross-skill-existence checks are intentionally
deferred to v0.4 to keep this unit decoupled from the other batch units.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sent-dm sent-dm merged commit b8c0a41 into dev May 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant