codegen-doc

codegen-doc is a skill for Claude Code, Codex from xstongxue/best-skills. It costs 93 tokens per session (734 once invoked), scanned A, original, Apache-2.0.

A Chinese-language guide for generating project documentation from a code repository. It supports thesis sections, project overviews, key-issue reports, and résumé descriptions.

In plain words
What is it for?
Use it when documenting a project’s design, structure, risks, unresolved problems, or résumé-ready project experience.
Why use it?
It helps turn a codebase into the kind of document needed for a specific audience, while requiring technical details to match the actual code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when documenting a project’s design, structure, risks, unresolved problems, or résumé-ready project experience.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xstongxue/best-skills/codegen-doc
About the project

best-skills is a collection of reusable skills for coding agents, including tools for writing papers, creating diagrams and presentations, generating code documentation, and other tasks. Users install its skills into agents such as Cursor, Claude Code, Codex, or OpenClaw so those agents can recognize relevant requests and run the corresponding workflows. The catalogue entries are examples of the skills included in the collection.

xstongxue/best-skills · 2,790 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xstongxue/best-skills --skill codegen-doc
Clone the repo
git clone --depth 1 https://github.com/xstongxue/best-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codegen-doc

README.md
[![agentmods](https://agentmods.dev/badge/skills/xstongxue/best-skills/codegen-doc/github.svg)](https://agentmods.dev/skills/xstongxue/best-skills/codegen-doc)
Your own site
<a href="https://agentmods.dev/skills/xstongxue/best-skills/codegen-doc"><img src="https://agentmods.dev/badge/skills/xstongxue/best-skills/codegen-doc/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codegen-doc

Your own site · 80×15
<a href="https://agentmods.dev/skills/xstongxue/best-skills/codegen-doc"><img src="https://agentmods.dev/badge/skills/xstongxue/best-skills/codegen-doc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 734 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00093 $0.00734
Opus 5 $0.00046 $0.00367
Sonnet 5 $0.00019 $0.00147
Haiku 4.5 $0.00009 $0.00073

Measured 9d ago against content hash 6cacf5704372, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

codegen-doc scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/codegen-doc/SKILL.md · 44 lines

What it actually says

代码生成·项目文档

本 Skill 指导 Agent 基于当前项目/代码仓库生成各类文档,支持四种类型:论文章节、项目梳理、重点问题、简历项目描述。

Step 0:任务识别

用户表述 / 关键词 执行
论文章节、系统设计、总体设计、详细设计 reference/thesis-chapter.md
项目梳理、项目文档结构、按格式梳理 reference/overview.md
重点问题、技术难点、待解决问题、项目风险 reference/key-issues.md
简历项目描述、项目经历、按简历格式 reference/resume-format.md

不属于这四种的情况:用户要的是给新同事看、能照着上手的项目文档(新人文档、架构文档、代码导读、onboarding),用 project-docs。本 Skill 产出的是按对方指定格式写、给导师/评委/HR/领导看的东西。

怎么读项目

四种类型都要先读代码。不要试图读完所有源文件,分三步:

  1. 看轮廓 —— 目录树(排除 node_modules / build / dist / vendor)、构建和依赖文件(package.json / pom.xml / requirements.txt / go.mod 等)、README,得出项目干什么、用什么技术栈
  2. 看骨架 —— 入口文件、路由或接口定义、配置文件、每个顶层目录一句话职责
  3. 按类型补读
    • 论文章节:部署相关文件、模块之间怎么调用
    • 项目梳理:用户格式里点名要的部分(写「核心接口」就去读路由表)
    • 重点问题:TODO / FIXME、README 的 Known issues / Limitations、异常处理和兜底逻辑
    • 简历项目描述:可量化的东西(接口数、模块数、测试覆盖),只在真有依据时写

技术栈、模块名、接口名要和代码逐字一致,不要凭印象改写。

使用时机

  • 用户需要根据当前项目生成论文章节、项目梳理、重点问题清单或简历项目描述
  • 用户提到「根据当前项目」「根据代码」「按这个格式……」

通用原则

  • 不编造:未在仓库中出现的内容不写入
  • 有据可依:尽量从代码、注释、README、文档中抽取
  • 格式遵从:用户提供格式/模板时,严格按格式组织输出
Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 44 lines · 93 tokens per session scan A 6cacf5704372

Subscribe to this mod's changes

codegen-doc is a skill published in the GitHub repository xstongxue/best-skills (2,790 stars, last pushed 14d ago), licensed Apache-2.0. It adds 93 tokens to every session and 734 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

DOCX工具

A tool for creating, editing, checking, and converting Microsoft Word DOCX files. It also handles LaTeX research papers, mathematical formulas, tables, tracked changes, and comments.

XiaoMaColtAI/math-modeling-skill · 49 tokens

LaTeX工具

A tool for creating, compiling, and checking mathematical modelling papers written in LaTeX, a document system often used for technical writing.

XiaoMaColtAI/math-modeling-skill · 46 tokens

pdf

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and…

XiaoMaColtAI/math-modeling-skill · 92 tokens

Excel工具

A guide for using Excel tools to read, write, and recalculate spreadsheet files. It includes a rule for treating the first row as data when a spreadsheet has no column headings.

XiaoMaColtAI/math-modeling-skill · 25 tokens

pdf

A set of instructions for working with PDF files, which are documents designed to preserve their layout across devices.

agentscope-ai/QwenPaw · 95 tokens

officecli-academic-paper

Use this skill to build academic-style .docx output: journal / conference / thesis chapters carrying formal citation style (APA, Chicago, IEEE, MLA), numbered equations, figure & table cross-references, footnotes/endnotes, bibliography, or multi-column journal layout. Trigger on: 'research paper', 'journal paper'…

iOfficeAI/OfficeCLI · 141 tokens