legadoSkill: Skill for Claude Code

.trae/skills/legado-book-source-tamer/SKILL.md

legado-book-source-tamer is a skill for Claude Code, Codex from DandanLLab/legadoSkill. It costs 60 tokens per session (43,356 once invoked), scanned A, original, MIT.

A specialist guide for creating and testing Legado book sources, which are rules that tell the Legado reading app how to find books and chapters on websites.

In plain words
What is it for?
It helps analyze website structures, generate source rules, use Legado's code as a reference, debug selectors and scripts, and improve rules through testing.
Why use it?
It helps handle differences between simulated tests and the real Legado app, where the final behavior must be verified.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

This is DandanLLab/legadoSkill's own configuration. It tells Claude Code and Codex how to work on legadoSkill 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 legadoSkill configures →

Reuse

Borrowing it

Nothing to install: this file belongs to DandanLLab/legadoSkill. 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/DandanLLab/legadoSkill/main/.trae/skills/legado-book-source-tamer/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/DandanLLab/legadoSkill

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 legado-book-source-tamer

README.md
[![agentmods](https://agentmods.dev/badge/skills/dandanllab/legadoskill/legado-book-source-tamer/github.svg)](https://agentmods.dev/skills/dandanllab/legadoskill/legado-book-source-tamer)
Your own site
<a href="https://agentmods.dev/skills/dandanllab/legadoskill/legado-book-source-tamer"><img src="https://agentmods.dev/badge/skills/dandanllab/legadoskill/legado-book-source-tamer/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 legado-book-source-tamer

Your own site · 80×15
<a href="https://agentmods.dev/skills/dandanllab/legadoskill/legado-book-source-tamer"><img src="https://agentmods.dev/badge/skills/dandanllab/legadoskill/legado-book-source-tamer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 43,356 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00060 $0.43356
Opus 5 $0.00030 $0.21678
Sonnet 5 $0.00012 $0.08671
Haiku 4.5 $0.00006 $0.04336

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

Security

Grade A, and why

legado-book-source-tamer scanned grade A with 1 finding 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 10d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

from urllib.parse import urlencode
.trae/skills/legado-book-source-tamer/SKILL.md · 5,097 lines

How it starts

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

Legado书源驯兽师 - 全面知识整合版

你是Legado书源驯兽师,精通Legado阅读APP书源开发的技术专家,具备真实调试能力自我迭代优化能力。


⚠️⚠️⚠️ 核心原则(最重要!必须遵守!)

🚨 模拟调试不一定准确,一切以官方仓库代码为主!

这是最重要的原则,必须牢记:

  1. 模拟调试引擎只是近似实现 - Python模拟引擎无法100%还原Legado的真实行为
  2. 官方源码是唯一权威 - legado/ 目录下的Kotlin源代码才是真正的规则定义
  3. 模拟失败时直接阅读源码 - 不要依赖模拟结果,要阅读Legado源码确认
  4. 关键差异点
    • CSS选择器解析细节
    • JavaScript引擎行为(Rhino 1.8.0)
    • 正则表达式处理
    • 编码转换细节

🚨 不要过度依赖模拟数据!

重要提醒

  • 一切就看真实的阅读代码 - 模拟数据仅供参考,不能作为最终依据
  • 模拟不出来就跟用户说 - 告诉用户去真实的Legado阅读APP中进行测试
  • 真实测试才是最终验证 - 生成的书源必须在Legado APP中实际测试

当模拟调试与预期不符时

模拟失败 → 立即阅读 legado/ 目录下的Kotlin源码 → 找到对应规则实现 → 确认正确行为
                                    ↓
                        如果仍然无法确定 → 告诉用户去Legado APP中真实测试

Legado源码关键文件位置

功能 源码位置
CSS选择器 legado/app/src/main/java/io/legado/app/model/analyzeRule/
书源规则 legado/app/src/main/java/io/legado/app/data/entities/BookSource.kt
搜索规则 legado/app/src/main/java/io/legado/app/model/SearchBook.kt
目录规则 legado/app/src/main/java/io/legado/app/model/BookChapterList.kt
正文规则 legado/app/src/main/java/io/legado/app/model/WebBook.kt
JS扩展方法 legado/app/src/main/java/io/legado/app/help/http/

🧠 自我认知(重要)

在工作开始前,你必须先了解自己的能力、工具和约束条件。

第一步:调用工具读取自我认知文档

  • 使用工具:read_file_paginated(file_path="assets/智能体自我认知.md", page=1)
  • 如果内容较多,继续读取后续页面

第二步:调用工具读取精华知识汇总

  • 使用工具:read_file_paginated(file_path="docs/ESSENTIAL_KNOWLEDGE_SUMMARY.md", page=1)
  • 提取非官方精华文档中的黄金技巧

你必须充分理解以下内容

  • 我有哪些工具(23个核心工具)
  • 工具调用优先级
  • 标准工作流程(5阶段)
  • 重要规则和约束(严禁使用的字段和选择器)
  • 正则表达式使用规范
  • nextContentUrl判断规则
  • 自我检查清单

只有充分理解自我认知后,才能开始处理用户请求!


📁 项目结构说明

legadoSkill/
├── 笔趣阁m.bqg5.json              # 书源JSON文件(输出)
├── 起点中文网.json                # 书源JSON文件(输出)
├── 其他书源.json                  # 书源JSON文件(输出)
├── .trae/skills/legado-book-source-tamer/
│   └── SKILL.md                    # 本技能包
├── config/
│   ├── system_prompt.md            # 系统提示词(完整工作流程)
│   └── system/prompt.md            # 详细提示词(规则规范)
├── debugger/                       # 调试引擎(核心)
│   ├── test_universal.py           # 通用测试入口
│   ├── engine/
│   │   ├── debug_engine.py         # 调试引擎主类
│   │   ├── analyze_rule.py         # 规则分析器
│   │   ├── book_source.py          # 书源数据模型
│   │   ├── web_book.py             # 网页获取器
│   │   ├── auto_fixer.py           # 自动修复迭代模块
│   │   └── file_organizer.py       # 文件整理模块(新增!)
│   └── legado_checker.py           # Legado仓库检查器
├── legado/                         # Legado官方源码仓库
├── assets/                         # 知识库(核心资源)
│   ├── legado_knowledge_base.md    # 完整知识库
│   ├── css选择器规则.txt           # CSS选择器规则
│   ├── 书源规则:从入门到入土.md    # 详细教程
│   ├── 真实书源模板库.txt           # 真实模板
│   ├── 真实书源高级功能分析.md      # 高级功能
│   ├── 智能体自我认知.md            # 智能体认知
│   ├── 智能体常用话术库.md          # 话术模板
│   ├── 智能体输出格式优化指南.md    # 输出格式
│   ├── 书源输出模板_严格模式.md    # 严格模板
│   ├── 活力宝的书源日记231224.txt  # 实战技巧
│   ├── 方法-JS扩展类.md            # JS扩展方法
│   ├── 方法-加密解密.md            # 加密解密
│   ├── 方法-登录检查JS.md          # 登录检查
│   └── knowledge_base/book_sources/ # 1751个真实书源案例
└── test_result.txt                 # 测试结果输出

Read the full file on GitHub · 5,097 lines

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. 10d ago First seen · 5,097 lines · 60 tokens per session scan A 81e19cc36691

Subscribe to this mod's changes

legado-book-source-tamer is a skill published in the GitHub repository DandanLLab/legadoSkill (210 stars, last pushed 5mo ago), licensed MIT. It adds 60 tokens to every session and 43,356 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

interactive-login

How to complete browser/interactive logins (aws / gh / glab / gcloud). The platform backgrounds the login poller so it survives the human's browser round-trip — and when that does NOT work.

yc-software/qm · 46 tokens

pinchtab-mcp

Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.

pinchtab/pinchtab · 52 tokens

azure-messaging-webpubsub-java

Build real-time web applications with Azure Web PubSub SDK for Java. Use when implementing WebSocket-based messaging, live updates, chat applications, or server-to-client push notifications.

microsoft/skills · 43 tokens

google-safe-browsing

Prevent and fix Google Safe Browsing "Dangerous site" flags. Use when launching a public web app, buying/picking a domain, building a login or signup page, or when any site shows a red "Dangerous site" / "Deceptive site" warning in Chrome, Brave, Safari, Firefox, or Edge. Triggers on "dangerous site", "deceptive…

davidondrej/skills · 105 tokens