Claude Cursor GitHub Copilot Skill

skill-validate

Validate any Lattice SKILL.md against all tier conventions — atoms, molecules, and refiners. Catches structural errors, broken cross-references, and convention violations before they reach the repo. If you just wrote or modified a Lattice skill file and haven't run this yet, run

LLM Mart · 0 points · 14 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download techygarg-lattice-dev-skills_skill-validate-d59d520.zip · 5 KB
Part of techygarg/lattice — 8 skills

Install

skills CLI npx skills add https://github.com/techygarg/lattice/tree/main/dev-skills/skill-validate
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install techygarg-lattice@llmmart
Git git clone https://github.com/techygarg/lattice.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole techygarg/lattice collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Skill Validator

Core responsibility: Verify that a SKILL.md is structurally correct, follows all Lattice tier conventions, and composes correctly with the rest of the framework.

Input: One or more of:

  • A file path: source/atoms/clean-code/SKILL.md
  • A skill name: clean-code (resolves to the correct path automatically)
  • A tier: atoms (validates all skills in that tier)
  • No argument: validates all skills across all three tiers (count derived from source/ at runtime — never hardcoded)

Output: A findings report per skill:

## Skill Validator — {skill-name}
Tier: {atom | molecule | refiner}

### Structural          PASS / FAIL — specific findings
### Tier conventions    PASS / FAIL — specific findings
### Cross-references    PASS / FAIL — specific findings
### Three-angle review  PASS / WARN / FAIL per lens

Result: PASS | FAIL (N errors, M warnings)

How to verify this skill did its job:

  • Every finding references a specific file and section (no vague "missing content" — says exactly what is missing and where)
  • FAIL findings have an actionable fix, not just a description of the problem
  • The report distinguishes errors (must fix) from warnings (judgment calls)
  • After "fix mode" is applied, re-running the validator returns PASS

Step 1: Load conventions

Read PROJECT.md — Skill Conventions section. This is the source of truth. STOP: do not rely on memory.

Read references/convention-rules.md for the detailed per-tier checklist.

Step 2: Run structural checks (all tiers)

For every SKILL.md being validated:

[ ] Frontmatter: name field present, lowercase-hyphenated
[ ] Frontmatter: description field present and non-empty
[ ] Frontmatter: description contains trigger phrases (what the user would type)
[ ] Folder name matches name field exactly
[ ] No inline atom content in molecules (no duplicating what framework:{atom} already provides)

Step 3: Run tier-specific checks

Read references/convention-rules.md for the full per-tier checklist. Apply the relevant section based on tier (determined from file path: atoms/, molecules/, refiners/).

Step 4: Run cross-reference checks

For every framework:{atom-name} reference in a molecule:

ls source/atoms/{atom-name}/SKILL.md 2>/dev/null || echo "BROKEN REF: framework:{atom-name}"

For every paths.{key} config key referenced in a refiner or atom:

  • Check it appears in docs/configuration.md paths table

For every .lattice/{subfolder}/ path referenced in a molecule:

  • Check that subfolder is in the known subfolders list in PROJECT.md

Step 5: Three-angle structural review

These three lenses are fixed — they match the three stakeholder types who depend on Lattice skills working correctly. This is a structural review (does the skill follow conventions?), not a behavioral review (does it work in practice?) — use skill-review for the latter.

Each lens asks a different question:

Product Owner lens — "Will this produce the right output for its users?"

  • If a molecule: does the output document structure (from the SKILL.md template) give a PO a clear picture of what was produced?
  • If an atom: are the quality checks grounded in real user need, not just technical form?
  • If a refiner: does the produced standards document solve the configuration problem the user has?

Business Analyst / Practitioner lens — "Are the rules complete and enforceable?"

  • Are checklists specific enough to have a clear pass/fail for each item?
  • Are anti-patterns named with a fix, not just a symptom?
  • Are ambiguity signals genuinely ambiguous, or are they just gaps in the rules?
  • For molecules: are all practical scenarios handled (fresh start, existing material, interrupted session, single-item request)?

Technical Lead lens — "Does this compose correctly with the rest of the framework?"

  • Do atom references (framework:{name}) resolve to real skills?
  • Do config keys follow snake_case and match what's in configuration.md?
  • Does the molecule write to a named .lattice/ subfolder (never root)?
  • For planning molecules: is the session resume check present at Step 1?
  • For generative molecules: are there no confirmation gates?

Step 6: Report

STOP: a passing category gets the bare word PASS — no restated commentary; findings text only on FAIL/WARN. Format findings as:

## Skill Validator — {skill-name}
Tier: {atom | molecule | refiner}

### Structural
PASS

### Tier conventions
FAIL — [Atom] Self-Validation Checklist missing STOP language on check 3
FAIL — [Molecule] Planning molecule Step 2 has no confirmation gate

### Cross-references
PASS

### Three-angle review
[PO]   PASS
[BA]   WARN — no guidance for interrupted session (resume behavior)
[Tech] FAIL — .lattice/myoutput/ not in known subfolders list

---
Result: FAIL (2 errors, 1 warning)

Distinguish errors (must fix) from warnings (should consider).

Step 7: Fix mode (optional)

If the user says "fix it" or "apply fixes" — apply all error-level findings directly to the files. Re-run validation after fixes. STOP: do not fix warnings without asking which ones to apply.

Files (lattice)
  • references
    • convention-rules.md 6.1 KB
      # Lattice Convention Rules — Validator Reference
      
      Detailed per-tier checks for the skill-validate. Read this alongside PROJECT.md.
      
      ---
      
      ## Atoms
      
      ### Required sections (in this order)
      1. YAML frontmatter
      2. `## Config Resolution`
      3. `## Self-Validation Checklist`
      4. `## Active Anti-Pattern Scan`
      5. `## Ambiguity Signals` *(code-quality atoms only — not knowledge-priming, design-first, context-anchoring, collaborative-judgment)*
      6. `## Core Principle`
      
      ### Config Resolution checks
      - [ ] Reads `.lattice/config.yaml` first
      - [ ] Checks `paths.{snake_case_key}` for custom doc path
      - [ ] Handles both `mode: overlay` (merge with defaults) and `mode: override` (replace defaults)
      - [ ] Falls back to `./references/defaults.md` when no config found
      - [ ] Has a `references/defaults.md` file (code-quality atoms) — check it exists
      
      ### Self-Validation Checklist checks
      - [ ] Each item is numbered
      - [ ] Each item has a bold label (`**LABEL**:`)
      - [ ] Uses imperative STOP language: "STOP after generating each component. Verify ALL..."
      - [ ] Each item has a clear pass/fail condition — not vague guidance
      - [ ] Fix instruction is present when a check fails ("If not → [action]")
      
      ### Active Anti-Pattern Scan checks
      - [ ] Checkbox format: `- [ ] **Pattern Name**: description → fix`
      - [ ] Each anti-pattern has: name, what it looks like, what to do
      - [ ] At least 5 anti-patterns for code-quality atoms
      - [ ] No overlap with the Self-Validation Checklist (scan catches smells, checklist catches hard violations)
      
      ### Ambiguity Signals checks
      - [ ] Each signal describes a genuinely ambiguous situation (two valid approaches)
      - [ ] Each signal has guidance for resolution — not just "it depends"
      - [ ] References `framework:collaborative-judgment` or `./references/defaults.md` for resolution
      
      ### defaults.md checks
      - [ ] Exists at `references/defaults.md`
      - [ ] Structured with numbered sections (§1, §2, ...) matching what the refiner produces
      - [ ] Contains opinionated defaults — not placeholders or vague guidance
      - [ ] Ends with attribution/reference line
      
      ---
      
      ## Molecules
      
      ### Required sections
      1. YAML frontmatter
      2. `## Required Skills` (with `framework:{atom-name}` references and always/conditional labels)
      3. `## Workflow` (numbered steps)
      4. Optional: Mode Detection, Persona sections
      
      ### Required Skills checks
      - [ ] Every atom reference uses `framework:{name}` format
      - [ ] Each reference has an always/conditional qualifier
      - [ ] Every referenced atom exists in `source/atoms/{name}/SKILL.md`
      - [ ] No atom content is inlined — only references
      
      ### Generative molecule checks (code-forge, refactor-safely, bug-fix pattern)
      - [ ] No confirmation gates between steps
      - [ ] Pauses only on genuine judgment calls via `framework:collaborative-judgment`
      - [ ] Linear numbered steps
      - [ ] No session resume check required (generative molecules don't maintain living documents across sessions)
      
      ### Planning/interactive molecule checks (design-blueprint, architecture-compass, requirement-forge pattern)
      - [ ] Step 1 checks for existing output document — if found, reads it and resumes from earliest incomplete step
      - [ ] Every phase has: (1) present output, (2) specific targeted question, (3) hard gate language "Do NOT advance to Step N until the user explicitly confirms"
      - [ ] Can exit early with partial output as a valid outcome
      - [ ] Writes to a named `.lattice/{subfolder}/` — never to `.lattice/` root
      - [ ] Subfolder is in PROJECT.md known subfolders list
      
      ### Output document template checks (planning molecules)
      - [ ] A template or structure for the output document is defined in the SKILL.md
      - [ ] Template includes frontmatter fields (where applicable)
      - [ ] Template is complete enough that a new session could read the output and resume work
      
      ---
      
      ## Refiners
      
      ### Required sections
      1. YAML frontmatter
      2. `## What This Produces` (output path, two modes, config key, template reference)
      3. `## Scope Clarification`
      4. `## Before You Begin` (check for existing doc, scan repo for signals)
      5. `## Choosing the Mode` (overlay vs override)
      6. `## Facilitation Approach` (conversation style, overlay flow, override flow)
      7. `## Section-by-Section Interview Guide` (reference to template)
      8. `## Output Assembly`
      9. `## Document Quality Checks`
      
      ### What This Produces checks
      - [ ] Output path is `.lattice/standards/{name}.md`
      - [ ] Both overlay and override modes are described
      - [ ] Config key is documented (`paths.{snake_case_key}`)
      - [ ] References `./assets/template.md`
      - [ ] States which atom (or molecule) consumes the produced document
      
      ### Facilitation approach checks
      - [ ] Overlay mode: present default briefly, ask if it matches, only record changes
      - [ ] Override mode: walk through every section, all sections appear in output
      - [ ] Common scenarios listed (e.g., "I agree with everything" → no custom doc needed)
      
      ### Template checks (assets/template.md)
      - [ ] `<!-- INTERVIEW GUIDANCE: -->` comments present for each section
      - [ ] Each guidance block includes: default content summary, what to ask, probing questions, what is customisable vs. fixed
      - [ ] Default content is present (not just guidance comments)
      - [ ] Frontmatter with `mode:` placeholder
      - [ ] Footer with project/date/mode placeholders
      
      ### Output Assembly checks
      - [ ] Instructions for overlay mode output (only changed sections)
      - [ ] Instructions for override mode output (all sections)
      - [ ] Config update instructions (how to write/update `.lattice/config.yaml`)
      - [ ] Strip all `<!-- INTERVIEW GUIDANCE: -->` comments from final output
      
      ### Quality Checks section
      - [ ] Overlay mode checks listed as checkboxes
      - [ ] Override mode checks listed as checkboxes
      - [ ] Both modes share: valid YAML frontmatter, well-formatted markdown, config updated
      
      ---
      
      ## All tiers — naming and frontmatter
      
      - [ ] `name:` is lowercase-hyphenated (e.g., `requirement-quality`, not `RequirementQuality`)
      - [ ] Folder name = `name:` field exactly
      - [ ] `description:` includes what the skill does AND trigger phrases (what the user would say)
      - [ ] Description is specific enough to trigger correctly — not so narrow it misses valid use cases
      - [ ] No YAML syntax errors in frontmatter
      
  • SKILL.md 5.8 KB
    ---
    name: skill-validate
    description: "Validate any Lattice SKILL.md against all tier conventions — atoms, molecules, and refiners. Catches structural errors, broken cross-references, and convention violations before they reach the repo. If you just wrote or modified a Lattice skill file and haven't run this yet, run it now — manual review consistently misses the same categories of errors this skill is specifically designed to catch. Use when the user says 'validate this skill', 'check this skill', 'does this follow conventions', 'review this skill file', 'check my SKILL.md', or 'skill validate'. Reports PASS/FAIL with specific file-and-section findings and actionable fixes. Standalone — does not call other skills."
    ---
    
    # Skill Validator
    
    **Core responsibility:** Verify that a SKILL.md is structurally correct, follows all Lattice tier conventions, and composes correctly with the rest of the framework.
    
    **Input:** One or more of:
    - A file path: `source/atoms/clean-code/SKILL.md`
    - A skill name: `clean-code` (resolves to the correct path automatically)
    - A tier: `atoms` (validates all skills in that tier)
    - No argument: validates all skills across all three tiers (count derived from `source/` at runtime — never hardcoded)
    
    **Output:** A findings report per skill:
    ```
    ## Skill Validator — {skill-name}
    Tier: {atom | molecule | refiner}
    
    ### Structural          PASS / FAIL — specific findings
    ### Tier conventions    PASS / FAIL — specific findings
    ### Cross-references    PASS / FAIL — specific findings
    ### Three-angle review  PASS / WARN / FAIL per lens
    
    Result: PASS | FAIL (N errors, M warnings)
    ```
    
    **How to verify this skill did its job:**
    - Every finding references a specific file and section (no vague "missing content" — says exactly what is missing and where)
    - FAIL findings have an actionable fix, not just a description of the problem
    - The report distinguishes errors (must fix) from warnings (judgment calls)
    - After "fix mode" is applied, re-running the validator returns PASS
    
    ## Step 1: Load conventions
    
    Read `PROJECT.md` — Skill Conventions section. This is the source of truth. **STOP: do not rely on memory.**
    
    Read `references/convention-rules.md` for the detailed per-tier checklist.
    
    ## Step 2: Run structural checks (all tiers)
    
    For every SKILL.md being validated:
    
    ```
    [ ] Frontmatter: name field present, lowercase-hyphenated
    [ ] Frontmatter: description field present and non-empty
    [ ] Frontmatter: description contains trigger phrases (what the user would type)
    [ ] Folder name matches name field exactly
    [ ] No inline atom content in molecules (no duplicating what framework:{atom} already provides)
    ```
    
    ## Step 3: Run tier-specific checks
    
    Read `references/convention-rules.md` for the full per-tier checklist. Apply the relevant section based on tier (determined from file path: atoms/, molecules/, refiners/).
    
    ## Step 4: Run cross-reference checks
    
    For every `framework:{atom-name}` reference in a molecule:
    ```bash
    ls source/atoms/{atom-name}/SKILL.md 2>/dev/null || echo "BROKEN REF: framework:{atom-name}"
    ```
    
    For every `paths.{key}` config key referenced in a refiner or atom:
    - Check it appears in `docs/configuration.md` paths table
    
    For every `.lattice/{subfolder}/` path referenced in a molecule:
    - Check that subfolder is in the known subfolders list in `PROJECT.md`
    
    ## Step 5: Three-angle structural review
    
    These three lenses are fixed — they match the three stakeholder types who depend on Lattice skills working correctly. This is a structural review (does the skill follow conventions?), not a behavioral review (does it work in practice?) — use `skill-review` for the latter.
    
    Each lens asks a different question:
    
    **Product Owner lens** — "Will this produce the right output for its users?"
    - If a molecule: does the output document structure (from the SKILL.md template) give a PO a clear picture of what was produced?
    - If an atom: are the quality checks grounded in real user need, not just technical form?
    - If a refiner: does the produced standards document solve the configuration problem the user has?
    
    **Business Analyst / Practitioner lens** — "Are the rules complete and enforceable?"
    - Are checklists specific enough to have a clear pass/fail for each item?
    - Are anti-patterns named with a fix, not just a symptom?
    - Are ambiguity signals genuinely ambiguous, or are they just gaps in the rules?
    - For molecules: are all practical scenarios handled (fresh start, existing material, interrupted session, single-item request)?
    
    **Technical Lead lens** — "Does this compose correctly with the rest of the framework?"
    - Do atom references (`framework:{name}`) resolve to real skills?
    - Do config keys follow snake_case and match what's in configuration.md?
    - Does the molecule write to a named `.lattice/` subfolder (never root)?
    - For planning molecules: is the session resume check present at Step 1?
    - For generative molecules: are there no confirmation gates?
    
    ## Step 6: Report
    
    **STOP: a passing category gets the bare word `PASS`** — no restated commentary; findings text only on FAIL/WARN. Format findings as:
    
    ```
    ## Skill Validator — {skill-name}
    Tier: {atom | molecule | refiner}
    
    ### Structural
    PASS
    
    ### Tier conventions
    FAIL — [Atom] Self-Validation Checklist missing STOP language on check 3
    FAIL — [Molecule] Planning molecule Step 2 has no confirmation gate
    
    ### Cross-references
    PASS
    
    ### Three-angle review
    [PO]   PASS
    [BA]   WARN — no guidance for interrupted session (resume behavior)
    [Tech] FAIL — .lattice/myoutput/ not in known subfolders list
    
    ---
    Result: FAIL (2 errors, 1 warning)
    ```
    
    Distinguish errors (must fix) from warnings (should consider).
    
    ## Step 7: Fix mode (optional)
    
    If the user says "fix it" or "apply fixes" — apply all error-level findings directly to the files. Re-run validation after fixes. **STOP: do not fix warnings without asking which ones to apply.**
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related