[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75PFWKYAAPZ3ZVCN5BNP5E8":3,"skill-same:01M75PFWKYAAPZ3ZVCN5BNP5E8":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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":14,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":47,"install":48,"resources":61},"01M75PFWKYAAPZ3ZVCN5BNP5E8","code-wiki",null,"Generate wiki docs + Mermaid diagrams for any codebase.","Iwakishirokoshu\u002FHermesUltimate","Iwakishirokoshu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F194847626?v=4","01M75P4CVGA89TTCE8JGMNAQQ9","Around","01M75P4CWF85V6GVSEFKGGFZ03",0,"MIT","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Foptional-skills\u002Fsoftware-development\u002Fcode-wiki\u002FSKILL.md",[],[],"2026-11-12 13:55:43",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: [codebase-inspection, github-repo-management]\n---\n\n# Code Wiki Skill\n\nGenerate a comprehensive 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 comprehensive 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":24,"license":15,"version":25,"metadata":26,"platforms":38,"description":7},"Teknium (teknium1), Hermes Agent","0.1.0",{"hermes":27},{"tags":28,"related_skills":35},[29,30,31,32,33,34],"Documentation","Mermaid","Architecture","Diagrams","Wiki","Code-Analysis",[36,37],"codebase-inspection","github-repo-management",[39,40,41],"linux","macos","windows","main","c0c483827a963764d5e1a663a9591867d47289e6","optional-skills\u002Fsoftware-development\u002Fcode-wiki","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu","2026-06-15 13:48:41",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add Iwakishirokoshu\u002FHermesUltimate --skill code-wiki",{"tool":54,"command":55},"bunx","bunx skills add Iwakishirokoshu\u002FHermesUltimate --skill code-wiki",{"tool":57,"command":58},"pnpm","pnpm dlx skills add Iwakishirokoshu\u002FHermesUltimate --skill code-wiki","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Foptional-skills\u002Fsoftware-development\u002Fcode-wiki\u002FSKILL.md",true,[62,68,72,76],{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"templates\u002Farchitecture.md","REFERENCE","参考文档",654,"https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Foptional-skills\u002Fsoftware-development\u002Fcode-wiki\u002Ftemplates\u002Farchitecture.md",{"path":69,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":70,"sourceHtmlUrl":71},"templates\u002Fgetting-started.md",658,"https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Foptional-skills\u002Fsoftware-development\u002Fcode-wiki\u002Ftemplates\u002Fgetting-started.md",{"path":73,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":74,"sourceHtmlUrl":75},"templates\u002Fmodule.md",634,"https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Foptional-skills\u002Fsoftware-development\u002Fcode-wiki\u002Ftemplates\u002Fmodule.md",{"path":77,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":78,"sourceHtmlUrl":79},"templates\u002FREADME.md",667,"https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Foptional-skills\u002Fsoftware-development\u002Fcode-wiki\u002Ftemplates\u002FREADME.md",[81,88,95,102,109,116],{"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":19},"01M770W8JDE5EC1TJT4GSDWD78","wps-pixie-dust","WPS Pixie-Dust offline nonce attack (reaver -K \u002F pixiewps) and fallback online PIN brute (bully) to recover the AP's WPA PSK without capturing a handshake.","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Fstack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwps-pixie-dust\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M770W4B7T5VCVHB88V1F02H1","wpa3-sae","WPA3-SAE transition-mode downgrade (DragonShift), SSID Confusion CVE-2023-52424, Dragonblood side-channels, and SAE captive-portal credential recovery against WPA3-Personal networks.","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Fstack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa3-sae\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M770W093C8FAV8S34K8VB6T9","wpa2-psk","WPA\u002FWPA2-PSK handshake capture via targeted deauth + PMKID (no deauth required) + offline hashcat cracking. The most common consumer\u002FSMB encryption mode in 2026.","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Fstack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa2-psk\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M770VTNAQGZ3D0RQVFEKTE8Z","wpa-enterprise-eap","WPA\u002FWPA2\u002FWPA3-Enterprise (802.1X\u002FEAP) rogue-RADIUS evil-twin for MSCHAPv2 capture, GTC downgrade, and PEAP relay. MSCHAPv2 capture equals a NetNTLM hash — the primary wireless on-ramp to Active Directory.","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Fstack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa-enterprise-eap\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":19},"01M770VNG05ZX3CV84R9GX8PJN","krack-fragattacks","KRACK key-reinstallation (CVE-2017-13077..13082) and FragAttacks fragmentation\u002Faggregation flaws (CVE-2020-24586..24588, CVE-2020-26139..26147) against legacy or embedded 802.11 supplicants with poor patch cadence.","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Fstack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fkrack-fragattacks\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":19},"01M770VHFH7N192V56PFSRXF5K","evil-twin-karma","Evil-twin rogue AP with KARMA\u002FMana PNL-probe response, captive-portal credential capture, and post-association MITM for PSK\u002Fopen networks. Distinct from wpa-enterprise-eap which targets 802.1X.","https:\u002F\u002Fgithub.com\u002FIwakishirokoshu\u002FHermesUltimate\u002Fblob\u002Fmain\u002Fstack\u002Fdecepticon-slim\u002Fupstream\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fevil-twin-karma\u002FSKILL.md",[],[]]