Skip to main content
command

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.

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/catalogue.md
Open on GitHub

What 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 /catalogue to generate a JSON wiki structure for this repository.
  • Resolve the repository source and branch, then run /catalogue.
  • Use /catalogue to outline architecture, subsystems, and components.

How to install catalogue

Manually: put the files in place

.claude/commands/catalogue.md

Call it with /catalogue. For all projects use ~/.claude/commands/

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

Similar slash commands

All slash commands for Writing and docs →

From the same set242

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor