agentleFS
openqa-cnopenqa-cn/codexqa/skills/codexqa-code-wiki/SKILL.md

codexqa-code-wiki

Skill341 starsChanged 3 months agoApache-2.0View on GitHub

Builds a local architecture wiki for a repository from the CodexQA symbol graph (no model needed): modules, who calls whom and how often, reading paths, and one self-contained HTML page. Use when the user mentions codexqa-code-wiki, code-wiki, wiki, knowledge graph, architecture wiki, module map, reading guide, 代码知识图谱, 架构 Wiki, 模块地图, 阅读导览, wiki inputs, --no-llm, community detection, 社区检测, HTML 报告, or asks to map modules / generate a repo wiki without an LLM. Not change review (that is codexqa-code-analyzer), not CodexQA evidence-pack HTML review (that is codexqa-code-reviewer), and not SAST+agent code-risk scan reports (that is codexqa-defect-analyzer). Former skill name: code-wiki.

  • Installs packages

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Brief: Run node <skill>/scripts/wiki.mjs brief <repo>.

    line 54
  2. Very specific:

    Notes: Read references/notes.md, then fill notes.json.

    line 60
  3. Very specific:

    Build: Run node <skill>/scripts/wiki.mjs build <repo>.

    line 65
  4. Very specific:

    Write for someone who just cloned the repo.

    line 102
  5. Very specific:

    Do not run codexqa wiki without --no-llm, wiki embed, or query wiki.

    line 105
  6. Very specific:

    Do not hand-edit the generated HTML.

    line 107

≈ “Common” is an estimate: at least 1 in 5 of the 383,637 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Code Wiki

Three commands, one file to write:

node <skill>/scripts/wiki.mjs brief <repo>   # index + export facts + print the brief
  → you write .codexqa-wiki/<repo>/notes.json  # names and sentences only
node <skill>/scripts/wiki.mjs build <repo>   # validate + render one HTML file

The script owns every fact on the page: modules, sizes, call counts, groups, the architecture diagram, public symbols, files, links, search. You own the words: what the repo is, what each module does, and which reading path fits which task. You never edit HTML, CSS, or diagrams.

<skill> is this skill's directory. <repo> is a local checkout (preferred). README.md / README.zh-CN.md are for humans; do not load them.

Documents (load on demand)

FileLoad when
SKILL.md (this file)always
references/notes.mdbefore writing notes.json
references/playbook.mdone module only, index problems, persisting for the Web UI
references/cli.mdcodexqa missing, PATH, repo ids, maintenance

Default flow

  1. Brief. Run node <skill>/scripts/wiki.mjs brief <repo>. It indexes incrementally, exports codexqa wiki inputs, and writes .codexqa-wiki/<repo>/ with inputs.json, meta.json, brief.md, and a notes.json scaffold (kept if it already exists). Read the printed brief: groups, suggested paths, and per module its files, calls, callers, public symbols, and key flows.
  2. Notes. Read references/notes.md, then fill notes.json. Every P01-style id and group id in it must exist in the brief. Write 简体中文 unless the user asked for English ("lang": "en"). lang is the language the page opens in. The HTML also has a 中文 / EN switch for the chrome; it does not translate notes.json.
  3. Build. Run node <skill>/scripts/wiki.mjs build <repo>. If it prints error: lines, fix those fields and rerun; they name the field and the fix. check <repo> validates without writing HTML.
  4. Deliver. Tell the user the printed file path plus two or three lines on what the wiki says. Do not paste the HTML or open it in chat.

The user only wants a quick look → build <repo> --draft right after brief. The page uses rule-based names and says it is a draft. Offer to write the notes afterwards.

Useful flags: brief --limit 8 (large repos), brief --lang en, brief --skip-index (index is fresh), build --out FILE, build --source-url 'https://host/repo/blob/{commit}/{path}' (file links when the remote is not GitHub / GitLab / Gitee / Bitbucket).

Scenario routing

User is asking…Do
What is this repo / module map / architecture wiki / knowledge graphDefault flow
Where should I start reading / onboarding pathDefault flow; put the effort into guides
What does module X do / who does it talk toAnswer from brief.md; deeper digest in playbook Explain one module
Store a rule-only wiki for the CodexQA Web UIplaybook Persist rule-only wiki
brief failed / empty export / wrong branchplaybook Index health

Change review, callers of a symbol, test gaps, and stack traces belong to codexqa-code-analyzer.

Rules

  • Facts come only from this run's export. Do not add modules, calls, or responsibilities that the brief does not support; do not use the README or a website as evidence for a module's role.
  • A reading path follows real calls: each step must call or be called by the next. build rejects anything else and lists the valid neighbours.
  • Standalone modules (no calls to or from other modules) get a name and a role, never a layer.
  • Write for someone who just cloned the repo. No internal field names (deps, cross_community, called_by, wiki inputs); build rejects them.
  • Do not run codexqa wiki without --no-llm, wiki embed, or query wiki. Those call a model or need model-written pages.
  • Do not hand-edit the generated HTML. Change notes.json and rebuild.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.