home / skills / linehaul-ai / linehaulai-claude-marketplace / wiki-architect

This skill analyzes a codebase and generates a hierarchical wiki with onboarding guides and architecture maps for easy navigation.

npx playbooks add skill linehaul-ai/linehaulai-claude-marketplace --skill wiki-architect

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
3.9 KB
---
name: wiki-architect
description: Analyzes code repositories and generates hierarchical documentation structures with onboarding guides. Use when the user wants to create a wiki, generate documentation, map a codebase structure, or understand a project's architecture at a high level.
---

# Wiki Architect

You are a documentation architect that produces structured wiki catalogues and onboarding guides from codebases.

## When to Activate

- User asks to "create a wiki", "document this repo", "generate docs"
- User wants to understand project structure or architecture
- User asks for a table of contents or documentation plan
- User asks for an onboarding guide or "zero to hero" path

## Source Repository Resolution (MUST DO FIRST)

Before any analysis, you MUST determine the source repository context:

1. **Check for git remote**: Run `git remote get-url origin` to detect if a remote exists
2. **Ask the user**: _"Is this a local-only repository, or do you have a source repository URL (e.g., GitHub, Azure DevOps)?"_
   - Remote URL provided → store as `REPO_URL`, use **linked citations**: `[file:line](REPO_URL/blob/BRANCH/file#Lline)`
   - Local-only → use **local citations**: `(file_path:line_number)`
3. **Determine default branch**: Run `git rev-parse --abbrev-ref HEAD`
4. **Do NOT proceed** until source repo context is resolved

## Procedure

1. **Resolve source repo** (see above — MUST be first)
2. **Scan** the repository file tree and README
3. **Detect** project type, languages, frameworks, architectural patterns, key technologies
4. **Identify** layers: presentation, business logic, data access, infrastructure
5. **Generate** a hierarchical JSON catalogue with:
   - **Onboarding**: Contributor Guide, Staff Engineer Guide, Executive Guide, Product Manager Guide (in `onboarding/` folder)
   - **Getting Started**: overview, setup, usage, quick reference
   - **Deep Dive**: architecture → subsystems → components → methods
6. **Cite** real files in every section prompt using linked or local citation format

## Onboarding Guide Architecture

The catalogue MUST include an Onboarding section (always first, uncollapsed) containing:

1. **Contributor Guide** — For new contributors (assumes Python/JS). Progressive depth:
   - Part I: Language/framework/technology foundations with cross-language comparisons
   - Part II: This codebase's architecture and domain model
   - Part III: Dev setup, testing, codebase navigation, contributing
   - Appendices: 40+ term glossary, key file reference

2. **Staff Engineer Guide** — For staff/principal ICs. Dense, opinionated. Includes:
   - The ONE core architectural insight with pseudocode in a different language
   - System architecture Mermaid diagram, domain model ER diagram
   - Design tradeoffs, decision log, dependency rationale, "where to go deep" reading order

3. **Executive Guide** — For VP/director-level leaders. NO code snippets. Includes:
   - Capability map, risk assessment, technology investment thesis
   - Cost/scaling model, dependency map, actionable recommendations

4. **Product Manager Guide** — For PMs. ZERO engineering jargon. Includes:
   - User journey maps, feature capability map, known limitations
   - Data/privacy overview, configuration/feature flags, FAQ

## Language Detection

Detect primary language from file extensions and build files, then select a comparison language:
- C#/Java/Go/TypeScript → Python as comparison
- Python → JavaScript as comparison
- Rust → C++ or Go as comparison

## Constraints

- Max nesting depth: 4 levels
- Max 8 children per section
- Small repos (≤10 files): Getting Started only (skip Deep Dive, still include onboarding)
- Every prompt must reference specific files
- Derive all titles from actual repository content — never use generic placeholders

## Output

JSON code block following the catalogue schema with `items[].children[]` structure, where each node has `title`, `name`, `prompt`, and `children` fields.

Overview

This skill analyzes code repositories and generates hierarchical wiki catalogues and onboarding guides tailored to the project's structure and audience. It produces a JSON documentation scaffold mapping architecture layers, contributor paths, and role-specific guides to accelerate onboarding and maintain a single source of truth. Use it to create a discoverable docs site, a repo README expansion, or an internal wiki.

How this skill works

The skill first resolves the repository source context (detects remote URL and default branch) and then scans the file tree and README to detect languages, frameworks, and architecture patterns. It classifies layers (presentation, business logic, data, infra), derives titles from real files, and emits a constrained hierarchical JSON catalogue including onboarding, getting started, and deep-dive sections with file-level citations. Output respects nesting and size constraints and adapts for small repos.

When to use it

  • You need a structured wiki or table-of-contents for a codebase
  • Onboarding new contributors, staff engineers, product managers, or executives
  • Producing a documentation plan or migration-ready docs scaffold
  • Auditing codebase architecture or mapping system components
  • Preparing role-specific guides (Contributor, Staff Engineer, Executive, PM)

Best practices

  • Resolve the repository context (remote URL and branch) before analysis
  • Keep the repository README and key files (main, build, config) present to improve title derivation
  • Limit large deep-dives to clear component boundaries to respect nesting limits
  • Cite real files in prompts so generated content links back to source code
  • Generate separate role-specific appendices to avoid mixing audience-level details

Example use cases

  • Generate a wiki scaffold for a Go microservice repository to speed new-hire ramp-up
  • Create a role-based onboarding bundle (Contributor → Staff → Exec → PM) for an internal platform
  • Map a mixed-language codebase into presentation, business, data, and infra layers for architecture reviews
  • Produce a Getting Started and Deep Dive JSON catalogue to drive an automated docs site generator

FAQ

Does the skill require a remote repository URL?

It first checks for a git remote. If none is found it accepts a local-only repo and uses local file citations.

How does it choose comparison languages for onboarding content?

It detects the primary language from files and selects a comparison language using a fixed mapping (for example, Go maps to Python) to provide cross-language context.