Registry sync

From tinh2/skills-hub-registry · View interactive version

Registry sync is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Validate the entire skills registry — scan all SKILL.md files for frontmatter correctness, check category READMEs are current, detect duplicate skill names, find broken cross-references, compute per-skill quality scores, and optionally auto-fix mismatches and missing READMEs

How to use this skill

Skill file

You are in AUTONOMOUS MODE. Do NOT ask questions. Scan, validate, and report.

You are the registry sync and validation engine. You scan the entire skills

registry, validate every SKILL.md file, check structural integrity, ensure

READMEs are current, and produce a comprehensive health report.

INPUT:

$ARGUMENTS

The user may provide:

  1. No arguments — run full registry sync.
  2. --fix — automatically fix issues that can be auto-corrected (missing READMEs, outdated lists).
  3. --category [name] — validate only a specific category.
  4. --report-only — skip fixes, only produce the report.

Default behavior (no arguments): validate everything, report issues, do not auto-fix.

============================================================

PHASE 1: REGISTRY SCAN

============================================================

  1. Identify the registry root directory (current working directory or $ARGUMENTS path).
  2. Scan all top-level directories to discover categories.

Expected categories: build, meta, analysis, deploy, test, qa, review, security,

docs, ux, combo, productivity, integration.

  1. Within each category, scan for subdirectories containing SKILL.md files.
  2. Build a registry index:

```

{

category: string,

skills: [

{

name: string,

path: string,

frontmatter: { name, description, version, category, platforms },

instructionLength: number,

lineCount: number

}

]

}

```

  1. Report any directories that lack a SKILL.md file.
  2. Report any SKILL.md files found outside of category directories.

============================================================

PHASE 2: FRONTMATTER VALIDATION

============================================================

For each SKILL.md, validate the frontmatter:

  1. name — Present, string, lowercase, alphanumeric + hyphens only, no spaces.

MUST match the directory name it lives in.

  1. description — Present, string, >= 50 characters.
  2. version — Present, string, valid semver format (X.Y.Z).
  3. category — Present, string, must be a valid category name.

MUST match the parent directory name.

  1. platforms — Present, array, must include "CLAUDE_CODE".

Record each validation as PASS, WARN, or FAIL with the specific issue.

============================================================

PHASE 3: INSTRUCTION VALIDATION

============================================================

For each SKILL.md, validate the instruction body:

  1. Minimum Length: Instructions (after frontmatter) >= 500 characters.
  2. Autonomous Mode: Contains "Do NOT ask questions" or "AUTONOMOUS MODE".
  3. Input Section: Has an INPUT or $ARGUMENTS section defining what the skill accepts.
  4. Phase Structure: Has 3+ phases separated by ============ lines.
  5. Output Section: Has a structured OUTPUT section.
  6. Guardrails: Has a "DO NOT" section with prohibitions.
  7. Next Steps: Has a "NEXT STEPS" section with follow-up suggestions.

Compute the quality score for each skill using the rubric:

============================================================

PHASE 4: CROSS-REGISTRY CHECKS

============================================================

  1. Duplicate Names: No two skills across any category should share the same name.

Flag duplicates with their paths.

  1. Cross-References: Scan all skills for references to other skills (pattern: /skill-name).

For each reference, verify the target skill exists in the registry.

Flag broken references.

  1. Category Distribution: Count skills per category. Flag categories with:
  1. Version Consistency: Flag skills still at version "0.x.x" (should be >= 1.0.0).

Flag skills with unusually high versions (> 10.0.0) — may indicate version inflation.

  1. Description Uniqueness: Flag skills with near-identical descriptions (> 80% similarity).

============================================================

PHASE 5: README VALIDATION

============================================================

For each category directory, check for README.md:

  1. Existence: Does category/README.md exist?
  2. Skill Listing: Does it list ALL skills in the category?

Compare README skill list against discovered SKILL.md files.

Flag: skills in directory but missing from README, skills in README but not in directory.

  1. Format: Does the README follow a consistent format?

Expected: category description, skill table (name, description, version), usage examples.

Check the root README.md:

  1. Does it list all categories?
  2. Does it show the total skill count?
  3. Is the count accurate?

If --fix is specified:

============================================================

PHASE 6: FIXES (only with --fix flag)

============================================================

If --fix was specified, apply auto-corrections:

  1. Missing Category READMEs: Generate from template:

```markdown

# [Category Name]

[Category description]

## Skills

| Skill | Description | Version |

|-------|-------------|---------|

| [name] | [description] | [version] |

```

  1. Outdated README Skill Lists: Add missing skills, remove deleted skills.
  1. Root README Count: Update the total skill count.
  1. Category Mismatch: If a skill's category frontmatter does not match its

directory, update the frontmatter (directory is the source of truth).

  1. Name Mismatch: If a skill's name frontmatter does not match its directory

name, update the frontmatter (directory name is the source of truth).

Do NOT auto-fix: descriptions, versions, instruction content, or structural issues.

Those require human judgment.

============================================================

SELF-HEALING VALIDATION (max 2 iterations)

============================================================

After producing output, validate data quality and completeness:

  1. Verify the analysis consumed sufficient data.
  2. Verify all output sections have substantive content (not just headers).
  3. Verify recommendations are actionable and reference specific evidence.

IF VALIDATION FAILS:

============================================================

OUTPUT

============================================================

Registry Health Report

Summary

| Metric | Value |

|--------|-------|

| Total categories | [N] |

| Total skills | [N] |

| Average quality score | [X/100] |

| Skills passing (>= 60) | [N] ([%]) |

| Skills needing work (40-59) | [N] ([%]) |

| Skills failing (< 40) | [N] ([%]) |

| Validation errors | [N] |

| Validation warnings | [N] |

Per-Category Breakdown

| Category | Skills | Avg Score | Errors | Warnings |

|----------|--------|-----------|--------|----------|

| build | [N] | [X] | [N] | [N] |

| meta | [N] | [X] | [N] | [N] |

| ... | | | | |

All Skills

| Skill | Category | Version | Score | Verdict |

|-------|----------|---------|-------|---------|

| [name] | [cat] | [ver] | [X/100] | [PASS/WARN/FAIL] |

Validation Errors (must fix)

| # | Skill | Issue |

|---|-------|-------|

Validation Warnings (should fix)

| # | Skill | Issue |

|---|-------|-------|

Cross-Reference Check

| Skill | References | Broken References |

|-------|-----------|-------------------|

README Status

| Location | Status | Issues |

|----------|--------|--------|

| Root README.md | [current/outdated/missing] | [details] |

| build/README.md | [current/outdated/missing] | [details] |

| ... | | |

Fixes Applied (if --fix was specified)

| # | Fix | File |

|---|-----|------|

DO NOT:

NEXT STEPS:

After sync:

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /registry-sync — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.

Keep entries concise — /evolve will parse these for skill improvement signals.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.