deepwiki-rs: Skill for Claude Code

.agents/skills/litho-documents-skill/SKILL.md

litho-document-skill is a skill for Claude Code, Codex from sopaco/deepwiki-rs. It costs 185 tokens per session (2,238 once invoked), scanned A, original, MIT.

An agent-guided workflow for studying a software repository and writing detailed project documentation. It can describe the system, architecture, workflows, external interfaces, and—when relevant—its database structure using diagrams.

In plain words
What is it for?
Use it to generate Markdown documentation for a project, including C4 architecture diagrams, sequence and flow diagrams, module research, API or command-line interfaces, and database overviews when applicable.
Why use it?
It gives an agent a structured way to understand a codebase before documenting it, even when the repository is too large to read completely. The work is split into stages so important modules and relationships are covered.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is sopaco/deepwiki-rs's own configuration. It tells Claude Code and Codex how to work on deepwiki-rs itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything deepwiki-rs configures →

About the project

Litho is a Rust-based AI documentation generator that analyzes a codebase and produces architecture documentation in the C4 model format. Developers, architects, and technical leads use it to create and maintain diagrams and code-level documentation, while the catalogue provides skills for working with the project.

sopaco/deepwiki-rs · 1,714 stars · on GitHub · deepwiki.netlify.app

Reuse

Borrowing it

Nothing to install: this file belongs to sopaco/deepwiki-rs. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sopaco/deepwiki-rs/main/.agents/skills/litho-documents-skill/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/sopaco/deepwiki-rs

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 litho-document-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/sopaco/deepwiki-rs/litho-documents-skill.svg)](https://agentmods.dev/skills/sopaco/deepwiki-rs/litho-documents-skill)
Your own site
<a href="https://agentmods.dev/skills/sopaco/deepwiki-rs/litho-documents-skill"><img src="https://agentmods.dev/badge/skills/sopaco/deepwiki-rs/litho-documents-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 185 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,238 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.
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.00185 $0.02238
Opus 5 $0.00093 $0.01119
Sonnet 5 $0.00037 $0.00448
Haiku 4.5 $0.00018 $0.00224

Measured 7d ago against content hash fd12f6cec763, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

litho-document-skill 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 7d 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.

.agents/skills/litho-documents-skill/SKILL.md · 161 lines

How it starts

The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Litho Document Skill(纯 Agent 版)

本 Skill 是 Litho(deepwiki-rs)的纯 Agent 平行实现。不依赖任何外部二进制,完全通过 Agent 的工具调用能力自主完成四阶段文档生成流水线。

目标产出

  • 1.概述.md — C4 Context 图 + 项目概述 + 业务价值
  • 2.架构.md — C4 Container/Component 图 + 架构模式 + 模块职责
  • 3.工作流.md — 时序图 + 流程图 + 并发模型 + 错误处理
  • 4.Deep-Exploration/ — 每个领域模块的深度研究文档
  • 5.边界接口.md — CLI/API/配置等对外接口清单
  • 6.数据库概览.md — ER 图 + 表结构(条件触发)

四阶段流水线总览

预处理 → 研究 → 编排 → 输出
 ↓        ↓       ↓       ↓
结构洞察   C1-C4   Markdown   文件持久化

每个阶段的详细执行指南在 references/ 中,Agent 按需加载。下面只给出决策级指导。


阶段一:预处理 → 了解项目

决策要点

  • 根据项目规模选择扫描策略(见下方快速路径)
  • 建立预处理报告:项目名、语言、框架、核心模块列表、README摘要
  • 预处理报告是后续所有阶段的基础上下文,务必准确

快速路径(按项目规模):

规模 判断标准 扫描策略
<100 源文件 list_files 递归 + read_file 全部核心文件
100-500 源文件 list_files 仅一级目录 + read_file 入口+配置+README + codebase_search 语义搜索
>500 源文件 仅读 README + 主配置 + 入口文件 + view_file_outline 核心模块 + grep_search 精确搜索

详细步骤见 references/phase1-preprocessing.md


阶段二:研究 → C4 多层级分析

决策要点

  • 执行顺序:C1 → C2 → [C3 并行](与 deepwiki-rs 一致)
  • 领域模块必须全覆盖src/ 下每个子目录都识别为候选模块,用 DDD 分组(核心域/支撑域/通用域),不得遗漏
  • 渐进式深度控制:按 importance 评分分级分析
  • 研究产出写入 .litho-agent/ 临时目录持久化(见下方中间产物策略)

并发搜索:Step 2.3(架构) + 2.4(工作流) + 2.6(边界) 的搜索可并发调用,Step 2.5(模块深度) 必须在 2.2(领域模块) 之后

渐进式深度

importance 分析深度 读取文件数 Mermaid 图
≥7(核心域) 深度分析 5+ 完整 flowchart + 交互表格
4-6(支撑域) 标准分析 3 精简流程图
≤3(通用域) 简要描述 1-2 无图

详细步骤见 references/phase2-research.md


阶段三:编排 → 生成 Markdown 文档

决策要点

  • 生成顺序:边界接口 → 概述 → 模块深度(逐个) → 架构 → 工作流 → 数据库(依赖少的先写入)
  • 分章节写入大型文档:架构和工作流分 2-3 次写入(框架 → 补充章节)
  • 逐模块独立写入:每个 Deep-Exploration 文档独立 write_to_file,写完即释放上下文
  • 代码引用密度:每模块 ≥3 文件路径、≥2 类型名、组件表每行有路径列

⚠️ 叙述性写作风格(P0 关键!)

生成的文档必须面向人类阅读友好,而不是冷冰冰的 PPT 式结构化文字。核心要求:

  1. 每个章节开头必须有叙述性 summary:用 2-4 句话先解释"这个章节在说什么、为什么重要",不要直接甩出表格或列表
  2. 表格和列表前后必须有解读段落:不要只给结构化数据,要解释"这意味着什么、为什么这样设计"
  3. 设计决策必须讲"为什么":不只说"选了什么",还要说"放弃了什么、为什么这样选"
  4. 用类比和比喻建立理解桥梁:比如把 Memory 比作"快递站"、把 Agent 比作"工人"、把 Pipeline 比作"生产线"
  5. 避免冷冰冰的标题堆叠:章节标题应该自然引出叙述,而不是 ### 2.1 核心目标 → 直接跳到列表

Read the full file on GitHub · 161 lines

Files

What ships with it

5 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. 7d ago First seen · 161 lines · 185 tokens per session scan A fd12f6cec763

Subscribe to this mod's changes

litho-document-skill is a skill published in the GitHub repository sopaco/deepwiki-rs (1,714 stars, last pushed 23d ago), licensed MIT. It adds 185 tokens to every session and 2,238 once invoked, about $0.0009 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

skill-creator

Create, install, or update skills in the workspace. Use when (1) installing a skill from a URL or remote source, (2) creating a new skill from scratch, (3) updating or restructuring existing skills. Always use this skill for any skill installation or creation task.

zhayujie/CowAgent · 61 tokens

image-generation

Generate or edit images from text prompts. Use when the user asks to create, draw, design, or edit an image, illustration, photo, icon, poster, or any visual content.

zhayujie/CowAgent · 41 tokens

knowledge-wiki

Manage the personal knowledge wiki. Use when the user shares articles, documents, or asks to organize knowledge; when a conversation produces insights worth preserving as structured knowledge; or when the user asks about the knowledge base.

zhayujie/CowAgent · 46 tokens

screen-ocr-operator

Use when you need to see and operate an Android screen through an OCR/vision model plus ADB. Optimized commander workflow: one model plan, batch ADB execution, minimal round-trips, verify at milestones.

qiannianhuanxiang/DSHA · 0 tokens

device-shell

Use when you need to execute shell commands on an Android device from a Linux/proot environment. Covers the ADB channel and an optional local Shizuku HTTP shell bridge.

qiannianhuanxiang/DSHA · 38 tokens

csswitch-external-skill-tools

A routing guide for installing or removing external skills in CSSwitch-managed Claude Science environments. An external skill is an add-on brought in from another source.

SuperJJ007/CSSwitch · 54 tokens