| name | rebuild-includes |
| description | Regenerate the dynamic include files (available-agents.md and available-skills.md) by scanning agent and skill directories for frontmatter |
| disable-model-invocation | true |
| argument-hint | (no arguments) |
Rebuild Includes
Regenerate the dynamically-generated include files that list all available agents and skills. These files are referenced via @includes/ in project CLAUDE.md templates.
Output Files
E:\repositories\ClaudeCode\includes\available-agents.md
E:\repositories\ClaudeCode\includes\available-skills.md
Steps
1. Scan Agents
Scan E:\repositories\ClaudeCode\agents\ for all .md files (recursively). For each file, read the YAML frontmatter to extract:
name: — the agent name
description: — the agent description (use only the first sentence for the table)
Determine the category from the file's directory path:
- Files directly in
agents/ → Generic
- Files in
agents/joomla/ → Joomla
- Files in
agents/{other}/ → use {other} as category name (title case)
2. Generate includes/available-agents.md
Write the file with this structure:
<!-- Auto-generated by /rebuild-includes — do not edit manually -->
### Generic
| Agent | Description |
|-------|-------------|
| `agent-name` | First sentence of description |
### Joomla
| Agent | Description |
|-------|-------------|
| `agent-name` | First sentence of description |
- Sort agents alphabetically within each category
- Generic category comes first, then others alphabetically
- Use only the first sentence of the description (up to the first period)
3. Scan Skills
Scan E:\repositories\ClaudeCode\skills\ recursively for all SKILL.md files. For each file, read the YAML frontmatter to extract:
name: — the skill name
description: — the skill description (use only the first sentence for the table)
argument-hint: — example arguments for the skill
Determine the category from the file's directory path:
skills/{skill-name}/SKILL.md (one level deep) → Generic
skills/joomla/{skill-name}/SKILL.md → Joomla
skills/{other}/{skill-name}/SKILL.md → use {other} as category name (title case)
4. Generate includes/available-skills.md
Write the file with this structure:
<!-- Auto-generated by /rebuild-includes — do not edit manually -->
### Generic
| Skill | Description | Example |
|-------|-------------|---------|
| `/skill-name` | First sentence of description | `/skill-name argument-hint` |
### Joomla
| Skill | Description | Example |
|-------|-------------|---------|
| `/skill-name` | First sentence of description | `/skill-name argument-hint` |
- Sort skills alphabetically within each category
- Generic category comes first, then others alphabetically
- The Example column uses the
argument-hint frontmatter value
5. Report
After generating both files, report:
- Number of agents found (by category)
- Number of skills found (by category)
- Confirm both files were written successfully