repo-howto
Goal: turn "I want feature X" or a GitHub link into a clear, short how-to.
- Token check first: if the feature is simple or the repo is small, read only the README (and at most 1-2 files) and answer. Use the full digest only for complex repos.
- Find repos (skip if the user gave a link):
gh search repos "<keywords>" --sort stars --limit 8 --json fullName,description,stargazersCount,updatedAt,license. Also WebSearch if gh finds little. Prefer maintained (pushed in the last 12 months), real stars, permissive license. Pick the best 1-3. - Read each pick, cheapest first:
gitingest <url> -o -(read-only digest; if the command is missing, use theghfallback and tell the user, don't pip install). Pipe throughhead -c 60000for big repos.- Fallback:
gh repo view <owner/repo>andgh api repos/<owner>/<repo>/readme, then read only the key files. - Private repo: use gh, never send a token to a hosted gitingest site.
- Answer short, in the user's language:
- What it does and how it is structured (3-6 lines, cite files).
- How to replicate it in the user's stack (steps, libs, pitfalls).
- License and maintenance caveats; flag anything risky (scraping ToS, secrets, abandoned).
- If several repos fit, a compact comparison and one recommendation.
Do not clone or install anything from the repo. Read only.