cp-skill-snapshot-web

Solid

Snapshot any URL into kb/sources/. Routes by URL type — GitHub issues/PRs via gh API, X/Twitter via xdk, PDFs via download+Read, web pages via WebFetch. One skill, URL in, markdown snapshot out. Triggers on "/cp-skill-snapshot-web", "/cp-skill-snapshot-web [url]".

AI & Automation 69 stars 9 forks Updated today CC-BY-4.0

Install

View on GitHub

Quality Score: 88/100

Stars 20%
61
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

## EXECUTE NOW **Target: $ARGUMENTS** If no URL provided, ask the user for one. If URL provided, start Step 1 immediately. **START NOW.** --- ## Step 1: Check for Duplicates Use Grep to search for the URL in existing `.md` files in `kb/sources/`. If found, tell the user and stop: > Already snapshotted: kb/sources/{filename} ## Step 2: Route by URL Type Detect the URL type and branch: - **GitHub issue/PR** (`github.com/.../issues/N` or `github.com/.../pull/N`) → **Step 2a** - **X/Twitter** (`x.com/.../status/...` or `twitter.com/.../status/...`) → **Step 2b** - **PDF** (URL ends in `.pdf`, or `arxiv.org/pdf/`) → **Step 2c** - **Everything else** → **Step 2d** ### Step 2a: GitHub Issue/PR Run: ```bash commonplace-github-snapshot "{url}" ``` Parse the "Snapshot saved:" line from the output to get the file path. Tell the user and stop — the script handles metadata, formatting, and saving. ### Step 2b: X/Twitter Post Run: ```bash commonplace-x-snapshot "{url}" ``` Parse the "Snapshot saved:" line from the output to get the file path. Tell the user and stop — the script handles metadata, formatting, and saving. ### Step 2c: Fetch PDF Download the PDF to a temporary file: ```bash curl -sL -o /tmp/snapshot_download.pdf "{url}" ``` Then use the Read tool to read the PDF: - For short papers (< 20 pages): `Read(file_path="/tmp/snapshot_download.pdf")` - For longer papers: read in chunks using the `pages` parameter (max 20 pages per request), e.g. `pages: "1-20"`, ...

Details

Author
zby
Repository
zby/commonplace
Created
3 months ago
Last Updated
today
Language
Python
License
CC-BY-4.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category