build-agents-indexlisted
Install: claude install-skill Fr-e-d/GAAI-framework
# Build Agents Index
## Purpose / When to Activate
Activate when:
- A new agent or sub-agent definition is created
- An agent's frontmatter is modified (role, id, track, lifecycle)
- A specialist entry is added, modified, or removed in `specialists.registry.yaml`
- `agents-index.yaml` is absent or suspected stale
This skill generates a single derived catalog of all agents, sub-agents, and specialists
available in the GAAI framework. Consumed by `gaai-status` and agent onboarding operations.
**`agents-index.yaml` is a cache. Agent .md frontmatter and specialists.registry.yaml are the sources of truth.**
---
## Process
### Step 1 — Scan agent definition files
Traverse `.gaai/core/agents/` recursively. Collect every `.md` file except `README.agents.md`.
This includes:
- Primary agents: `discovery.agent.md`, `delivery.agent.md`, `bootstrap.agent.md`
- Sub-agents: `sub-agents/*.sub-agent.md`
Ignore non-.md files and the README.
### Step 2 — Extract frontmatter from each agent file
For each agent `.md` file, read the YAML frontmatter block (between `---` delimiters).
Extract the following fields:
| Field | Source | Notes |
|---|---|---|
| `type` | frontmatter `type` | `agent` or `sub-agent` |
| `id` | frontmatter `id` | Required |
| `role` | frontmatter `role` | Required |
| `track` | frontmatter `track` | Required |
| `parent` | frontmatter `parent` | Sub-agents only; absent for primary agents |
| `lifecycle` | frontmatter `lifecycle` | e.g. `ephemeral`, `persistent` |