pattern-quality
Skill9 starsChanged 7 months agoMITView on GitHub
Validate pattern files (skills, agents, rules) against quality, portability, structure, and curation standards. Run when editing or creating files in core/.claude/ or .claude/ pattern directories. Consolidates all pattern quality checks into one on-demand workflow. Structural FILE validation only — for trigger/output/behavioral evaluation use /skill-evaluator; for authoring or updating skill content use /writing-skills.
In this repository44 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- anthropic-multi-agent-research-system-skillSkill
- apply-selectionsSkill
- bootstrap-dogfood-projectSkill
- brainstormSkill
- branch-choiceSkill
- cc-adoption-scoutSkill
- claude-guardianSkill
- continueSkill
- end-sessionSkill
- executing-plansSkill
- five-advisorsSkill
- get-work-doneSkill
- git-branch-lifecycleSkill
- githubSkill
- grill-meSkill
- hook-transcript-fixture-testSkill
- instagramSkill
- linkedinSkill
- modern-data-pipeline-diagramSkill
- platform-event-live-probeSkill
- plugin-lifecycleSkill
- promote-to-coreSkill
- prompt-auto-enhanceSkill
- provision-reportSkill
- redditSkill
- review-new-claude-featuresSkill
- save-sessionSkill
- scan-discovery-reportSkill
- scan-repoSkill
- scan-urlSkill
- self-improveSkill
- skill-evaluatorSkill
- skill-masterSkill
- ssot-workflow-auditSkill
- start-sessionSkill
- synthesize-hubSkill
- synthesize-projectSkill
- twitter-xSkill
- verify-effect-at-destinationSkill
- workflow-doc-reviewerSkill
- writing-plansSkill
- writing-skillsSkill
- youtube-transcriptSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
25 rules. About 0 are common, 11 are distinctive, and 14 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
Read the appropriate checklist reference file for the detailed requirements.
- Very specific: line 41
Check name matches directory/filename (kebab-case)
- Very specific: line 42
Check version is valid SemVer
- Distinctive: line 50
Check total lines <= 500 (WARN at 500, FAIL at 1000)
- Very specific: line 52
Verify ## CRITICAL RULES section exists (skills)
- Distinctive: line 53
Check description starts with verb and includes "when" clause
- Very specific: line 58
Read references/portability-rules.md and check:
- Very specific: line 60
No hardcoded absolute paths (C:\, /home/, /Users/)
- Distinctive: line 61
No project-specific references (specific class names, module paths)
- Very specific: line 67
If pattern references other skills/agents via Skill(), Agent(), or /skill-name — verify targets exist on disk
- Very specific: line 68
If in core/.claude/ — verify matching entry in registry/patterns.json with matching version
- Very specific: line 69
If in .claude/ — check config/dual-home-resources.yml FIRST: a classified dual-home resource (synced/shared/divergent) legitimately HAS a …
- Very specific: line 70
Check config/workflow-groups.yml for stale seeds if renaming/deleting
- Distinctive: line 74
When the pattern change affects workflow connections:
- Very specific: line 76
Read references/workflow-verification.md for full verification checklist
- Very specific: line 77
Verify placement: distributable → core/.claude/ + registry.
- Very specific: line 78
Check artifact convention compliance (test-results/{skill-name}.json)
- Distinctive: line 87
After changes pass validation:
- Distinctive: line 121
MUST run this skill when creating or modifying ANY pattern file
- Very specific: line 122
MUST fail a NEW skill lacking the prerequisites contract (## Prerequisites or explicit none + STEP 0 preflight when prerequisites exist) — …
- Distinctive: line 123
MUST NOT commit if the validator script fails
- Distinctive: line 124
MUST verify cross-references exist on disk — do not assume from memory
- Very specific: line 125
MUST check registry sync for core/.claude/ patterns
- Distinctive: line 126
MUST regenerate docs after changes pass validation
- Distinctive: line 128
Every pattern must be independently verifiable without relying on other patterns
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pattern Quality Gate
Validate patterns against portability, structure, self-containment, curation,
and workflow integrity standards. Run this skill when creating or modifying
any file in core/.claude/ or .claude/ pattern directories.
Request: $ARGUMENTS
STEP 1: Identify Pattern Type and Load Checklist
Determine the pattern type from the file path:
| Path Pattern | Type | Checklist |
skills/*/SKILL.md | Skill | Read references/skill-checklist.md |
agents/*.md | Agent | Read references/agent-checklist.md |
rules/*.md | Rule | Read references/rule-checklist.md |
Read the appropriate checklist reference file for the detailed requirements.
STEP 2: Validate Frontmatter and Structure
- Parse YAML frontmatter — verify all required fields present
- Check
namematches directory/filename (kebab-case) - Check
versionis valid SemVer - For skills: verify numbered
## STEP N:sections (workflow type) or organized##sections (reference type) - For agents: verify
model,color,## Core Responsibilities,## Output Format - For rules: verify scope declaration (
globs:or# Scope: global)
STEP 3: Check Content Quality
- Count content lines (excluding frontmatter, headings) — must be >= 30 for skills, >= 5 for rules
- Check total lines <= 500 (WARN at 500, FAIL at 1000)
- Scan for placeholder markers (
<!-- TODO: -->,<!-- FIXME: -->) - Verify
## CRITICAL RULESsection exists (skills) - Check description starts with verb and includes "when" clause
- For skills: verify the prerequisites contract — a
## Prerequisitessection (or an explicitPrerequisites: noneline); when any prerequisite is declared, a## STEP 0: Preflightstep that verifies every declared item (tools, credentials, files, services, AND user inputs/decisions) before STEP 1 and hard-stops with a complete missing-items list. NEW skills FAIL without it; skills predating 2026-07-26 WARN until the hub-wide sweep enrolls them
STEP 4: Validate Portability
Read references/portability-rules.md and check:
- No hardcoded absolute paths (
C:\,/home/,/Users/) - No project-specific references (specific class names, module paths)
- Stack-prefixed patterns only assume their stack's standard tools
allowed-toolsfollows least-privilege per skill type
STEP 5: Verify Cross-References and Registry
- If pattern references other skills/agents via
Skill(),Agent(), or/skill-name— verify targets exist on disk - If in
core/.claude/— verify matching entry inregistry/patterns.jsonwith matching version - If in
.claude/— checkconfig/dual-home-resources.ymlFIRST: a classified dual-home resource (synced/shared/divergent) legitimately HAS a registry entry (it tracks thecore/twin); only a genuinely hub-only pattern (unclassified there) must have NO entry inregistry/patterns.json - Check
config/workflow-groups.ymlfor stale seeds if renaming/deleting
STEP 6: Validate Workflow Integrity
When the pattern change affects workflow connections:
- Read
references/workflow-verification.mdfor full verification checklist - Verify placement: distributable →
core/.claude/+ registry; hub-only →.claude/only - Check artifact convention compliance (
test-results/{skill-name}.json) - Run the validator:
PYTHONPATH=. python scripts/workflow_quality_gate_validate_patterns.pySTEP 7: Regenerate Documentation
After changes pass validation:
# Regenerate workflow docs (picks up new connections)
PYTHONPATH=. python scripts/generate_workflow_docs.py
# Regenerate dashboard (after core/.claude/ changes only)
python scripts/generate_docs.pySTEP 8: Report
Output a structured quality report:
Pattern: <name>
Type: <skill|agent|rule>
Location: <core/.claude/ or .claude/>
Score: <0-100>
Grade: <A-F>
Checks:
Frontmatter: PASS/FAIL
Structure: PASS/FAIL
Content: PASS/FAIL
Portability: PASS/FAIL
Cross-refs: PASS/FAIL
Registry sync: PASS/FAIL
Issues: <list any failures>CRITICAL RULES
- MUST run this skill when creating or modifying ANY pattern file
- MUST fail a NEW skill lacking the prerequisites contract (
## Prerequisitesor explicit none + STEP 0 preflight when prerequisites exist) — mid-run prerequisite discovery stalls unattended runs - MUST NOT commit if the validator script fails
- MUST verify cross-references exist on disk — do not assume from memory
- MUST check registry sync for core/.claude/ patterns
- MUST regenerate docs after changes pass validation
- Patterns in core/.claude/ are for downstream projects only — never use them in this hub repo
- Every pattern must be independently verifiable without relying on other patterns
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

