본문으로 건너뛰기
Skillpedia
일반 코딩260k · #570

code-wiki

하는 일

이 스킬은 AI가 소프트웨어 프로젝트를 읽고 그것이 어떻게 작동하는지에 대한 정리된 문서를 쓰게 합니다. 익숙하지 않은 코드베이스를 배우거나 안정적인 참고 자료가 필요한 개발자를 위한 것입니다.

사용하는 경우

  • ✓처음 보는 코드 프로젝트에 대한 문서가 필요할 때.
  • ✓저장소를 위한 아키텍처 다이어그램과 모듈 페이지를 원할 때.
  • ✓GitHub 링크를 공유하고 프로젝트의 문서화된 위키를 요청할 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

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.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 저장소의 위키를 만들어 주세요. 개요, 주요 모듈, 모듈이 연결되는 방식의 다이어그램을 넣어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 AI가 프로젝트 파일을 읽은 뒤 Mermaid 다이어그램이 포함된 Markdown 페이지를 쓰게 합니다. 세션에서 이미 쓸 수 있는 도구만 쓰며 추가 서비스가 필요 없습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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

자주 묻는 질문

단일 함수에도 좋나요?

아니요. 스킬은 단일 파일이나 함수는 직접 답하는 것이 더 낫다고 말합니다.

코드가 왜 존재하는지도 설명하나요?

아니요. 스킬은 이유가 아니라 코드가 무엇을 하고 어떻게 작동하는지에 대한 참고 문서를 쓴다고 말합니다.

Docker가 필요한가요?

아니요. 스킬은 Docker나 외부 서비스가 필요 없으며, git은 저장소 추적에 도움이 된다고 말합니다.

상세 정보

작성자의 원본 설명

Generate wiki docs + Mermaid diagrams for any codebase.

repo: NousResearch/hermes-agent

인기도

GitHub 스타
260k
순위
#570
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬