Repo Triage

A repeatable pattern for vetting a third-party repo (skill, tool, plugin) before committing to it: clone shallow, inspect shape, read the actual source, then check adoption signal via the GitHub API — chained into a few commands.

1. Shallow clone

cd /path/to/scratch
git clone --depth 1 -q https://github.com/user/repo.git localname 2>&1 | tail -2
echo "clone: $?"

-q for quiet, --depth 1 skips full history (fast, small).

2. Get oriented

cd localname
find . -type f -not -path "./.git/*" | wc -l
du -sh --exclude=.git .
ls -la
git log -1 --format='%ci %s'

File count, size, top-level shape, last commit date.

3. Read the actual content, not just the README

cat path/to/SKILL.md
# or, for a long file, page through it:
sed -n '120,300p' SKILL.md

4. Line/byte counts across several files at once

wc -l SKILL.md README.md references/*

5. Rough token-count estimate per file

for f in SKILL.md references/templates.md references/patterns.md; do
  printf "%-28s %6d bytes  ~%5d tokens\n" "$f" "$(wc -c < "$f")" "$(( $(wc -c < "$f") / 4 ))"
done

Chars / 4 is a decent rule of thumb.

6. Adoption/trust signal via the GitHub API

No auth needed for public repos:

curl -s https://api.github.com/repos/user/repo > /tmp/repo.json
python3 -c "
import json
d = json.load(open('/tmp/repo.json'))
for k in ['stargazers_count','forks_count','open_issues_count','subscribers_count','created_at','pushed_at','archived']:
    print(f'{k:22} {d.get(k)}')
print('license               ', (d.get('license') or {}).get('spdx_id'))
"

Answers “is this real/maintained” faster than browsing the GitHub UI.

7. How actively is a specific file/path maintained?

git fetch --deepen=300 -q 2>/dev/null   # shallow clones need deepening before log works fully
git log --oneline -- path/to/file | wc -l
git log -1 --format='%ci' -- path/to/file

Answers “is this specific file actively touched, or is the repo alive but this part dead.”

8. Find evidence backing a specific claim in the docs

grep -ril "65%" README.md benchmarks evals docs 2>/dev/null | head -10
grep -n -B3 -A6 "65%" README.md | head -60

Turns a marketing claim into something you can verify or debunk from the repo’s own source instead of taking it on faith.