clip-gh

Captures GitHub repositories as bounded, citable Markdown clippings for a wiki vault.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/ehartye/wiki-master --skill clip-gh-ehartye
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clip-gh
Source: https://github.com/ehartye/wiki-master/tree/main/skills/clip-gh
Command: npx skills add https://github.com/ehartye/wiki-master --skill clip-gh-ehartye

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Clipping a GitHub repository for a knowledge wiki is not like clipping a web page: a repo is hundreds or thousands of independently citable files, and dumping the whole tree either produces one unquotable blob or floods the vault with thousands of orphaned files. This skill clones a repo to a temporary directory, filters out dependency, build, binary, and lockfile noise, and produces a bounded set of Markdown clippings with per-file GitHub blob-URL citations. ## Core Features & Use Cases - Per-file mode for small repos: Repositories with up to 300 includable files become one clipping per file under raw/clippings/gh/<owner>/<repo>/, plus a _repo-overview.md manifest, with citations pointing to the exact blob URL at the clipped commit. - Digest mode for large repos: Repos over the cap produce a bounded manifest with composition and module tables, up to 150 module listing documents (paths and sizes only, never content), and up to 15 full-content anchor clips such as README, LICENSE, and project manifests. - Content-hash dedup and pruning: Re-clips skip unchanged files via source-hash comparison, and digest-mode re-runs automatically prune stale listings when module grouping changes. - Use Case: Capture a 10,000-file enterprise monorepo as 150 bounded module listings plus anchor files, then hand off to wiki-ingest to write a small set of curated source summaries citing the digest as evidence. ## Quick Start Ask the agent to clip a GitHub repository into the wiki by running the clip-gh script with the owner/repo, a quality tier, and the research topic, for example: clip the repository owner/repo at high quality under the topic of my current research run.

Frequently Asked Questions about clip-gh

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clip a GitHub repository into Markdown files?▼

Run the clip-gh script with an owner/repo, a GitHub URL, or an SSH remote, plus a quality tier and topic. It clones via the gh CLI to a temp directory, filters noise, and writes one Markdown clipping per file under raw/clippings/gh/<owner>/<repo>/.

How do I capture a large GitHub monorepo without thousands of files?▼

Repositories over the 300-file cap automatically use digest mode, which writes a bounded manifest, up to 150 module listing documents with paths and sizes only, and up to 15 full-content anchor clips like README and LICENSE. Use --max-groups to adjust the listing cap.

Does clipping private GitHub repositories require extra configuration?▼

No extra configuration is needed. The script shells out to gh repo clone, so it transparently uses your existing gh auth session, and any private repo you can already access on the command line works.

What files are excluded when clipping a GitHub repository?▼

Excluded items include directories like node_modules, vendor, dist, build, and .git; binary, media, archive, and compiled extensions; generated lockfiles such as package-lock.json and Cargo.lock; and any file over 256 KB.

What happens when I re-clip a repository that has changed?▼

Re-clips use per-repo content-hash dedup, so unchanged files are reported as unchanged rather than rewritten. In digest mode, stale module listings from a previous run are automatically pruned when grouping boundaries change.

Why did my GitHub repo clip fail with a failed result?▼

A failed result means gh repo clone itself errored, typically due to a bad repo name, missing access, or a network problem. Run the script with --doctor to check that the gh CLI is installed and authenticated, then report the failure for manual handling.