[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DDJ15MDQE55PZXWYV7RD7G":3,"skill-same:01M6DDJ15MDQE55PZXWYV7RD7G":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":58,"commitSha":59,"skillDirectory":60,"forksCount":61,"repositoryHtmlUrl":62,"repositoryHomepageUrl":6,"ownerHtmlUrl":63,"ownerBlogUrl":6,"ownerDescription":64,"updatedAt":65,"install":66,"resources":79},"01M6DDJ15MDQE55PZXWYV7RD7G","code-wiki",null,"Generate wiki docs + Mermaid diagrams for any codebase.","zapabob\u002FSkills","zapabob","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F130830376?v=4","01M6DBMYZAGRTFQDSQYW3W764P","峯岸 亮","01M6DBMZ3GKDSJ01NZ9XTZD7JD",2,"MIT","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Farchive\u002Fskill-md-reviewed\u002Fsha256\u002F2a\u002F2ab9c0595f064fda5f74b9c28b740a149d415e3871f953b4edec012b66705c78\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"code","code wiki","wiki","analysis","mermaid diagrams","code-analysis","diagrams","management","repo","hermes agent","hermes","docs","github","macos","generate","mermaid","documentation","windows","architecture","linux","2026-11-10 10:12:30",false,"---\nname: code-wiki\ndescription: \"Generate wiki docs + Mermaid diagrams for any codebase.\"\nversion: 0.1.0\nauthor: Teknium (teknium1), Hermes Agent\nlicense: MIT\nplatforms: [linux, macos, windows]\nmetadata:\n  hermes:\n    tags: [Documentation, Mermaid, Architecture, Diagrams, Wiki, Code-Analysis]\n    related_skills: [github-repo-management]\n---\n\n# Code Wiki Skill\n\nGenerate 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.\n\nThis skill produces **reference documentation** (what\u002Fhow). It does not produce strategic narrative (why — that's a different skill).\n\n## When to Use\n\n- User says \"document this codebase\", \"generate a wiki\", \"make architecture diagrams\"\n- Onboarding to an unfamiliar repo and wants a structured reference\n- User points at a GitHub URL and asks for documentation\n- Need a stable artifact (markdown + Mermaid) that renders on GitHub\n\nDo NOT use this for:\n- Single-file or single-function documentation — just answer directly\n- API reference for one specific endpoint — use `read_file` and answer inline\n- Strategic \"why does this exist\" narrative — different skill, different purpose\n- Codebases the user is actively developing in this session — just answer questions as they come\n\n## Prerequisites\n\n- No env vars required.\n- `git` on PATH for repo SHA tracking and remote clones.\n- Optional: `pygount` for language-breakdown stats (see the `codebase-inspection` skill).\n\n## How to Run\n\nInvoke through the `terminal` tool from the target repo's root, then use `read_file` \u002F `search_files` \u002F `write_file` to produce the wiki. Default output location is `~\u002F.hermes\u002Fwikis\u002F\u003Crepo-name>\u002F`. Only write into the repo (`docs\u002Fwiki\u002F`) when the user explicitly requests it.\n\n## Quick Reference\n\n| Step | Action |\n|---|---|\n| 1 | Resolve target — local cwd, given path, or `git clone --depth 50 \u003Curl>` to a temp dir |\n| 2 | Scan structure — `ls`, `find -maxdepth 3`, manifest files, README |\n| 3 | Pick 8–10 modules to document |\n| 4 | Write `README.md` (overview + module map) |\n| 5 | Write `architecture.md` with Mermaid flowchart |\n| 6 | Write per-module docs in `modules\u002F` |\n| 7 | Write `diagrams\u002Fclass-diagram.md` (Mermaid classDiagram) |\n| 8 | Write `diagrams\u002Fsequences.md` (Mermaid sequenceDiagram, 2–4 workflows) |\n| 9 | Write `getting-started.md` |\n| 10 | Write `api.md` if applicable, else skip |\n| 11 | Write `.codewiki-state.json` |\n| 12 | Report paths to user |\n\n## Procedure\n\n### 1. Resolve the target\n\nFor a GitHub URL:\n\n```bash\nWIKI_TMP=$(mktemp -d)\ngit clone --depth 50 \u003Curl> \"$WIKI_TMP\u002Frepo\"\ncd \"$WIKI_TMP\u002Frepo\"\nREPO_SHA=$(git rev-parse HEAD)\nREPO_NAME=$(basename \u003Curl> .git)\n```\n\nFor a local path (or cwd if none given):\n\n```bash\ncd \u003Cpath>\nREPO_SHA=$(git rev-parse HEAD 2>\u002Fdev\u002Fnull || echo \"uncommitted\")\nREPO_NAME=$(basename \"$PWD\")\n```\n\nThen set the output dir:\n\n```bash\nOUTPUT_DIR=\"$HOME\u002F.hermes\u002Fwikis\u002F$REPO_NAME\"\nmkdir -p \"$OUTPUT_DIR\u002Fmodules\" \"$OUTPUT_DIR\u002Fdiagrams\"\n```\n\n### 2. Scan repo structure\n\nUse the `terminal` tool for the shell work, `read_file` for manifests:\n\n```bash\n# Shallow tree first\nls -la\n\n# Deeper tree, noise filtered\nfind . -type d \\\n  -not -path '*\u002F\\.*' \\\n  -not -path '*\u002Fnode_modules*' \\\n  -not -path '*\u002Fvenv*' \\\n  -not -path '*\u002F__pycache__*' \\\n  -not -path '*\u002Fdist*' \\\n  -not -path '*\u002Fbuild*' \\\n  -not -path '*\u002Ftarget*' \\\n  -maxdepth 3 | sort\n\n# Language breakdown (skip if pygount unavailable)\npygount --format=summary \\\n  --folders-to-skip=\".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,target\" \\\n  . 2>\u002Fdev\u002Fnull || true\n```\n\nThen `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.\n\n### 3. Pick modules to document\n\nCap initial pass at **8–10 modules**. Heuristics by language:\n\n- Python: top-level packages (dirs with `__init__.py`), plus subsystem dirs\n- JS\u002FTS: `src\u002F\u003Csubdir>`, top-level workspace dirs\n- Rust: each crate in a workspace, or top-level `src\u002F\u003Cmodule>` dirs\n- Go: each top-level package directory\n- Mixed\u002Funfamiliar: top-level directories that contain source code (not config, not tests)\n\nFor very large repos, prioritize by:\n1. Imported-from count (a module imported by many is core)\n2. LOC (bigger modules usually warrant their own doc)\n3. Mentions in README \u002F top-level docs\n\nState the module list to the user before generating per-module docs on big repos — gives them a chance to redirect.\n\n### 4. Write `README.md`\n\n`read_file` the actual project README plus the top 2–3 entry-point files. Then `write_file`:\n\n````markdown\n# \u003CProject Name>\n\n\u003COne paragraph: what it is and what it's for. Self-contained — don't assume the\nreader has the source README.>\n\n## Key Concepts\n\n- **\u003CConcept 1>** — \u003Cone line>\n- **\u003CConcept 2>** — \u003Cone line>\n\n## Entry Points\n\n- [`path\u002Fto\u002Fmain.py`](\u003Clink>) — \u003Cwhat runs when you start it>\n- [`path\u002Fto\u002Fcli.py`](\u003Clink>) — \u003CCLI surface>\n\n## High-Level Architecture\n\n\u003C2-3 sentences. Detail goes in architecture.md.>\n\nSee [architecture.md](architecture.md).\n\n## Module Map\n\n| Module | Purpose |\n|---|---|\n| [`\u003Cmodule>`](modules\u002F\u003Cmodule>.md) | \u003Cone-line purpose> |\n\n## Getting Started\n\nSee [getting-started.md](getting-started.md).\n````\n\nFor link targets in local mode use relative paths. For cloned repos use `https:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Fblob\u002F\u003Csha>\u002F\u003Cpath>` so links survive future commits.\n\n### 5. Write `architecture.md`\n\n````markdown\n# Architecture\n\n\u003C2-3 paragraphs: shape of the system. What talks to what. Where data enters,\nwhere it exits, where state lives.>\n\n## Components\n\n- **\u003CComponent>** — \u003C1-2 sentences>. See [`modules\u002F\u003Cmodule>.md`](modules\u002F\u003Cmodule>.md).\n\n## System Diagram\n\n```mermaid\nflowchart TD\n    User([User]) --> Entry[Entry Point]\n    Entry --> Core[Core Engine]\n    Core --> StorageA[(Database)]\n    Core --> ExternalAPI{{External API}}\n```\n\n## Data Flow\n\n1. **\u003CStep>** — [`\u003Cfile>`](\u003Clink>)\n2. **\u003CStep>** — [`\u003Cfile>`](\u003Clink>)\n\n## Key Design Decisions\n\n- \u003CAnything load-bearing the reader should know>\n````\n\n**Mermaid shape semantics:**\n- `[]` = component\n- `[()]` = database \u002F storage\n- `{{}}` = external service\n- `(())` = entry point or terminal\n- `-->` = sync call, `-.->` = async\u002Fevent\n\nCap at ~20 nodes per diagram. Split into sub-diagrams if larger.\n\n### 6. Write per-module docs in `modules\u002F`\n\nFor each selected module, inspect its layout with `ls`, identify 3–5 most important files (by size, by being named `core.py` \u002F `main.py` \u002F `__init__.py`, by being imported a lot), then `read_file` those files (use `offset` \u002F `limit` to read only what you need; prefer `search_files` for specific symbols).\n\n````markdown\n# Module: `\u003Cmodule>`\n\n\u003C1-2 sentence purpose.>\n\n## Responsibilities\n\n- \u003Cbullet>\n- \u003Cbullet>\n\n## Key Files\n\n- [`\u003Cmodule>\u002F\u003Cfile>`](\u003Clink>) — \u003Cwhat it does>\n\n## Public API\n\n\u003CFunctions\u002Fclasses\u002Fconstants other code uses. Group related items. Show\nsignatures, not full implementations.>\n\n## Internal Structure\n\n\u003CHow the module is organized internally. State management.>\n\n## Dependencies\n\n- **Used by:** \u003Cother modules>\n- **Uses:** \u003Cother modules + external libs>\n\n## Notable Patterns \u002F Gotchas\n\n- \u003CAnything non-obvious>\n````\n\n### 7. Write `diagrams\u002Fclass-diagram.md`\n\nPick the 5–10 most important classes\u002Ftypes. `read_file` them, then write:\n\n````markdown\n# Class Diagram\n\n## Core Types\n\n```mermaid\nclassDiagram\n    class Agent {\n        +string name\n        +list~Tool~ tools\n        +chat(message) string\n    }\n    class Tool {\n        \u003C\u003Cinterface>>\n        +name string\n        +execute(args) any\n    }\n    Agent --> Tool : uses\n    Tool \u003C|-- TerminalTool\n    Tool \u003C|-- WebTool\n```\n\n## Notes\n\n\u003CAnything the diagram can't express — lifecycle, threading, etc.>\n````\n\nFor languages without classes (Go, C, Rust): use the diagram for struct relationships, or skip class-diagram.md and explain it in prose in architecture.md. Don't force-fit.\n\n### 8. Write `diagrams\u002Fsequences.md`\n\nPick 2–4 of the most important workflows. Trace each call path through the code (read entry point, follow function calls), then:\n\n````markdown\n# Sequence Diagrams\n\n## Workflow: \u003CName>\n\n\u003C1 sentence describing what this does and when it runs.>\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant CLI\n    participant Agent\n    participant LLM\n    User->>CLI: types message\n    CLI->>Agent: chat(message)\n    Agent->>LLM: API call\n    LLM-->>Agent: response + tool_calls\n    Agent->>Agent: execute tools\n    Agent-->>CLI: final response\n```\n\n### Walkthrough\n\n1. **User input** — [`cli.py:HermesCLI.run_session`](\u003Clink>)\n2. **Message dispatch** — [`run_agent.py:AIAgent.chat`](\u003Clink>)\n````\n\nDon't invent participants. Every box must correspond to a real component the reader can find in the code.\n\n### 9. Write `getting-started.md`\n\n````markdown\n# Getting Started\n\n## Prerequisites\n\n\u003CFrom manifest files + README. Be specific — versions if pinned.>\n\n## Installation\n\n```bash\n\u003Cexact commands>\n```\n\n## First Run\n\n```bash\n\u003Cminimum command to see the system do something useful>\n```\n\n## Common Workflows\n\n### \u003CWorkflow 1>\n\u003Ccommands>\n\n## Configuration\n\n- `\u003Cconfig-file>` — \u003Cwhat it controls>\n- Env var `\u003CVAR>` — \u003Cwhat it controls>\n\n## Where to Go Next\n\n- Architecture: [architecture.md](architecture.md)\n- Module reference: [README.md#module-map](README.md#module-map)\n````\n\n### 10. Write `api.md` (skip if not applicable)\n\nOnly write this if the project is a library or API server. If it is:\n\n- Find the public API surface (`__init__.py` exports, OpenAPI specs, route handlers, exported types)\n- Document each public entry with signature, parameters, return type, one-line description\n- Group by category\n\n### 11. Write the state file\n\n```bash\ncat > \"$OUTPUT_DIR\u002F.codewiki-state.json\" \u003C\u003CEOF\n{\n  \"repo_name\": \"$REPO_NAME\",\n  \"source_path\": \"$PWD\",\n  \"source_sha\": \"$REPO_SHA\",\n  \"generated_at\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\n  \"generator\": \"hermes-agent code-wiki skill v0.1.0\",\n  \"modules_documented\": []\n}\nEOF\n```\n\n### 12. Report to user\n\nState exactly what was generated and where:\n\n```\nGenerated wiki at ~\u002F.hermes\u002Fwikis\u002F\u003Crepo-name>\u002F:\n  README.md                   project overview, module map\n  architecture.md             system architecture + flowchart\n  getting-started.md          setup, first run, workflows\n  modules\u002F\u003CN files>           per-module deep-dives\n  diagrams\u002Farchitecture.md    Mermaid flowchart\n  diagrams\u002Fclass-diagram.md   Mermaid class diagram\n  diagrams\u002Fsequences.md       Mermaid sequence diagrams\n```\n\nIf you cloned to a temp dir, remind the user it can be removed (`rm -rf \"$WIKI_TMP\"`) after they've reviewed the wiki.\n\n## Scope Control\n\nGenerating a full wiki for a 500K-LOC monorepo is wildly token-expensive. Default to bounded scope:\n\n- Initial scan: max depth 3 directories\n- Per-module docs: cap at 10 modules unless user expands scope\n- Per-file reads: prefer `search_files` for symbols + `read_file` with `offset`\u002F`limit` over full reads\n- Skip vendored code (`vendor\u002F`, `third_party\u002F`, generated code, `_pb2.py`, `.min.js`)\n\nIf the user says \"do the whole thing exhaustively\", believe them — but ballpark the cost first: \"this repo has ~340 source files, comprehensive coverage will be expensive — confirm?\"\n\n## Re-Run \u002F Update\n\nIf `.codewiki-state.json` already exists at the target path:\n\n- Read it for previous SHA and module list\n- If source SHA matches: ask user if they want to regenerate or skip\n- If SHA differs: offer to regenerate only modules with changed files (`git diff --name-only \u003Cold-sha> HEAD`)\n\nFull incremental-regeneration is a future enhancement — for now, regenerating the whole thing is acceptable.\n\n## Pitfalls\n\n- **Fabricating components.** Every diagram node and claimed function call must be in the source. `read_file` before writing. The single biggest failure mode for auto-generated docs is plausible-sounding fabrication.\n- **Generic AI prose.** \"This module is responsible for...\" is content-free. Say what the module actually does in domain-specific terms.\n- **Restating code as prose.** A module doc that says \"the `process` function processes things by calling `process_item` on each item\" is worse than just linking to the function.\n- **Mermaid > 50 nodes.** They don't render legibly. Split them.\n- **Documenting tests, generated code, or vendored deps as if they were product code.** Skip them.\n- **In-repo output without asking.** Default is `~\u002F.hermes\u002Fwikis\u002F`. Only write into the repo when the user explicitly requests it.\n- **Mermaid special chars need quotes:** `A[\"Tool \u002F Agent\"]` not `A[Tool \u002F Agent]`. `\u003Cbr>` for line breaks inside a node.\n- **Nested code fences in SKILL.md.** When writing a markdown example that contains a Mermaid block, use 4-backtick outer fences so the 3-backtick inner ` ```mermaid ` doesn't close the outer. (This SKILL.md does it.)\n- **classDiagram generics** render as `~T~` (e.g. `List~Tool~`), not `\u003CT>`.\n- **GitHub Mermaid theme is fixed** — don't include `%%{init: ...}%%` blocks; they're stripped on render.\n\n## Verification\n\nAfter writing, verify:\n\n1. **Mermaid blocks balance** — opens equal closes per file:\n   ```bash\n   for f in \"$OUTPUT_DIR\"\u002Fdiagrams\u002F*.md \"$OUTPUT_DIR\"\u002Farchitecture.md; do\n     opens=$(grep -c '^```mermaid' \"$f\")\n     total=$(grep -c '^```' \"$f\")\n     echo \"$f: $opens mermaid blocks, $total total fences (expect total = opens*2)\"\n   done\n   ```\n2. **All expected files exist** —\n   ```bash\n   ls \"$OUTPUT_DIR\"\u002F{README.md,architecture.md,getting-started.md,.codewiki-state.json} \\\n      \"$OUTPUT_DIR\"\u002Fmodules\u002F \"$OUTPUT_DIR\"\u002Fdiagrams\u002F\n   ```\n3. **Module count matches what you intended** — `ls \"$OUTPUT_DIR\u002Fmodules\" | wc -l` should equal the number of modules you committed to in Step 3.\n4. **No fabricated paths** — sanity-check 2–3 source links resolve to real files.\n","# Code Wiki Skill\n\nGenerate 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.\n\nThis skill produces **reference documentation** (what\u002Fhow). It does not produce strategic narrative (why — that's a different skill).\n\n## When to Use\n\n- User says \"document this codebase\", \"generate a wiki\", \"make architecture diagrams\"\n- Onboarding to an unfamiliar repo and wants a structured reference\n- User points at a GitHub URL and asks for documentation\n- Need a stable artifact (markdown + Mermaid) that renders on GitHub\n\nDo NOT use this for:\n- Single-file or single-function documentation — just answer directly\n- API reference for one specific endpoint — use `read_file` and answer inline\n- Strategic \"why does this exist\" narrative — different skill, different purpose\n- Codebases the user is actively developing in this session — just answer questions as they come\n\n## Prerequisites\n\n- No env vars required.\n- `git` on PATH for repo SHA tracking and remote clones.\n- Optional: `pygount` for language-breakdown stats (see the `codebase-inspection` skill).\n\n## How to Run\n\nInvoke through the `terminal` tool from the target repo's root, then use `read_file` \u002F `search_files` \u002F `write_file` to produce the wiki. Default output location is `~\u002F.hermes\u002Fwikis\u002F\u003Crepo-name>\u002F`. Only write into the repo (`docs\u002Fwiki\u002F`) when the user explicitly requests it.\n\n## Quick Reference\n\n| Step | Action |\n|---|---|\n| 1 | Resolve target — local cwd, given path, or `git clone --depth 50 \u003Curl>` to a temp dir |\n| 2 | Scan structure — `ls`, `find -maxdepth 3`, manifest files, README |\n| 3 | Pick 8–10 modules to document |\n| 4 | Write `README.md` (overview + module map) |\n| 5 | Write `architecture.md` with Mermaid flowchart |\n| 6 | Write per-module docs in `modules\u002F` |\n| 7 | Write `diagrams\u002Fclass-diagram.md` (Mermaid classDiagram) |\n| 8 | Write `diagrams\u002Fsequences.md` (Mermaid sequenceDiagram, 2–4 workflows) |\n| 9 | Write `getting-started.md` |\n| 10 | Write `api.md` if applicable, else skip |\n| 11 | Write `.codewiki-state.json` |\n| 12 | Report paths to user |\n\n## Procedure\n\n### 1. Resolve the target\n\nFor a GitHub URL:\n\n```bash\nWIKI_TMP=$(mktemp -d)\ngit clone --depth 50 \u003Curl> \"$WIKI_TMP\u002Frepo\"\ncd \"$WIKI_TMP\u002Frepo\"\nREPO_SHA=$(git rev-parse HEAD)\nREPO_NAME=$(basename \u003Curl> .git)\n```\n\nFor a local path (or cwd if none given):\n\n```bash\ncd \u003Cpath>\nREPO_SHA=$(git rev-parse HEAD 2>\u002Fdev\u002Fnull || echo \"uncommitted\")\nREPO_NAME=$(basename \"$PWD\")\n```\n\nThen set the output dir:\n\n```bash\nOUTPUT_DIR=\"$HOME\u002F.hermes\u002Fwikis\u002F$REPO_NAME\"\nmkdir -p \"$OUTPUT_DIR\u002Fmodules\" \"$OUTPUT_DIR\u002Fdiagrams\"\n```\n\n### 2. Scan repo structure\n\nUse the `terminal` tool for the shell work, `read_file` for manifests:\n\n```bash\n# Shallow tree first\nls -la\n\n# Deeper tree, noise filtered\nfind . -type d \\\n  -not -path '*\u002F\\.*' \\\n  -not -path '*\u002Fnode_modules*' \\\n  -not -path '*\u002Fvenv*' \\\n  -not -path '*\u002F__pycache__*' \\\n  -not -path '*\u002Fdist*' \\\n  -not -path '*\u002Fbuild*' \\\n  -not -path '*\u002Ftarget*' \\\n  -maxdepth 3 | sort\n\n# Language breakdown (skip if pygount unavailable)\npygount --format=summary \\\n  --folders-to-skip=\".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,target\" \\\n  . 2>\u002Fdev\u002Fnull || true\n```\n\nThen `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.\n\n### 3. Pick modules to document\n\nCap initial pass at **8–10 modules**. Heuristics by language:\n\n- Python: top-level packages (dirs with `__init__.py`), plus subsystem dirs\n- JS\u002FTS: `src\u002F\u003Csubdir>`, top-level workspace dirs\n- Rust: each crate in a workspace, or top-level `src\u002F\u003Cmodule>` dirs\n- Go: each top-level package directory\n- Mixed\u002Funfamiliar: top-level directories that contain source code (not config, not tests)\n\nFor very large repos, prioritize by:\n1. Imported-from count (a module imported by many is core)\n2. LOC (bigger modules usually warrant their own doc)\n3. Mentions in README \u002F top-level docs\n\nState the module list to the user before generating per-module docs on big repos — gives them a chance to redirect.\n\n### 4. Write `README.md`\n\n`read_file` the actual project README plus the top 2–3 entry-point files. Then `write_file`:\n\n````markdown\n# \u003CProject Name>\n\n\u003COne paragraph: what it is and what it's for. Self-contained — don't assume the\nreader has the source README.>\n\n## Key Concepts\n\n- **\u003CConcept 1>** — \u003Cone line>\n- **\u003CConcept 2>** — \u003Cone line>\n\n## Entry Points\n\n- [`path\u002Fto\u002Fmain.py`](\u003Clink>) — \u003Cwhat runs when you start it>\n- [`path\u002Fto\u002Fcli.py`](\u003Clink>) — \u003CCLI surface>\n\n## High-Level Architecture\n\n\u003C2-3 sentences. Detail goes in architecture.md.>\n\nSee [architecture.md](architecture.md).\n\n## Module Map\n\n| Module | Purpose |\n|---|---|\n| [`\u003Cmodule>`](modules\u002F\u003Cmodule>.md) | \u003Cone-line purpose> |\n\n## Getting Started\n\nSee [getting-started.md](getting-started.md).\n````\n\nFor link targets in local mode use relative paths. For cloned repos use `https:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Fblob\u002F\u003Csha>\u002F\u003Cpath>` so links survive future commits.\n\n### 5. Write `architecture.md`\n\n````markdown\n# Architecture\n\n\u003C2-3 paragraphs: shape of the system. What talks to what. Where data enters,\nwhere it exits, where state lives.>\n\n## Components\n\n- **\u003CComponent>** — \u003C1-2 sentences>. See [`modules\u002F\u003Cmodule>.md`](modules\u002F\u003Cmodule>.md).\n\n## System Diagram\n\n```mermaid\nflowchart TD\n    User([User]) --> Entry[Entry Point]\n    Entry --> Core[Core Engine]\n    Core --> StorageA[(Database)]\n    Core --> ExternalAPI{{External API}}\n```\n\n## Data Flow\n\n1. **\u003CStep>** — [`\u003Cfile>`](\u003Clink>)\n2. **\u003CStep>** — [`\u003Cfile>`](\u003Clink>)\n\n## Key Design Decisions\n\n- \u003CAnything load-bearing the reader should know>\n````\n\n**Mermaid shape semantics:**\n- `[]` = component\n- `[()]` = database \u002F storage\n- `{{}}` = external service\n- `(())` = entry point or terminal\n- `-->` = sync call, `-.->` = async\u002Fevent\n\nCap at ~20 nodes per diagram. Split into sub-diagrams if larger.\n\n### 6. Write per-module docs in `modules\u002F`\n\nFor each selected module, inspect its layout with `ls`, identify 3–5 most important files (by size, by being named `core.py` \u002F `main.py` \u002F `__init__.py`, by being imported a lot), then `read_file` those files (use `offset` \u002F `limit` to read only what you need; prefer `search_files` for specific symbols).\n\n````markdown\n# Module: `\u003Cmodule>`\n\n\u003C1-2 sentence purpose.>\n\n## Responsibilities\n\n- \u003Cbullet>\n- \u003Cbullet>\n\n## Key Files\n\n- [`\u003Cmodule>\u002F\u003Cfile>`](\u003Clink>) — \u003Cwhat it does>\n\n## Public API\n\n\u003CFunctions\u002Fclasses\u002Fconstants other code uses. Group related items. Show\nsignatures, not full implementations.>\n\n## Internal Structure\n\n\u003CHow the module is organized internally. State management.>\n\n## Dependencies\n\n- **Used by:** \u003Cother modules>\n- **Uses:** \u003Cother modules + external libs>\n\n## Notable Patterns \u002F Gotchas\n\n- \u003CAnything non-obvious>\n````\n\n### 7. Write `diagrams\u002Fclass-diagram.md`\n\nPick the 5–10 most important classes\u002Ftypes. `read_file` them, then write:\n\n````markdown\n# Class Diagram\n\n## Core Types\n\n```mermaid\nclassDiagram\n    class Agent {\n        +string name\n        +list~Tool~ tools\n        +chat(message) string\n    }\n    class Tool {\n        \u003C\u003Cinterface>>\n        +name string\n        +execute(args) any\n    }\n    Agent --> Tool : uses\n    Tool \u003C|-- TerminalTool\n    Tool \u003C|-- WebTool\n```\n\n## Notes\n\n\u003CAnything the diagram can't express — lifecycle, threading, etc.>\n````\n\nFor languages without classes (Go, C, Rust): use the diagram for struct relationships, or skip class-diagram.md and explain it in prose in architecture.md. Don't force-fit.\n\n### 8. Write `diagrams\u002Fsequences.md`\n\nPick 2–4 of the most important workflows. Trace each call path through the code (read entry point, follow function calls), then:\n\n````markdown\n# Sequence Diagrams\n\n## Workflow: \u003CName>\n\n\u003C1 sentence describing what this does and when it runs.>\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant CLI\n    participant Agent\n    participant LLM\n    User->>CLI: types message\n    CLI->>Agent: chat(message)\n    Agent->>LLM: API call\n    LLM-->>Agent: response + tool_calls\n    Agent->>Agent: execute tools\n    Agent-->>CLI: final response\n```\n\n### Walkthrough\n\n1. **User input** — [`cli.py:HermesCLI.run_session`](\u003Clink>)\n2. **Message dispatch** — [`run_agent.py:AIAgent.chat`](\u003Clink>)\n````\n\nDon't invent participants. Every box must correspond to a real component the reader can find in the code.\n\n### 9. Write `getting-started.md`\n\n````markdown\n# Getting Started\n\n## Prerequisites\n\n\u003CFrom manifest files + README. Be specific — versions if pinned.>\n\n## Installation\n\n```bash\n\u003Cexact commands>\n```\n\n## First Run\n\n```bash\n\u003Cminimum command to see the system do something useful>\n```\n\n## Common Workflows\n\n### \u003CWorkflow 1>\n\u003Ccommands>\n\n## Configuration\n\n- `\u003Cconfig-file>` — \u003Cwhat it controls>\n- Env var `\u003CVAR>` — \u003Cwhat it controls>\n\n## Where to Go Next\n\n- Architecture: [architecture.md](architecture.md)\n- Module reference: [README.md#module-map](README.md#module-map)\n````\n\n### 10. Write `api.md` (skip if not applicable)\n\nOnly write this if the project is a library or API server. If it is:\n\n- Find the public API surface (`__init__.py` exports, OpenAPI specs, route handlers, exported types)\n- Document each public entry with signature, parameters, return type, one-line description\n- Group by category\n\n### 11. Write the state file\n\n```bash\ncat > \"$OUTPUT_DIR\u002F.codewiki-state.json\" \u003C\u003CEOF\n{\n  \"repo_name\": \"$REPO_NAME\",\n  \"source_path\": \"$PWD\",\n  \"source_sha\": \"$REPO_SHA\",\n  \"generated_at\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\n  \"generator\": \"hermes-agent code-wiki skill v0.1.0\",\n  \"modules_documented\": []\n}\nEOF\n```\n\n### 12. Report to user\n\nState exactly what was generated and where:\n\n```\nGenerated wiki at ~\u002F.hermes\u002Fwikis\u002F\u003Crepo-name>\u002F:\n  README.md                   project overview, module map\n  architecture.md             system architecture + flowchart\n  getting-started.md          setup, first run, workflows\n  modules\u002F\u003CN files>           per-module deep-dives\n  diagrams\u002Farchitecture.md    Mermaid flowchart\n  diagrams\u002Fclass-diagram.md   Mermaid class diagram\n  diagrams\u002Fsequences.md       Mermaid sequence diagrams\n```\n\nIf you cloned to a temp dir, remind the user it can be removed (`rm -rf \"$WIKI_TMP\"`) after they've reviewed the wiki.\n\n## Scope Control\n\nGenerating a full wiki for a 500K-LOC monorepo is wildly token-expensive. Default to bounded scope:\n\n- Initial scan: max depth 3 directories\n- Per-module docs: cap at 10 modules unless user expands scope\n- Per-file reads: prefer `search_files` for symbols + `read_file` with `offset`\u002F`limit` over full reads\n- Skip vendored code (`vendor\u002F`, `third_party\u002F`, generated code, `_pb2.py`, `.min.js`)\n\nIf the user says \"do the whole thing exhaustively\", believe them — but ballpark the cost first: \"this repo has ~340 source files, comprehensive coverage will be expensive — confirm?\"\n\n## Re-Run \u002F Update\n\nIf `.codewiki-state.json` already exists at the target path:\n\n- Read it for previous SHA and module list\n- If source SHA matches: ask user if they want to regenerate or skip\n- If SHA differs: offer to regenerate only modules with changed files (`git diff --name-only \u003Cold-sha> HEAD`)\n\nFull incremental-regeneration is a future enhancement — for now, regenerating the whole thing is acceptable.\n\n## Pitfalls\n\n- **Fabricating components.** Every diagram node and claimed function call must be in the source. `read_file` before writing. The single biggest failure mode for auto-generated docs is plausible-sounding fabrication.\n- **Generic AI prose.** \"This module is responsible for...\" is content-free. Say what the module actually does in domain-specific terms.\n- **Restating code as prose.** A module doc that says \"the `process` function processes things by calling `process_item` on each item\" is worse than just linking to the function.\n- **Mermaid > 50 nodes.** They don't render legibly. Split them.\n- **Documenting tests, generated code, or vendored deps as if they were product code.** Skip them.\n- **In-repo output without asking.** Default is `~\u002F.hermes\u002Fwikis\u002F`. Only write into the repo when the user explicitly requests it.\n- **Mermaid special chars need quotes:** `A[\"Tool \u002F Agent\"]` not `A[Tool \u002F Agent]`. `\u003Cbr>` for line breaks inside a node.\n- **Nested code fences in SKILL.md.** When writing a markdown example that contains a Mermaid block, use 4-backtick outer fences so the 3-backtick inner ` ```mermaid ` doesn't close the outer. (This SKILL.md does it.)\n- **classDiagram generics** render as `~T~` (e.g. `List~Tool~`), not `\u003CT>`.\n- **GitHub Mermaid theme is fixed** — don't include `%%{init: ...}%%` blocks; they're stripped on render.\n\n## Verification\n\nAfter writing, verify:\n\n1. **Mermaid blocks balance** — opens equal closes per file:\n   ```bash\n   for f in \"$OUTPUT_DIR\"\u002Fdiagrams\u002F*.md \"$OUTPUT_DIR\"\u002Farchitecture.md; do\n     opens=$(grep -c '^```mermaid' \"$f\")\n     total=$(grep -c '^```' \"$f\")\n     echo \"$f: $opens mermaid blocks, $total total fences (expect total = opens*2)\"\n   done\n   ```\n2. **All expected files exist** —\n   ```bash\n   ls \"$OUTPUT_DIR\"\u002F{README.md,architecture.md,getting-started.md,.codewiki-state.json} \\\n      \"$OUTPUT_DIR\"\u002Fmodules\u002F \"$OUTPUT_DIR\"\u002Fdiagrams\u002F\n   ```\n3. **Module count matches what you intended** — `ls \"$OUTPUT_DIR\u002Fmodules\" | wc -l` should equal the number of modules you committed to in Step 3.\n4. **No fabricated paths** — sanity-check 2–3 source links resolve to real files.\n",{"name":5,"author":44,"license":15,"version":45,"metadata":46,"platforms":57,"description":7},"Teknium (teknium1), Hermes Agent","0.1.0",{"hermes":47},{"tags":48,"related_skills":55},[49,50,51,52,53,54],"Documentation","Mermaid","Architecture","Diagrams","Wiki","Code-Analysis",[56],"github-repo-management",[38,32,36],"main","0d1434f89f4bc6b07e9d272accd8c1013768820f","archive\u002Fskill-md-reviewed\u002Fsha256\u002F2a\u002F2ab9c0595f064fda5f74b9c28b740a149d415e3871f953b4edec012b66705c78",0,"https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills","https:\u002F\u002Fgithub.com\u002Fzapabob","The Open University of JAPAN　2019-now\r\n\r\nTokyo University of Science　2007-2010","2026-10-26 16:29:01",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add zapabob\u002FSkills --skill code-wiki",{"tool":72,"command":73},"bunx","bunx skills add zapabob\u002FSkills --skill code-wiki",{"tool":75,"command":76},"pnpm","pnpm dlx skills add zapabob\u002FSkills --skill code-wiki","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Farchive\u002Fskill-md-reviewed\u002Fsha256\u002F2a\u002F2ab9c0595f064fda5f74b9c28b740a149d415e3871f953b4edec012b66705c78\u002FSKILL.md",true,[],[81,100,122,146,170,186],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":39},"01M6GJTE1GESGGF9K028Y7753E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fxurl\u002Fvariants\u002Fhermes-agent\u002FSKILL.md",[],[83,88,32,89,31,38,36,90,91,92,93,94,95,29,28,96,58,97,98,99],"openclaw","cli","official","search","https","social-media","api","Media","twitter","social","via","post",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":39},"01M6GJT8S1PXQ8WPXT1HSNBWH2","writing-plans","Write implementation plans: bite-sized tasks, paths, code.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fwriting-plans\u002Fvariants\u002Fhermes-agent\u002FSKILL.md",[],[107,108,109,110,32,111,38,112,36,35,113,114,19,115,116,117,118,119,120,121],"writing","writing plans","plans","design","review","workflow","tasks","development","planning","code-review","subagent","write","superpowers","paths","test-driven-development",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":39},"01M6GJST0H5X7WHBJ3BZK0DVKH","whisper","OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fwhisper\u002Fvariants\u002Fhermes-agent-optional\u002FSKILL.md",[],[124,32,38,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145],"openai","speech","multimodal","Transformers","ASR","Audio","text","model","speech recognition","use","general","multilingual","translation","english","identification","processing","Audio Processing",{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":152,"publishedAt":39},"01M6GJSMRQ8EETZTYMG72P70EA","weights-and-biases","W&B: log ML experiments, sweeps, model registry, dashboards.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fweights-and-biases\u002Fvariants\u002Fhermes-agent\u002FSKILL.md",[],[153,32,154,155,36,156,157,158,159,160,161,136,162,163,164,165,166,167,168,169],"weights and biases","tensorflow","experiments","pytorch","visualization","registry","real-time","tuning","dashboards","experiment","log","time","Experiment Tracking","Model Registry","Hyperparameter Tuning","WandB","Real-Time Visualization",{"skillNo":171,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":39},"01M6GJS19KDPRY112JTR326S06","watchers","Poll RSS, JSON APIs, and GitHub with watermark dedup.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fwatchers\u002Fvariants\u002Fhermes-agent-optional\u002FSKILL.md",[],[172,32,177,31,38,178,179,180,181,182,183,29,28,184,185],"terminal","automation","http","monitoring","cron","json","rss","devops","with",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":192,"publishedAt":39},"01M6GJRHJD2A6Q830SWF9W48BC","serving-llms-vllm","vLLM: high-throughput LLM serving, OpenAI API, quantization.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fvllm\u002Fvariants\u002Fhermes-agent\u002FSKILL.md",[],[193,194,195,38,196,129,197,198,199,132,200,94,201,202,203,204,205,206,207,208],"llms","vLLM","serving llms vllm","research","openai api","tensor","Inference Serving","Production","llm serving","High Throughput","PagedAttention","Continuous Batching","Quantization","Tensor Parallelism","high-throughput","throughput"]