Gen catalog

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

Gen catalog is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Generate skill catalog — auto-discovers skills, builds README tables, JSON, or HTML output. Triggers: generate skill catalog, update skills documentation, list all skills

How to use this skill

Skill file

You are a catalog generation agent. Do NOT ask the user questions.

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

PHASE 1: DISCOVER ALL SKILLS

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

  1. Determine the skills directory:
  1. Glob for all */SKILL.md and */skill.md files under the skills directory.

Also check ~/.claude/commands/*.md for global commands (slash commands

that exist outside the skills directory).

  1. For each file found, parse the YAML frontmatter (between --- delimiters):
  1. Auto-detect categories by scanning each skill's instructions content.

Do NOT use a fixed category list. Instead:

(but are not limited to): research/discovery, spec/design, build,

testing, quality/review, documentation, operations, security,

infrastructure, combo/chain, deployment, analysis, etc.

defined in the /X skill" or "Chains /X -> /Y"), classify it as a

combo/chain skill and record the chain sequence.

"testing", "docs", "ops", "combo").

(e.g., "research" -> "Research & Discovery", "build" -> "Build & Implement").

  1. Generate a markdown link for each skill pointing to its SKILL.md file

relative to the skills directory root (e.g., [/name](./name/SKILL.md)).

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

PHASE 2: DETERMINE OUTPUT FORMAT

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

Check if the user requested a specific output format. Supported formats:

If no format is specified, use "readme".

README format (default)

Read the existing README.md in the skills directory.

Preserve everything ABOVE <!-- AUTO-GENERATED-SKILLS-TABLE-START -->.

Preserve everything BELOW <!-- AUTO-GENERATED-SKILLS-TABLE-END -->.

If these markers do not exist yet, add them after the first heading and

intro paragraph.

Between the markers, generate:

Skills by Category

For each detected category (sorted alphabetically, with combo/chains last):

[Category Display Name]

| Skill | Description |

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

| CODE0 | description |

For combo/chain skills, add a "Chain" column:

| Skill | Chain | Description |

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

| CODE0 | /a -> /b -> /c | description |

Also include global commands from ~/.claude/commands/ with a note:

Global commands (available in any project):

| Command | Description |

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

| /name | description |

JSON format

Write a JSON file with this structure:

{
  "generated": "ISO-8601 timestamp",
  "skills_directory": "/path/to/skills",
  "categories": {
    "category-label": {
      "display_name": "Category Display Name",
      "skills": [
        {
          "name": "skill-name",
          "description": "...",
          "path": "relative/path/to/SKILL.md",
          "chain": ["/a", "/b"] // only for combo skills
        }
      ]
    }
  },
  "global_commands": [
    { "name": "command-name", "description": "..." }
  ]
}

HTML format

Generate a standalone HTML page with:

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

PHASE 3: UPDATE skills-list (README format only)

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

If outputting README format and skills-list/SKILL.md exists in the

skills directory, update its embedded skills table:

parallelization rules, development patterns).

The generated table format:

| Skill | Description |

|---|---|

| name | description |

Group by category with category headers.

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

PHASE 4: VERIFY

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

  1. Count total skills discovered.
  2. Count skills in generated output.
  3. Counts must match. If not, flag the discrepancy.
  4. Check for orphan directories (dirs under the skills directory with no SKILL.md).
  5. Check for skills referenced in combo chains that don't exist.

Report:

Catalog Generated

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

PHASE 5: COMMIT (optional)

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

If changes were made, stage the updated files.

Commit: "docs: auto-generate skills catalog (N skills)"

Do NOT include Co-Authored-By lines.

Push after committing.

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

SELF-HEALING VALIDATION (max 2 iterations)

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

After producing documentation, validate completeness:

  1. Verify all required sections are present and non-empty.
  2. Verify internal cross-references and links resolve correctly.
  3. Verify no placeholder text remains ("{TODO}", "[TBD]", "...", "etc.").
  4. Verify code examples are syntactically valid.

IF VALIDATION FAILS:

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

SELF-EVOLUTION TELEMETRY

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

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

Check if a project memory directory exists:

Entry format:

### /gen-catalog — {{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.