cp-skill-snapshot-web

Featured

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

AI & Automation 88 stars 11 forks Updated yesterday CC-BY-4.0

Install

View on GitHub

Quality Score: 89/100

Stars 20%
65
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: Verify Local Storage and Check for Duplicates Keep the provided URL as `source_url`. Verify that `kb/sources/.snapshots/` is ignored by the project. The shipped scaffold does this through `kb/sources/.gitignore`. If the directory is not ignored, stop before writing and report the missing rule. Use Grep to search for an exact frontmatter `source: {source_url}` in existing Markdown files in `kb/sources/.snapshots/`. If found, compute the SHA-256 of the exact file bytes, tell the user, and stop: > Already snapshotted: kb/sources/.snapshots/{filename} > SHA-256: {64-character lowercase checksum} ## 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 either the `Snapshot saved:` or `Already snapshotted:` 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 commo...

Details

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

Similar Skills

Semantically similar based on skill content — not just same category