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.
npx skills add chengkj99/kj-skills --skill course-scrapergit clone --depth 1 https://github.com/chengkj99/kj-skillsWrote 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.
[](https://agentmods.dev/skills/chengkj99/kj-skills/course-scraper)<a href="https://agentmods.dev/skills/chengkj99/kj-skills/course-scraper"><img src="https://agentmods.dev/badge/skills/chengkj99/kj-skills/course-scraper/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.
<a href="https://agentmods.dev/skills/chengkj99/kj-skills/course-scraper"><img src="https://agentmods.dev/badge/skills/chengkj99/kj-skills/course-scraper.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00244 | $0.03892 |
| Opus 5 | $0.00122 | $0.01946 |
| Sonnet 5 | $0.00049 | $0.00778 |
| Haiku 4.5 | $0.00024 | $0.00389 |
Grade A, and why
course-scraper 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 267 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Course Scraper — 课程抓取 & 双语翻译
从在线课程平台抓取所有课时文字内容与图片,存为结构化 Markdown,并翻译成中英对照格式。
适用场景
- 用户提供一个课程 URL(如 Skilljar、LMS 类平台),想把内容本地存档 → 单课程平台模式
- 用户提供一份链接清单/导航页/资源合集(几十条跨域链接),想把这些链接的正文都抓下来 → 链接清单模式
- 需要将英文内容翻译成中英双语对照版本
- 课程需要账号登录才能访问
- 需要把网页/PDF/课程里的图片一并本地归档,避免 Markdown 依赖远程图片
图片抓取规则(默认开启)
两个脚本都必须把图片作为正文资产的一部分处理:
- 图片保存位置:每篇文章/课时旁边的
_assets/<文件slug>/ - Markdown 写法:正文里的远程图片链接改成本地相对路径,例如
或。 - 图片必须尽量插回正文原位置:优先在正文容器内按 DOM 顺序转换 Markdown,让图出现在对应段落/步骤附近,形成可读的图文资料。
- 只有当正文提取器无法保留图片位置时,才允许在文末追加
## 图片 / Images区块;这种情况必须在报告或文件头体现,方便后续人工复核。 - 文件头或报告中记录图片数量:
图片 / Images: 已下载数/候选数 - 跳过
data:、blob:、明显小图标、头像、二维码、评论区、页脚分享图等非正文图片;下载失败不阻塞正文抓取,但必须在报告中体现下载数量。 - 下载图片后必须校验响应类型,
text/html/ 验证页 / 错误页不能冒充图片落盘;若下载失败,保留正文并在报告中记录。
经验教训:早期版本只抓正文,
scrape.py甚至只取inner_text(),会把课程截图、流程图、UI 图全部丢掉。后续任何抓取都要把“图片本地化”作为验收项。 经验教训:很多站点会把头像、二维码、作者卡片、评论区、推荐阅读、分享按钮、广告和页脚混在body里。抓取时必须优先锁定正文容器(如article、main、[role=main]、.markdown-body、.post-content、.lesson-content,以及少数站点的正文容器如#js_content),不要从body img全量收图。
正文清洗规则(默认开启)
抓取目标不是“整页备份”,而是“可阅读、可沉淀的正文资料”。脚本输出必须满足:
- 优先选择通用正文容器:
article、main、[role=main]、.markdown-body、.post-content、.entry-content、.article-content、.lesson-content等;站点特定容器(如#js_content)只能作为补充选择器,不能让脚本退化为某个平台专用。 - 不要把导航栏、页脚、作者卡片、二维码、评论/留言入口、分享按钮、推荐阅读、订阅/登录 CTA、搜索/投诉/跳转提示、登录运行时提示当作正文。
- 若
trafilatura抽取结果偏薄或混入运行时文案,必须回到 Playwright DOM,读取正文容器并二次清洗。 - 文件头里的
抓取方式要写明使用了dom-container:<selector>、trafilatura还是markdownify-fallback,不要把兜底产物伪装成高质量正文。 - 如果正文和图片位置明显错位,优先修脚本或做容器级重抓;不要只把图片堆到文末交付。
- 如果输出里出现验证码、安全验证、异常环境页、
security verification,或markdownify-fallback产物包含大量 CSS/JS(如window.、document.、@media),即使字符数很多也必须标为THIN/ERROR,不能算OK。
先判别模式(最重要)
拿到需求后,第一步判断属于哪种模式,不要默认套单课程逻辑:
| 信号 | 模式 | 用哪个脚本 |
|---|---|---|
| 一个课程站点、登录后有侧边栏课时列表(Skilljar/LMS) | 单课程平台模式 | scripts/scrape.py |
| 一份 Markdown/文档里列了许多不同域名的链接(资源清单、导航页、合集) | 链接清单模式 | scripts/fetch_links.py |
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.
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.
- 11d ago First seen · 267 lines · 244 tokens per session scan A 92bac94714e6
course-scraper is a skill published in the GitHub repository chengkj99/kj-skills (14 stars, last pushed 10d ago), licensed MIT. It adds 244 tokens to every session and 3,892 once invoked, about $0.0012 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.
Other skills, from other repositories
baoyu-youtube-transcript
A tool for downloading the written captions, subtitles, chapter information, speaker labels, and cover image from a YouTube video using its URL or ID.
orbit-notion
Open Orbit briefing skill — selected by the Orbit pipeline when Notion is the user's only connected connector, or when the user explicitly scopes their daily digest to Notion. Pulls the past 24 hours of document edits, comments, mentions, and database row changes from the user's authenticated Notion connection and…
instrument-data-to-allotrope
Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…
feishu
Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.
read
Reads URLs and PDFs by fetching source content, defaulting to concise summaries for plain read requests and clean Markdown when asked to convert, save, quote, cite, or feed downstream work. Use when users ask in any language to read, fetch, check, summarize, quote, cite, convert, or save a URL or PDF. Not for local…
overleaf-sync
A two-way connection between a local paper folder and Overleaf, a web-based LaTeX editor for writing research papers. It lets you move changes between the local files and the shared Overleaf project.