Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

docs-to-skill文档到技能

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

210

周安装

9

GitHub Stars

公开资料未说明

下载量

73
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:docs-to-skill(文档到技能)
来源仓库:https://github.com/jay-sahnan/skills
仓库路径:skills/docs-to-skill
安装命令:
npx skills add https://github.com/jay-sahnan/skills --skill docs-to-skill
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jay-sahnan/skills --skill docs-to-skill

简介

将任意在线文档转换为可用的 Claude Code 技能包。

  • 自动爬取 llms.txt 索引页获取全部文档页面列表。
  • 支持主流文档站点(ReadMe、GitBook、Docusaurus 等)。
  • 生成包含脚本调用与错误处理的完整技能模板。
  • 输出需人工检查脚本安全性与功能完整性。docs-to-skill 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

docs-to-skill

Convert any online documentation into a Claude Code skill with working scripts.

Usage

/docs-to-skill <documentation-url>

Example:

/docs-to-skill https://docs.browserbase.com

Workflow

When invoked, execute these phases in order:

Phase 1: Discover ALL Documentation Pages

IMPORTANT: Get the COMPLETE list of pages before crawling. Many doc sites provide indexes.

Step 1: Check for Documentation Index Files

Try these URLs in order (use WebFetch). Stop when one works:

  1. llms.txt (AI-friendly index, increasingly common): https://docs.example.com/llms.txt https://example.com/llms.txt Prompt: "Extract ALL documentation URLs listed in this file"
  2. sitemap.xml: https://docs.example.com/sitemap.xml https://example.com/sitemap.xml Prompt: "Extract ALL URLs from this sitemap"
  3. docs.json or manifest: https://docs.example.com/docs.json https://docs.example.com/_sidebar.md

If an index file exists, you now have the COMPLETE list of pages. Skip to Step 3.

Step 2: Fallback - Link Discovery (if no index found)

If no index file exists, crawl by following links:

  1. Fetch the starting URL using WebFetch: Extract all information from this documentation page. Return: 1. The main content/text of this page 2. ALL internal documentation links (same domain) 3. The page title 4. Navigation structure (sidebar links, breadcrumbs)
  2. Build a URL queue from discovered links:

- Include paths: /docs/, /guide/, /api/, /reference/, /tutorial/, /quickstart/, /introduction/, /getting-started/, /examples/, /features/, /integrations/ - Exclude paths: /blog/, /changelog/, /legal/, /privacy/, /terms/, /pricing/, /about/, /careers/, /contact/ - Exclude: external domains, asset files (.css, .js, .png, .jpg, .svg, .ico)

  1. Recursively discover more links from each fetched page until no new URLs are found.

Step 3: Prioritize and Crawl Pages

With your complete URL list (from index or discovery):

  1. Categorize by priority:

- HIGH: quickstart, getting-started, introduction, overview (fetch first) - MEDIUM: guides, tutorials, features, api-reference - LOW: integrations, advanced, edge cases

  1. Fetch pages in priority order using WebFetch: Extract ALL content from this documentation page: 1. Full text content 2. ALL code examples with language tags 3. Environment variables mentioned 4. Package/dependency names 5. API methods and signatures
  2. Batch for efficiency: Fetch up to 3-5 pages in parallel using multiple WebFetch calls.
  3. Coverage targets:

- Small docs (<30 pages): Fetch ALL pages - Medium docs (30-100 pages): Fetch all HIGH + MEDIUM priority (~50-70%) - Large docs (100+ pages): Fetch all HIGH + selective MEDIUM (~30-50%)

  1. Store results: {url, title, content, codeExamples[], category}

Phase 2: Analyze Content

Analyze the collected documentation to understand:

  1. Core Purpose: What does this tool/library/service do? What problem does it solve?
  2. Content Categories - Group pages into:

- Quickstart/Getting Started: Installation, setup, first steps - Core Concepts: Key ideas, architecture, how it works - API Reference: Functions, methods, parameters, types - Guides/Tutorials: Step-by-step walkthroughs - Integrations: Framework support, third-party tools - Advanced: Edge cases, optimization, troubleshooting

  1. Code Patterns: Extract ALL code snippets from the documentation:

- Installation commands - Import statements - Initialization/setup code - Common API calls - Full working examples - Error handling patterns

  1. Detect Language & Framework:

- Primary language: TypeScript, Python, JavaScript, Go, etc. - Package manager: npm, pnpm, pip, etc. - Framework dependencies: Playwright, Puppeteer, Express, FastAPI, etc. - Environment variables required

  1. Key Triggers: What keywords/phrases should activate this skill?

- The tool/library name - Common tasks it performs - Error messages users might encounter - Related technologies

Phase 3: Generate Scripts

Before generating the skill files, create working executable scripts based on the documentation.

3.1 Determine Script Types Needed

Based on the documentation, identify which scripts to create:

Doc ContentScript to Generate
Quickstart guidescripts/quickstart.ts - minimal working example
Authentication/setupscripts/setup.ts - initialization and config
Core API operationsscripts/examples/*.ts - one per major feature
Data extractionscripts/extract.ts - scraping/data gathering
Automation workflowsscripts/automate.ts - multi-step workflows

3.2 Script Structure

Each script should be complete and runnable:

// scripts/quickstart.ts
import { Client } from "library-name";
import "dotenv/config";

// Environment variables needed
const apiKey = process.env.LIBRARY_API_KEY;
if (!apiKey) {
  console.error("Missing LIBRARY_API_KEY environment variable");
  process.exit(1);
}

async function main() {
  // Initialize client
  const client = new Client({ apiKey });

  // Core functionality from docs
  const result = await client.doSomething();

  console.log("Result:", result);
}

main().catch(console.error);

3.3 Generate package.json / requirements.txt

For TypeScript/JavaScript:

{
  "name": "skill-name-scripts",
  "type": "module",
  "scripts": {
    "quickstart": "npx tsx scripts/quickstart.ts",
    "example:feature": "npx tsx scripts/examples/feature.ts"
  },
  "dependencies": {
    // Extract from docs - the actual packages needed
  },
  "devDependencies": {
    "tsx": "^4.0.0",
    "typescript": "^5.0.0",
    "@types/node": "^20.0.0",
    "dotenv": "^16.0.0"
  }
}

For Python:

# requirements.txt
library-name>=1.0.0
python-dotenv>=1.0.0
# Additional deps from docs

3.4 Generate.env.example

Create a template for required environment variables:

# .env.example
LIBRARY_API_KEY=your_api_key_here
# Add other env vars mentioned in docs

Phase 4: Generate Skill Files

Create the skill in skills/<skill-name>/ where <skill-name> is derived from the documentation (e.g., "browserbase", "stagehand", "stripe").

4.1 Generate SKILL.md

Create SKILL.md with:

---
name: <skill-name>
description: <one-line description of what the skill helps with>
---

SKILL.md Body Guidelines (read references/skill-creator-guide.md for full details):

  • Keep under 500 lines - move detailed content to references/
  • Context efficiency: Only include what Claude can't deduce
  • Focus on the "how": Step-by-step workflows, not encyclopedic coverage
  • Include code examples: Show, don't tell
  • Define triggers clearly: When should this skill activate?
  • Reference scripts: Point users to scripts/ for runnable examples

Structure the body as:

  1. Brief overview (2-3 sentences max)
  2. When to use this skill (trigger conditions)
  3. Quick reference for common tasks
  4. Code templates for frequent patterns
  5. Available scripts and how to run them
  6. Pointers to reference files for deep dives

4.2 Generate Reference Files

Create references/ directory with topic-specific files:

  • quickstart.md - Installation and first steps
  • api-reference.md - Detailed API documentation
  • examples.md - Code examples and patterns
  • Additional files as needed based on content categories

Reference file guidelines:

  • One topic per file
  • Include table of contents if >100 lines
  • Preserve code examples from original docs
  • Keep formatting clean and scannable

4.3 Include Generated Scripts

Move the scripts created in Phase 3 into the skill:

  • scripts/ - All executable scripts
  • package.json or requirements.txt - Dependencies
  • .env.example - Environment variable template

Phase 5: Output Summary

After generation, provide:

  1. Skill location: skills/<skill-name>/
  2. Files created: List all generated files
  3. Skill statistics: Line counts, reference file count
  4. Installation command: claude skill install./skills/<skill-name>
  5. Test suggestion: A simple command to verify the skill works

URL Discovery Strategy

Priority: Use Index Files First

Many documentation platforms provide complete page indexes:

PlatformIndex LocationFormat
Mintlify/llms.txtPlain text URLs
Docusaurus/sitemap.xmlXML
GitBook/sitemap.xmlXML
ReadTheDocs/sitemap.xmlXML
MkDocs/sitemap.xmlXML
Custom/docs.json, /_sidebar.mdVaries

Always check for llms.txt first - it's specifically designed for AI consumption and lists all documentation pages.

Handling Large Documentation Sites

For sites with 100+ pages (like Browserbase with 127 pages):

  1. Don't try to fetch everything - context limits make this impractical
  2. Prioritize by category:

- Introduction/Overview: Always fetch - Quickstart: Always fetch - Core API: Always fetch - Guides: Fetch top 5-10 - Integrations: Fetch most popular 3-5 - Reference: Summarize, link to full docs

  1. Generate comprehensive reference files that point to full docs for deep dives

Handling Subdomains

  • docs.example.com - crawl
  • api.example.com - only if it's API docs
  • blog.example.com - skip
  • example.com (main site) - skip unless it contains docs

Rate Limiting

WebFetch handles rate limiting automatically. For large crawls:

  • Batch 3-5 parallel fetches
  • Wait briefly between batches if errors occur

Example Output Structure

For https://docs.browserbase.com:

skills/browserbase/
├── SKILL.md                 # ~200-400 lines
│   - Overview
│   - When to use
│   - Quick reference
│   - Common patterns
│   - Available scripts
│
├── scripts/                 # Runnable code examples
│   ├── quickstart.ts        # Minimal working example
│   ├── create-session.ts    # Session management
│   ├── extract-data.ts      # Data extraction example
│   └── examples/
│       ├── playwright.ts    # Playwright integration
│       ├── puppeteer.ts     # Puppeteer integration
│       └── stealth.ts       # Anti-detection setup
│
├── references/
│   ├── quickstart.md        # Installation, first session
│   ├── api-reference.md     # Sessions, contexts, CDP
│   ├── integrations.md      # Playwright, Puppeteer, Selenium
│   └── advanced.md          # Proxies, captchas, debugging
│
├── package.json             # Dependencies & run scripts
└── .env.example             # Required environment variables

Running Generated Scripts

After skill generation, users can run scripts with:

cd skills/browserbase
npm install
cp .env.example .env  # Then fill in API keys
npm run quickstart    # Run the quickstart example

Quality Checklist

Before completing, verify:

SKILL.md:

  • Has valid YAML frontmatter
  • Under 500 lines
  • Description clearly states what the skill does
  • Triggers are specific and relevant

Scripts:

  • All scripts are syntactically correct
  • Scripts have proper error handling
  • Environment variables are validated
  • package.json/requirements.txt includes all dependencies
  • .env.example lists all required variables
  • npm run scripts are defined for each script

References:

  • Code examples are syntactically correct
  • Reference files are well-organized
  • No broken internal links between files

Test the skill:

  • Run npm install in the skill directory
  • Run npm run quickstart (should fail gracefully without API key)
  • Verify skill loads correctly in Claude Code

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.46%
按下载量换算27

Claude

28.75%
按下载量换算21

Cursor

20.56%
按下载量换算15

Gemini CLI

9.03%
按下载量换算7

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills