Skip to content

laiso/site2skill

Repository files navigation

site2skill

Turn any documentation website into a Claude Agent Skill.

site2skill is a tool that scrapes a documentation website, converts it to Markdown, and packages it as a Claude Agent Skill (ZIP format) with a proper SKILL.md entry point.

Agent Skills are dynamically loaded knowledge modules that Claude uses on demand. They work across Claude Code, Claude apps, and the API.

Usage

You can run this tool directly using uvx (requires uv installed):

# General usage
uvx --from git+https://github.com/laiso/site2skill site2skill <URL> <SKILL_NAME>

# Example: Create a skill for PAY.JP
uvx --from git+https://github.com/laiso/site2skill site2skill https://docs.pay.jp/v1/ payjp

CLI Options

site2skill <URL> <SKILL_NAME> [options]

Options:
  --target           Target agent (claude|claude-desktop|cursor|gemini|codex). Sets default output directory
  --output, -o       Base output directory for skill structure (overrides target default)
  --skill-output     Output directory for .skill file (default: .)
  --temp-dir         Temporary directory for processing (default: build)
  --skip-fetch       Skip the download step (use existing files in temp dir)
  --clean            Clean up temporary directory after completion

Requirements

  • Python 3.10+
  • wget: Must be installed and available in your PATH.
    • macOS: brew install wget
    • Linux: apt install wget
    • Windows: Use WSL, or install via choco install wget / scoop install wget

How it works

  1. Fetch: Downloads the documentation site recursively using wget.
  2. Convert: Converts HTML pages to Markdown using beautifulsoup4 and markdownify.
  3. Normalize: Cleans up links and formatting.
  4. Validate: Checks the skill structure and size limits.
  5. Package: Generates SKILL.md and zips everything into a .skill file.

Output

The tool generates a skill directory in .claude/skills/<skill_name>/ containing:

<skill_name>/
├── SKILL.md           # Entry point with usage instructions
├── references/        # Markdown documentation files (preferred)
└── scripts/
    └── search_docs.py # Search tool for documentation

Additionally, a <skill_name>.skill file (ZIP archive) is created in the current directory.

Legacy note: older skills may use docs/ instead of references/. The search tool and validator now support both, preferring references/ when present.

Search Tool

Each generated skill includes a search script:

python scripts/search_docs.py "<query>"
python scripts/search_docs.py "<query>" --json --max-results 5

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors