AGENT SKILL

zread

Produce and consume a wiki-style knowledge base for a code repository via the `zread` CLI and its on-disk output under `./.zread/wiki/`. Use this skill whenever the user wants to understand, onboard onto, explore, summarize, map, or get an overview of an unfamiliar codebase; asks for architecture docs, a project wiki, a repo walkthrough, module/package explanations, or "what does this repo do"; wants to generate, regenerate, resume, browse, or serve code documentation locally; or mentions zread / zread.ai directly. Also use it proactively before diving into a large unknown repo — if `./.zread/wiki/current` exists, read the generated pages instead of crawling source file-by-file; if it doesn't, consider offering to run `zread generate`. The trigger is the intent (understand a codebase through generated docs), not the literal word "zread".

License 许可
MIT
最近更新
2026-11-01
Stars
★ 3
Forks
1

01 前言 Front Matter

name
zread
description
Produce and consume a wiki-style knowledge base for a code repository via the `zread` CLI and its on-disk output under `./.zread/wiki/`. Use this skill whenever the user wants to understand, onboard onto, explore, summarize, map, or get an overview of an unfamiliar codebase; asks for architecture docs, a project wiki, a repo walkthrough, module/package explanations, or "what does this repo do"; wants to generate, regenerate, resume, browse, or serve code documentation locally; or mentions zread / zread.ai directly. Also use it proactively before diving into a large unknown repo — if `./.zread/wiki/current` exists, read the generated pages instead of crawling source file-by-file; if it doesn't, consider offering to run `zread generate`. The trigger is the intent (understand a codebase through generated docs), not the literal word "zread".

02 资源文件 2

03 SKILL.md 正文

zread skill

zread is a CLI that generates wiki documentation from code in the current workspace using an LLM. Output lives under ./.zread/wiki/ in the workspace; public repos can also be viewed at https://zread.ai.

This skill is intended for agent use. Read generated files directly from disk, and use --stdio as the default mode for any zread command instead of trying to parse the human TUI.

On-disk layout (read these directly)

Always run zread from the workspace root. After a successful generation:

  • ./.zread/wiki/current — text file containing the active version id (e.g. 2026-03-12-010203).
  • ./.zread/wiki/versions/<id>/wiki.json — TOC: {id, generated_at, language, pages: [{slug, title, file, section, group, level}]}.
  • ./.zread/wiki/versions/<id>/<file> — page markdown referenced by pages[*].file.
  • ./.zread/wiki/drafts/ — in-progress generation; presence means a previous run did not finish. drafts/wiki.json exists once the catalog phase completed.
  • ~/.zread/config.yaml — global config (LLM provider, language, concurrency).
  • ~/.zread/login.json — presence indicates the user has logged in.

To answer questions about a codebase that already has zread output, read these files directly with the file tools — do not invoke zread browse.

Commands

Command Purpose Key flags
zread generate Generate wiki for cwd -y/--yes, --draft resume|clear|cancel, --skip-failed, --stdio
zread browse Serve docs at http://localhost:9681+ and open browser --generate, --version <id>, --host, --port, --stdio
zread login OAuth into BigModel/Z.AI to obtain an API key --custom, --model, --stdio
zread config Edit ~/.zread/config.yaml --stdio
zread update Self-update CLI --stdio
zread version Print version --stdio

--stdio is supported on every command and turns the process into a JSON-line machine protocol on stdin/stdout. See references/stdio-protocol.md for the wire format (events, waiting_for, done, quit). Load it whenever zread is invoked from another program/agent.

Decision tree for an AI agent

  1. User wants to read existing wiki content?

    • Check ./.zread/wiki/current. If present, read wiki.json and the page markdown directly. No CLI invocation needed.
    • For known public GitHub repos, prefer the mcp__zread__* tools (get_repo_structure, read_file, search_doc) over running the CLI.
  2. User wants to (re)generate docs?

    • Confirm with the user first — generate is long-running, calls an LLM, and writes files. Get explicit consent in unfamiliar directories.
    • Verify ~/.zread/login.json exists or ~/.zread/config.yaml has an llm.api_key. If neither, run zread login first.
    • If ./.zread/wiki/drafts/ exists, decide:
      • resume previous run → zread generate --draft resume -y
      • throw away and start fresh → zread generate --draft clear -y
    • Otherwise: zread generate -y.
    • To not block on a few failing pages: add --skip-failed.
  3. User wants to view docs in a browser?

    • zread browse (add --generate to bootstrap if no wiki exists yet).
  4. User wants to script zread / consume output programmatically?

Non-interactive invocation rules

  • Always pass -y to generate when running unattended; otherwise it stops at a catalog confirmation gate.
  • Always set --draft explicitly when a draft may exist, so the command does not prompt.
  • For any command run from another agent/script, use --stdio so output is parseable JSON instead of ANSI TUI frames.
  • zread writes logs to ~/.zread/log/zread.log — read this if a run fails silently.

Safety / blast radius

  • generate consumes LLM tokens (real cost) and can run for many minutes on large repos. Confirm before launching.
  • generate writes only under ./.zread/ and does not commit anything to git. It is safe to delete ./.zread/wiki/drafts/ to recover from a stuck state.
  • update replaces the zread binary in place and is hard to reverse — only run it when the user explicitly asks.
  • login opens a browser for OAuth; do not run it in a non-interactive context unless the user has asked for it.

Reference files

  • references/stdio-protocol.md — JSON-line wire protocol shared by every command's --stdio mode. Load when programmatically driving zread.

04 同仓库更多 Skills

shengdabai
shengdabai/Tony-Claude-Code-Skills

xiaolai-methodology

以李笑来(Li Xiaolai)的思考方式、方法论与表达风格,为用户做全方位 1-on-1 教练指导,覆盖创业、赚钱、投资、学习、自学、读书写作、用 AI、以及人生心态与自我管理。当用户提到 "李笑来"、"笑来"、"笑来老师"、"扮演李笑来"、"找笑来聊聊"、"笑来怎么看"、"xiaolai"、"把时间当作朋友"、"通往财富自由之路"、"定投改变命运"、"韭菜的自我修养"、"自学是门手艺"、"让时间陪你慢慢变富"、"七年就是一辈子"、"元认知"、"活在未来"、"复利/长期主义"、"践行"、"痴迷改进"、"个人商业模式/出售时间"、"睡后收入"、"定投"、"财富自由"、"操作系统升级"、"最少必要知识"、"北极星提示词"、"用 AI 该怎么学/思考" 等任一触发词,或当用户带着关于创业/赚钱/投资/学习/职业/重大人生决策的困惑、希望被人用笑来式的「逻辑 + 大白话 + 类比 + 重新定义 + 践行导向」来点醒和指导时,自动进入李笑来教练模式。

写作与文案
★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

youtube

Launch the YouTube Creator Agent to auto-generate videos. Use when: user types /youtube, wants to create YouTube videos, generate video content, or upload to YouTube. Keywords: youtube, video, 视频, 创作视频, 发布视频

内容创作者Skill与智能体开发
★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

youtube-script-sync

Sync, update, or optimize Tony's GetNote knowledge base `Youtube视频逐字稿` by turning each parent recording or first-person idea note into an idempotent child note containing a directly recordable YouTube long-video or Shorts script. Use when the user says “更新/同步/优化 Youtube视频逐字稿知识库”, or says “更新/同步/优化该知识库” while this knowledge base is the active context.

Skill与智能体开发
★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

writing-skills

How to write SKILL.md files that trigger reliably and teach effectively. Use when creating, improving, or reviewing Claude Code skills.

开发工程师内容创作者写作与文案Skill与智能体开发
★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

writing-rules

How to write .claude/rules/ files that Claude actually follows. Use when creating, improving, or reviewing project rules.

内容创作者写作与文案
★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

writing-prompts

How to write effective system prompts for any LLM. Universal prompt engineering -- role clarity, structured output, injection resistance, few-shot examples. Use when writing prompts, system instructions, or AI configuration.

内容创作者写作与文案Skill与智能体开发
★ 3