Legado Book Source Generator skill

A skill that takes an agent from a book site address to a verified rules file for the Legado app: search, contents, text

  • 207 ★ on the repository
  • Last commit
Skill

Broad access

Why this level

  • The agent browses third-party sites and for JavaScript pages installs and runs Java, adb and Android Probe and connects to a phone
  • The skill creates rules for collecting text from book sites, so content rights and site terms remain your responsibility
All reasons and checks

narylr350/book-source-creator-skill

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/legado-book-source-generator

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The agent browses third-party sites and for JavaScript pages installs and runs Java, adb and Android Probe and connects to a phone
  • The skill creates rules for collecting text from book sites, so content rights and site terms remain your responsibility

This is third-party code. Review the repository files before installing.

What it does

The `legado-book-source-generator` skill builds a book source (called a "书源" in Legado) for the Legado Android reading app. The user names a site address, the agent creates a working folder with `node scripts/bsg.mjs init <url>`, studies the real pages through Browser MCP and writes `book-source.json`. Validation then covers four links: search, book details, contents and chapter text. If a page is rendered by JavaScript, validation continues in an Android emulator or on a phone through Android Probe. For the community fork of the app a single `book-source.js` can be made: its validation runs through the app's own MCP over the local network or through adb. Site, validation and final audit reports live in `runs/<site>/` and finished files in `outputs/<site>/`. If a link fails, the tools name the cause: empty search, unparsed contents, captcha, login, paid access.

Who it is for. Legado users who want a source for their own book site without hand-picking rules and want to see right away which link breaks.

Good fit when

  • You need a source for a book site and hand-picking search, contents and text rules takes too long
  • A ready source stopped working and you have to learn which part broke: search, contents or chapter text
  • A page returns text only after JavaScript and a plain HTTP check gets an empty page
  • The app fork with JavaScript support needs a single-file source verified through the app's MCP

Not a fit when

  • You want a ready collection of sources or the books themselves: the project provides neither
  • The site is behind a captcha, login, paywall, DRM or heavy protection: the project does not bypass such limits
  • You want to collect books in bulk or redistribute them: the project is for personal learning and compatibility debugging
  • Browser MCP cannot be connected: without it the pages cannot be studied

Example request

Build a Legado source for https://example.com and verify search, contents and chapter text

Limitations

  • The project provides no ready sources or book content. It does not bypass captchas, logins, paywalls, DRM or Cloudflare, and the result depends on the site and the agent's model.
  • Browser MCP is required. JavaScript pages may also need Java, adb, an Android emulator or phone and Android Probe.
  • The JavaScript variant needs the app fork with an MCP service, and compatibility of such a file with the original version is not guaranteed.
  • The repository has no license file and the README is in Chinese.

How to disable. Delete the `legado-book-source-generator` folder from the agent's skills directory. Android Probe is uninstalled from the phone or emulator like any app, and the `outputs/` and `runs/` folders are deleted by hand.

FAQ

How do I install the Legado skill in Claude Code?

Download `legado-book-source-generator-*.zip` from the releases page and put the folder in `~/.claude/skills/legado-book-source-generator/`. For Codex the path is `$CODEX_HOME/skills/legado-book-source-generator/`.

Is Android needed?

For most sites no. An emulator or phone is needed when JavaScript renders the page text and an HTTP check sees an empty page. Then the agent prepares adb and Android Probe itself and asks you only about permissions and USB debugging.

How do the two output formats differ?

By default you get a traditional `book-source.json`, compatible with the last original version and the community fork. If you explicitly choose the community variant, you get a single `book-source.js` checked by the fork's MCP.

What does the skill do if the site shows a captcha?

It records the blocker in the report and stops. The skill does not bypass captchas, logins, paywalls, DRM and Cloudflare.

Can I validate an existing source?

Yes. The archive has a local validator: run `validator/run.bat`, it prints an address where you can import a source, enter a keyword and run the check.

Discussion

No questions or reviews yet.

Skills

A skill and SQLite engine that watch thousands of sources on a schedule, detect changes by hash and keep an audit ledger.

SkillExtended access101Repository stars

A skill and CLI that find posts, videos and papers on agent social networks and academic sources and send replies after a preview.

SkillExtended access197Repository stars

A catalog of 600-plus ready CLIs for agents: a discovery skill picks the tool, and the installer sets up the binary and its skill.

CLIBroad access2.1KRepository stars
Official

Skills for coding agents that build and verify workspaces on the Lemma platform, with their agents and apps

SkillBroad access647Repository stars
Official

An MCP server helps an agent build and test Python automation tasks for Windows applications and Android devices.

MCP serverBroad access841Repository stars

Skills for HR and recruiters: role requirements, sourcing on BOSS Zhipin and Liepin, resume review, interviews and a candidate ledger

SkillBroad access117Repository stars

README in short

The README explains the project's purpose and immediately states what it does not do. Then come a quick start from the archive, a choice of output format, a description of artifacts, a list of failure causes, a separate validator, the need for Android and Browser MCP and answers to common questions. It ends with a map of the main folders.

README badge

Original SKILL.md

---
name: legado-book-source-generator
description: Use when 用户要求为任意网站生成书源、生成阅读书源、分析小说站点、生成 Legado/阅读规则。强制触发词:书源、生成书源、帮我生成、book source、legado、阅读书源、小说站点分析。如果用户给出了一个 URL 并要求生成或分析,必须加载此 skill。
---

# Legado 书源生成

这是工具箱模式。先初始化,再按当前问题选择工具;不要把流程当成必须机械执行的长状态机。

```powershell
node "<skill-dir>/scripts/bsg.mjs" init <url> [--cwd <输出目录>] [--target legacy-json|community-js]
node "<skill-dir>/scripts/bsg.mjs" toolbox
node "<skill-dir>/scripts/bsg.mjs" status --run <run-dir>
```

## 先读哪些 reference

- 常规流程:读 `references/workflow.md`。
- 站点观察 / site-facts:读 `references/site-inspection.md` 和 `references/assessment-template.md`。
- 生成规则:读 `references/legado-json-structure.md`、`references/official-rule-pack.json`、`references/legado-source-behavior.md`。
- 验证失败回修:读 `references/failure-diagnosis.md`、`references/validation-policy.md`、`references/validator-integration.md`。
- Android、模拟器、登录态、WebView/WebJs、入口反爬复核:必须先读 `references/android-probe-guide.md` 和 `references/policies.md`;需要判断 Probe 与阅读 App 差异时再读 `references/webview-behavior-matrix.md`。
- 社区维护版 JavaScript 单文件书源:读 `references/community-app-mcp.md`,并从目标 App MCP 读取当前版本的 `legado://help/jsHelp`。

## 常用工具

- `status --run <run-dir>`:看当前阶段、`pendingUserAction`、`repairContext` 和下一步建议。
- `check --run <run-dir>`:检查评估、登录、Android 决策是否缺证据。
- `observe --run <run-dir> --phase <phase> --status <status> [--blocker <type>] [--render <type>] --note <evidence>`:Browser MCP 每确认一条链路就立即写入事实;入口验证码或正文签名/字体加密会关闭探查并返回 `record-assessment`。
- `source inspect --run <run-dir>`:审计传统 JSON 目标的 `book-source.json` 风险字段。
- `android --run <run-dir>`:Android 单入口;检查真机/模拟器和 Probe,必要时启动 Probe,运行 `mode=android` 验证并收敛报告。
- `android --run <run-dir> --dump-cookie <file>`:显式导出 Probe 原始 Cookie 到本地文件,供人工核对或 validator 调试;默认输出不显示 Cookie 值。
- `android-status`:只读诊断;检查 adb、真机/模拟器和 Android Probe。
- `validate --run <run-dir> [--mode http|browser|android] [--keyword <中文关键词>] [--book-url <url>]`:运行 validator,写入 `validator-report.json`。`--book-url` 跳过搜索直接从详情页开始验证(对齐阅读 debug 模式的 URL 直接入口),用于搜索被反爬阻塞但需验证后续链路的场景。
- `record-validation --run <run-dir> --status <status>`:把真实验证报告收敛成状态、能力矩阵和修复上下文。
- `debug-bundle [--run <run-dir>]`:打包状态、报告、书源和会话导出,方便复盘。
- `run --run <run-dir>`:可选的阶段助手;它会启动下一阶段,或自动记录当前目标的验证报告。
- `app-mcp status [--url <mcp-url>] [--serial <adb-serial>]`:连接社区维护版阅读 App 的原生 MCP,检查协议、版本、工具和帮助资源;唯一在线 adb 设备会自动建立临时端口转发。
- `app-mcp help-js [--url <mcp-url>] [--serial <adb-serial>]`:读取目标 App 当前版本的 `legado://help/jsHelp`;动态读取,不保存副本到 run。
- `app-mcp validate-js --source <book-source.js> --keyword <关键词> [--report <file>] [--keep-source]`:通过目标 App 原生 MCP 保存、读回、调试并校验 JavaScript 单文件书源;默认验证后删除 App 内临时书源。

Report a problem