[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78ZTPCY3B7QJQ1NGTM8D0WZ":3,"skill-same:01M78ZTPCY3B7QJQ1NGTM8D0WZ":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":46,"ownerHtmlUrl":47,"ownerBlogUrl":48,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M78ZTPCY3B7QJQ1NGTM8D0WZ","code-wiki",null,"Generate wiki docs + Mermaid diagrams for any codebase.","ZDStudios\u002FAIOS","ZDStudios","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121779558?v=4","01M788P61KMHSJ87R41BH4MSQM","01M788P627Y27KK5MQ1KG3TW5H",7,"MIT","https:\u002F\u002Fgithub.com\u002FZDStudios\u002FAIOS\u002Fblob\u002Fmain\u002Fhermes-agent-main\u002Fhermes-agent-main\u002Foptional-skills\u002Fsoftware-development\u002Fcode-wiki\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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":23,"license":14,"version":24,"metadata":25,"platforms":37,"description":7},"Teknium (teknium1), Hermes Agent","0.1.0",{"hermes":26},{"tags":27,"related_skills":34},[28,29,30,31,32,33],"Documentation","Mermaid","Architecture","Diagrams","Wiki","Code-Analysis",[35,36],"codebase-inspection","github-repo-management",[38,39,40],"linux","macos","windows","main","4faa79f92720631ffd00755d9a1018f8c68d3619","hermes-agent-main\u002Fhermes-agent-main\u002Foptional-skills\u002Fsoftware-development\u002Fcode-wiki",1,"https:\u002F\u002Fgithub.com\u002FZDStudios\u002FAIOS","https:\u002F\u002Fzdstudios.github.io\u002FAIOS\u002F","https:\u002F\u002Fgithub.com\u002FZDStudios","zdstudios.network","Hacker, Coder and Machine Learning Engineer \r\n","2026-10-06 21:45:38",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add ZDStudios\u002FAIOS --skill code-wiki",{"tool":57,"command":58},"bunx","bunx skills add ZDStudios\u002FAIOS --skill code-wiki",{"tool":60,"command":61},"pnpm","pnpm dlx skills add ZDStudios\u002FAIOS --skill code-wiki","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FZDStudios\u002FAIOS\u002Fblob\u002Fmain\u002Fhermes-agent-main\u002Fhermes-agent-main\u002Foptional-skills\u002Fsoftware-development\u002Fcode-wiki\u002FSKILL.md",true,[65,71,75,79],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"templates\u002Farchitecture.md","REFERENCE","参考文档",654,"https:\u002F\u002Fgithub.com\u002FZDStudios\u002FAIOS\u002Fblob\u002Fmain\u002Fhermes-agent-main\u002Fhermes-agent-main\u002Foptional-skills\u002Fsoftware-development\u002Fcode-wiki\u002Ftemplates\u002Farchitecture.md",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"templates\u002Fgetting-started.md",658,"https:\u002F\u002Fgithub.com\u002FZDStudios\u002FAIOS\u002Fblob\u002Fmain\u002Fhermes-agent-main\u002Fhermes-agent-main\u002Foptional-skills\u002Fsoftware-development\u002Fcode-wiki\u002Ftemplates\u002Fgetting-started.md",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"templates\u002Fmodule.md",634,"https:\u002F\u002Fgithub.com\u002FZDStudios\u002FAIOS\u002Fblob\u002Fmain\u002Fhermes-agent-main\u002Fhermes-agent-main\u002Foptional-skills\u002Fsoftware-development\u002Fcode-wiki\u002Ftemplates\u002Fmodule.md",{"path":80,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":81,"sourceHtmlUrl":82},"templates\u002FREADME.md",667,"https:\u002F\u002Fgithub.com\u002FZDStudios\u002FAIOS\u002Fblob\u002Fmain\u002Fhermes-agent-main\u002Fhermes-agent-main\u002Foptional-skills\u002Fsoftware-development\u002Fcode-wiki\u002Ftemplates\u002FREADME.md",[84,92,99,105,112,119],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M7910QACPXVF8QY3ZMK6MD2M","ruflo","Ruflo is a multi-agent orchestration platform for AI coding agents (Claude Code, Cursor, Codex, Copilot, Gemini, Amp, +12 more). Use this skill when the user wants to (1) install\u002Finit ruflo in a project, (2) run multi-agent swarms with hierarchical coordination, (3) use ruflo's 314+ MCP tools for memory, routing, hooks, sub-agents, or workflows, (4) check ruflo status\u002Fversion\u002Fdoctor health, or (5) discover which of ruflo's 30+ plugins fits their task.","https:\u002F\u002Fgithub.com\u002FZDStudios\u002FAIOS\u002Fblob\u002Fmain\u002Fruflo-main\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FZDStudios\u002FAIOS\u002Fblob\u002Fmain\u002Fruflo-main\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":18},"01M790G7AX480HX5959531CWBK","ponytail","Forces the laziest solution that actually works, simplest, shortest, most minimal. Channels a senior dev who has seen everything: question whether the task needs to exist at all (YAGNI), reach for the standard library before custom code, native platform features before dependencies, one line before fifty. Supports intensity levels: lite, full (default), ultra. Use on ANY coding task: writing, adding, refactoring, fixing, reviewing, or designing code, and choosing libraries or dependencies. Also use whenever the user says \"ponytail\", \"be lazy\", \"lazy mode\", \"simplest solution\", \"minimal solution\", \"yagni\", \"do less\", or \"shortest path\", or complains about over-engineering, bloat, boilerplate, or unnecessary dependencies. Do NOT use for non-coding requests (general knowledge, prose, translation, summaries, recipes).","https:\u002F\u002Fgithub.com\u002FZDStudios\u002FAIOS\u002Fblob\u002Fmain\u002Fponytail-main\u002Fskills\u002Fponytail\u002FSKILL.md",[],[],{"skillNo":100,"name":94,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":18},"01M790FD2BC49T1M774T6NND33","Lazy senior dev mode for any coding task (write, refactor, fix, review): YAGNI, stdlib first, no unrequested abstractions. Not for non-coding requests.","https:\u002F\u002Fgithub.com\u002FZDStudios\u002FAIOS\u002Fblob\u002Fmain\u002Fponytail-main\u002F.openclaw\u002Fskills\u002Fponytail\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":18},"01M790FANKMMJJQK23GQEESEXP","ponytail-review","Review a diff for over-engineering. Finds what to delete: reinvented stdlib, needless deps, speculative abstractions. One line per finding.","https:\u002F\u002Fgithub.com\u002FZDStudios\u002FAIOS\u002Fblob\u002Fmain\u002Fponytail-main\u002F.openclaw\u002Fskills\u002Fponytail-review\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":18},"01M790F7Q3SJZCR6BYQ97TVFEJ","ponytail-help","Quick reference for ponytail's modes, skills, and commands. One-shot display.","https:\u002F\u002Fgithub.com\u002FZDStudios\u002FAIOS\u002Fblob\u002Fmain\u002Fponytail-main\u002F.openclaw\u002Fskills\u002Fponytail-help\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":18},"01M790F3TX7VZG0J4VVXE9BSNT","ponytail-gain","Show ponytail measured impact as a scoreboard: less code, less cost, more speed, from the benchmark medians. One-shot display.","https:\u002F\u002Fgithub.com\u002FZDStudios\u002FAIOS\u002Fblob\u002Fmain\u002Fponytail-main\u002F.openclaw\u002Fskills\u002Fponytail-gain\u002FSKILL.md",[],[]]