cp-skill-snapshot-web

Solid

Snapshot a URL into kb/sources/, routing GitHub, X/Twitter, PDF, and ordinary web sources to the appropriate capture path.

AI & Automation 83 stars 10 forks Updated yesterday CC-BY-4.0

Install

View on GitHub

Quality Score: 88/100

Stars 20%
64
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
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 Keep the provided URL as `source_url`. Use Grep to search for `source_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 `source_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** - **arXiv abstract page** (`arxiv.org/abs/...`) → **Step 2c** - **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 "{source_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 "{source_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: Resolve and Fetch PDF Set `pdf_url`: - For an arXiv abstract URL, replace `/abs/` with `/pdf/` and discard any query string or fragment. Preserve an explicit terminal version such as `v1`. If the abstract URL has ...

Details

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

Similar Skills

Semantically similar based on skill content — not just same category