Skip to content
Skillpedia
General coding260k Β· #570

code-wiki

What it does

This skill has your AI read a software project and write organized documentation about how it works. It is for developers who need to learn an unfamiliar codebase or give it a stable reference.

When to use it

  • βœ“When you want documentation for a code project you have not worked on before.
  • βœ“When you want architecture diagrams and module pages written for a repository.
  • βœ“When you share a GitHub link and ask for a documented wiki of the project.

Skill link

https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/software-development/code-wiki/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/software-development/code-wiki/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œCreate a wiki for this repository with an overview, the main modules and diagrams of how they connect.”

5 new skills a week. 1 minute to read.

How it works

The skill has your AI read the project files, then writes Markdown pages with Mermaid diagrams. It uses only the tools already available in the session and needs no extra services.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Code Wiki Skill

Generate a full wiki for any codebase β€” overview, architecture, per-module deep-dives, Mermaid class and sequence diagrams. Inspired by Google CodeWiki, but works on local repos, private repos, and any language. Uses only existing Hermes tools (terminal, read_file, search_files, write_file); no Docker, no external services, no extra dependencies.

This skill produces reference documentation (what/how). It does not produce strategic narrative (why β€” that's a different skill).

When to Use

  • User says "document this codebase", "generate a wiki", "make architecture diagrams"
  • Onboarding to an unfamiliar repo and wants a structured reference
  • User points at a GitHub URL and asks for documentation
  • Need a stable artifact (markdown + Mermaid) that renders on GitHub

Do NOT use this for:

  • Single-file or single-function documentation β€” just answer directly
  • API reference for one specific endpoint β€” use read_file and answer inline
  • Strategic "why does this exist" narrative β€” different skill, different purpose
  • Codebases the user is actively developing in this session β€” just answer questions as they come

Prerequisites

  • No env vars required.
  • git on PATH for repo SHA tracking and remote clones.
  • Optional: pygount for language-breakdown stats (see the codebase-inspection skill).

How to Run

Invoke through the terminal tool from the target repo's root, then use read_file / search_files / write_file to produce the wiki. Default output location is ~/.hermes/wikis/<repo-name>/. Only write into the repo (docs/wiki/) when the user explicitly requests it.

Quick Reference

Step Action
1 Resolve target β€” local cwd, given path, or git clone --depth 50 <url> to a temp dir
2 Scan structure β€” ls, find -maxdepth 3, manifest files, README
3 Pick 8–10 modules to document
4 Write README.md (overview + module map)
5 Write architecture.md with Mermaid flowchart
6 Write per-module docs in modules/
7 Write diagrams/class-diagram.md (Mermaid classDiagram)
8 Write diagrams/sequences.md (Mermaid sequenceDiagram, 2–4 workflows)
9 Write getting-started.md
10 Write api.md if applicable, else skip
11 Write .codewiki-state.json
12 Report paths to user

Procedure

1. Resolve the target

For a GitHub URL:

WIKI_TMP=$(mktemp -d)
git clone --depth 50 <url> "$WIKI_TMP/repo"
cd "$WIKI_TMP/repo"
REPO_SHA=$(git rev-parse HEAD)
REPO_NAME=$(basename <url> .git)

For a local path (or cwd if none given):

cd <path>
REPO_SHA=$(git rev-parse HEAD 2>/dev/null || echo "uncommitted")
REPO_NAME=$(basename "$PWD")

Then set the output dir:

OUTPUT_DIR="$HOME/.hermes/wikis/$REPO_NAME"
mkdir -p "$OUTPUT_DIR/modules" "$OUTPUT_DIR/diagrams"

2. Scan repo structure

Use the terminal tool for the shell work, read_file for manifests:

# Shallow tree first
ls -la

# Deeper tree, noise filtered
find . -type d \
  -not -path '*/\.*' \
  -not -path '*/node_modules*' \
  -not -path '*/venv*' \
  -not -path '*/__pycache__*' \
  -not -path '*/dist*' \
  -not -path '*/build*' \
  -not -path '*/target*' \
  -maxdepth 3 | sort

# Language breakdown (skip if pygount unavailable)
pygount --format=summary \
  --folders-to-skip=".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,target" \
  . 2>/dev/null || true

Then read_file the relevant manifests (package.json, pyproject.toml, setup.py, Cargo.toml, go.mod, pom.xml, build.gradle) and the project README. Use search_files target='files' to find them rather than guessing names.

3. Pick modules to document

Cap initial pass at 8–10 modules. Heuristics by language:

  • Python: top-level packages (dirs with __init__.py), plus subsystem dirs
  • JS/TS: src/<subdir>, top-level workspace dirs
  • Rust: each crate in a workspace, or top-level src/<module> dirs
  • Go: each top-level package directory
  • Mixed/unfamiliar: top-level directories that contain source code (not config, not tests)

For very large repos, prioritize by:

  1. Imported-from count (a module imported by many is core)
  2. LOC (bigger modules usually warrant their own doc)
  3. Mentions in README / top-level docs

State the module list to the user before generating per-module docs on big repos β€” gives them a chance to redirect.

4. Write README.md

read_file the actual project README plus the top 2–3 en

FAQ

Is it good for a single function?

No. The skill says a single file or function is better answered directly.

Does it explain why the code exists?

No. The skill says it writes reference documentation about what the code does and how, not the reasons behind it.

Does it need Docker?

No. The skill says it needs no Docker or external services, though git helps with repository tracking.

Details

Original description by the author

Generate wiki docs + Mermaid diagrams for any codebase.

repo: NousResearch/hermes-agent

Popularity

GitHub stars
260k
Ranking position
#570
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills