catalogue — Claude Code command: what it does, how to install
Builds a hierarchical wiki outline for the current repository as JSON. Use it when you need documentation structure before writing the pages.
.claude/commands/catalogue.mdWhat catalogue does
catalogue examines the current repository and outputs only a JSON documentation tree. It reads the file tree and README, identifies the project type, languages, and frameworks, then maps architecture, subsystems, components, and key methods into sections. Each prompt must point to real files.
The command first checks git remote get-url origin, asks whether the repository is local or has a source URL, and gets the branch with git rev-parse --abbrev-ref HEAD. Analysis will not start until that repository context is resolved. For a repository with ≤10 files, it creates Getting Started with 1–2 children and skips Deep Dive.
In Claude Code, place the command at .claude/commands/catalogue.md; GitHub Copilot uses .github/prompts/catalogue.prompt.md. The generated tree allows a maximum depth of 4, with ≤8 children per section.
What it helps with
- create a wiki outline for the current repository
- map architecture into documentation layers
- connect sections to source files and line references
- separate Getting Started from Deep Dive
Example prompts for the agent
- Run
/catalogueto generate a JSON wiki structure for this repository. - Resolve the repository source and branch, then run
/catalogue. - Use
/catalogueto outline architecture, subsystems, and components.
How to install catalogue
Manually: put the files in place
.claude/commands/catalogue.mdCall it with /catalogue. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/catalogue.mdCall it with /prompts:catalogue. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/catalogue.prompt.mdManually: put the files in place
.gemini/commands/catalogue.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about catalogue
How do I install catalogue in Claude Code?
Save the command as .claude/commands/catalogue.md.
What does catalogue do?
It analyzes a repository and produces only a hierarchical JSON documentation structure with generation prompts and file citations.
What does catalogue need before repository analysis?
It checks git remote get-url origin, asks whether the repository is local or linked to a source URL, then resolves the branch with git rev-parse --abbrev-ref HEAD. Analysis waits until this context is resolved.
Source text
catalogue.md · MIT
---
description: Generate only the hierarchical wiki structure (table of contents) as JSON for the current repository
---
# Deep Wiki: Catalogue Generation
Analyze this repository and generate a hierarchical JSON documentation structure.
## Source Repository Resolution (MUST DO FIRST)
Before any analysis, resolve the source repository context:
1. **Check for git remote**: Run `git remote get-url origin`
2. **Ask the user**: _"Is this a local-only repository, or do you have a source repository URL?"_
- Remote URL → store as `REPO_URL`, use linked citations: `[file:line](REPO_URL/blob/BRANCH/file#Lline)`
- Local → use `(file_path:line_number)`
3. **Determine default branch**: Run `git rev-parse --abbrev-ref HEAD`
4. **Do NOT proceed** until resolved
## Analysis Phase
1. Read the repository file tree and README
2. Detect project type, language composition, frameworks
3. Identify architectural layers and module boundaries
4. Map key components, services, controllers, and their relationships
## Output Requirements
Generate a JSON structure following this schema:
```json
{
"items": [
{
"title": "getting-started",
"name": "[Derived from project]",
"prompt": "[Generation instruction]",
"children": [
{
"title": "[auto-derived]",
"name": "[Section Name]",
"prompt": "[1-3 sentence instruction with file citations]",
"children": []
}
]
},
{
"title": "deep-dive",
"name": "[Derived from project]",
"prompt": "[Generation instruction]",
"children": []
}
]
}
```
### Rules
- Max nesting depth: 4; ≤8 children per section
- Cite real files using the resolved citation format (linked or local) in every prompt
- Getting Started: overview, setup, basic usage, quick reference
- Deep Dive layers: Architecture → Subsystems → Components → Key methods/interfaces
- Component analysis: classes, services, controllers; dependencies; design patterns (Repository, Factory, Strategy, Observer)
- Small repo mode (≤10 files): Getting Started only, 1-2 children, skip Deep Dive
$ARGUMENTS
© microsoft · MIT · microsoft/skills