ask-matt
MAmattpocock/skills337k近 7 天新增 4,978 个 star
Add GitHub skill repos to the ASM index: clone, audit, eval, regenerate index, rebuild catalog, open PR. Use when given GitHub URLs to onboard. Don't use for refreshing indexed repos (refresh-index), improving skills (skill-creator), or install.
You are adding new skill repository sources to the ASM (Agent Skill Manager) curated index. This is the pipeline that powers the skill catalog at https://luongnv.com/asm/ — every repo you add here becomes discoverable and installable by thousands of users.
Illustrative only — repo names and counts vary per run; the formats under Step Completion Reports and Final output are the real output shapes.
User: add github.com/anthropics/skills to the index
Result: PR opened
Evidence: Added 1 new repo(s), updated 0 existing repo(s) · Total new skills indexed: 14
Audit: 13 OK · 1 WARN · 0 FLAG · PR: <PR URL>
Uncertainty: the audit is lightweight and asm eval scores structure, not behavior; no repo used the manual fallback.
Decision: review and merge the PR; look first at the WARN skill <skill-name>.
Before modifying any files, pull the latest remote branch:
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin
git pull --rebase origin "$branch"
If tracked files are modified (git status --porcelain --untracked-files=no prints anything): git stash push without -u, sync, then git stash pop. Untracked files stay in place; other sessions may own them. If origin is missing or conflicts occur: stop and ask the user before continuing.
Check each before Step 1. If one fails, stop and name it.
node (>= 22), jq, and git on PATH; npm install done in the repo, so npx tsx resolvesasm on PATH — the Step 3 workers run asm evalgh auth status succeeds — Step 10 opens the PRgit status --porcelain -- website/ data/ prints nothing. Step 8 restores the tracked website/ files and data/repo-stars.json that build-catalog rewrites, which is safe only from a clean start.The user provides one or more GitHub repository URLs: https://github.com/owner/repo, github.com/owner/repo, github:owner/repo, or owner/repo. Normalize each to owner and repo.
Follow these steps in order. Each step has a verification check — do not proceed to the next step if verification fails.
You are the orchestrator. Steps 2 and 3 are the heavy ones, and you delegate both: each names the slice of references/ its worker needs and hands that slice over as the worker's Input. In those two steps you never clone a repo, read a SKILL.md, or run asm eval yourself, and you never open the two contract files — the workers do. This keeps the clones and contract text out of your context budget. (Step 7's manual-generation fallback is the one place you may call asm eval directly.)
No Agent tool? Degrade gracefully: read references/discovery-contract.md and references/audit-eval-contract.md yourself, run Steps 2 and 3 inline, in order, and say so in the Step 9 summary. The pipeline is identical; only the context cost changes.
For each URL provided:
owner and repo from the URL.https://api.github.com/repos/{owner}/{repo}. A 200 response means the repo exists; keep its stargazers_count for Step 8. Any other status marks it INVALID with that status.owner and repo with the two halves of the response's full_name. The ingester names files and installUrls with the case it is given, so Anthropics/Skills would otherwise create a duplicate entry.github:{owner}/{repo} in data/skill-index-resources.json. If present, mark it EXISTS (re-index); otherwise mark it NEW.Output a summary table:
| # | Owner/Repo | Status | Notes |
|---|---------------------|----------|--------------------------|
| 1 | owner/repo | NEW | Will be added |
| 2 | other/repo | EXISTS | Will be re-indexed |
| 3 | bad/repo | INVALID | 404 - repo not found |
If every repo is INVALID, stop and tell the user.
Spawn one discovery worker per valid repo, in the same turn so they run concurrently. Each worker's contract:
references/discovery-contract.md, plus that repo's owner and repo{owner, repo, tempRoot, clonePath, status, error, skills[]}, one object per reporeferences/discovery-contract.md yourself; the worker doesKeep every worker's tempRoot and clonePath: Step 3 runs against the clone, Cleanup deletes the tempRoot. There is no shared $TEMP_DIR in your shell — the clones were made in the workers'.
Report how many skills were found per repo. If a repo returns status: "no-skills", ask the user whether to include it anyway. If a repo returns status: "clone-failed", skip it, report its error, and continue with the others.
Spawn one audit worker per repo — or per batch of ~20 skills for a large repo — again in the same turn. Each worker's contract:
references/audit-eval-contract.md, that repo's clonePath from Step 2, and the relPath list for its batch{relPath, name, auditStatus, notes[], overallScore, grade}references/audit-eval-contract.md yourselfNo worker re-clones; they run against the Step 2 clones. Merge the workers' JSON — no re-reading of any skill file — into one combined report:
Repo: owner/repo (N skills discovered)
skill-name-1 OK 92 / A name + description present, no security flags
skill-name-2 WARN 58 / D missing description
skill-name-3 FLAG 71 / C contains shell execution patterns (exec, spawn)
The policy is permissive but transparent: accept every repo with at least one valid skill (name + description). WARN, FLAG, and low eval scores do not block inclusion; they are reported so the reviewer can decide. Keep the OK / WARN / FLAG counts per repo — Step 10's PR body uses them.
For each EXISTS repo from Step 1:
data/skill-index/{owner}_{repo}.json against the Step 2 skill list.If no NEW repo and no confirmed EXISTS repo remains, stop and report that there is nothing to add. If the current branch is not main, ask the user whether to branch from it or from main. Then:
git checkout -b feat/index-add-{repo-names}
For several repos, use feat/index-add-multiple-repos-{date}.
For each NEW repo, append to the repos array in data/skill-index-resources.json:
{
"source": "github:{owner}/{repo}",
"url": "https://github.com/{owner}/{repo}",
"owner": "{owner}",
"repo": "{repo}",
"description": "{repo description from GitHub API}",
"maintainer": "@{owner}",
"enabled": true
}
Add an optional "excludeSkills": ["<skill-name>", …] array when the repo holds skills that are not part of its published set: contributor-only skills (e.g. under .agents/skills), or a skill the Step 3 audit flagged. Each value is a skill name exactly as discovered (case-sensitive, no commas). Example: "excludeSkills": ["release-checklist"]. Step 7 and npm run preindex leave those skills out of the index.
Set the top-level updatedAt to the current ISO date.
Ingest only the repos this run adds or updates. Do not run npm run preindex: it re-ingests every enabled repo, which fills the diff with unrelated index refreshes (that is refresh-index's job). Use the repo's own CLI, with ASM_CONFIG_DIR pointed at a scratch directory so the user's real ~/.config/agent-skill-manager/skill-index/ is never written:
Create the scratch directory once and record its literal path (many hosts start each command in a fresh shell):
mktemp -d # e.g. /var/folders/.../tmp.AbC123 — use this literal path as INGEST_HOME below
Then, once per repo. When the repo's entry in data/skill-index-resources.json has excludeSkills, pass each name as its own --exclude flag, so the file matches what npm run preindex would write (no entry or no excludeSkills: no flags). Empty names are dropped. A name containing a comma stops this repo's ingest, because asm splits an --exclude value on commas and would exclude two names instead of one:
ROOT="$(git rev-parse --show-toplevel)"
INGEST_HOME="<literal path from mktemp>"
if EXCLUDES="$(jq -r --arg s "github:{owner}/{repo}" '
[.repos[] | select(.source == $s) | (.excludeSkills // [])[] | select(length > 0)]
| if any(.[]; contains(",")) then error("excludeSkills value contains a comma; asm splits --exclude on commas, so it would exclude two names") else .[] end' \
"$ROOT/data/skill-index-resources.json")"; then
EXCLUDE_ARGS=()
while IFS= read -r name; do
[ -n "$name" ] && EXCLUDE_ARGS+=(--exclude "$name")
done <<< "$EXCLUDES"
ASM_CONFIG_DIR="$INGEST_HOME" npx tsx "$ROOT/bin/agent-skill-manager.ts" \
index ingest "github:{owner}/{repo}" "${EXCLUDE_ARGS[@]}" --json
cp "$INGEST_HOME/skill-index/{owner}_{repo}.json" "$ROOT/data/skill-index/"
else
echo "Step 7 stopped for {owner}/{repo}: fix its excludeSkills entry (see the jq error above), then rerun" >&2
false
fi
If the block stops on a comma, do not fall back to the manual path: report the entry under Uncertainty and stop at Step 7 for that repo.
With --exclude, the JSON output adds excluded (names left out) and unmatchedExcludes (names that matched no discovered skill). A non-empty unmatchedExcludes is not a failure, but it means an exclusion is misspelled or the skill was renamed or removed upstream: list it under Uncertainty in the final output.
The ingested file's skillCount is authoritative. Use it in Step 9, the commit message, and the PR. If it differs from the Step 2 count, report both. The ingester populates tokenCount on every skill entry and, best-effort, evalSummary (field shape: references/manual-index.md); these power the catalog's "est. tokens" and "eval score" badges.
If the ingest exits non-zero for a repo, follow references/manual-index.md for that repo only, and record it as manually generated. That fallback takes evalSummary from asm eval <clonePath>/<relPath> --json and tokenCount from asm inspect <clonePath>/<relPath> --json, with clonePath and relPath taken from that repo's Step 2 worker result.
npx tsx scripts/build-catalog.ts
jq empty website/catalog.json
jq --arg p "github:{owner}/{repo}" \
'[.skills[] | select(.installUrl == $p or (.installUrl | startswith($p + ":")))] | length' \
website/catalog.json
git restore -- website/ data/repo-stars.json
Verification: build-catalog and jq empty exit 0, and the count for each repo equals its skillCount. If build-catalog fails, stop — a PR with a broken catalog must not land. build-catalog also rewrites tracked outputs (website/*-stats.json, website/robots.txt, and data/repo-stars.json on any networked run); git restore -- website/ data/repo-stars.json reverts them (safe only from the clean start the prerequisites require) and keeps the gitignored website/catalog.json.
After the restore, add each NEW repo's star baseline per references/star-baseline.md.
Check each item. If one fails, fix it before Step 10:
jq empty data/skill-index-resources.json exits 0 and the file contains every NEW repo.data/skill-index/{owner}_{repo}.json passes jq empty.tokenCount and an evalSummary with overallScore, grade, and categories. Evaluation is best-effort in the ingester: list any skill missing evalSummary under Uncertainty instead of failing the run.git status --porcelain --untracked-files=no | cut -c4- and git status --porcelain -- data/ | cut -c4- together list only data/skill-index-resources.json, data/repo-stars.json (NEW repos only), and the index files of the repos in this run. Untracked files outside data/ are not part of this check; other sessions may own them, and staging by name keeps them out of the commit.references/star-baseline.md pass, including CI=true npx vitest run src/repo-stars.test.ts (exit 0).Print the pre-PR summary:
Added N new repo(s), updated M existing repo(s)
Total new skills indexed: X
Audit: A OK · B WARN · C FLAG
Files changed: <list>
Read references/commit-and-pr.md for the staging rule, commit message, and PR body. Stage only the data files; never stage website/catalog.json. Build the PR's audit summary from the Step 3 counts.
Verification: gh pr view --json url returns the PR URL.
After each step, print a compact status block: √ pass, × fail, — context.
◆ Step N — [step name]
··································································
[check]: √ pass
Result: PASS | FAIL | PARTIAL
Checks per step:
branch up to dateevery URL classified NEW / EXISTS / INVALIDone result per repo, one audit row per discovered skillEXISTS changes confirmed, branch created, resources entry added per NEW repoone index file per repo, manual fallbacks named (if any)build-catalog exit 0, catalog count matches skillCount, star baseline per NEW repo, diff scope containedPR URL returnedEnd the run with a short report:
PR opened, nothing to add, or blocked at Step N with the reason.asm eval scores structure, not behavior: no indexed skill was run. Name any repo indexed by the manual fallback, any repo skipped as INVALID or clone-failed, and any non-empty unmatchedExcludes from Step 7 (with its repo).The expected output of a successful run, each item checkable:
git status --porcelain --untracked-files=no plus git status --porcelain -- data/ before commit list only the resources file, data/repo-stars.json (NEW repos only), and the index files of this run's repos.website/catalog.json, and website/catalog.json is not staged.gh pr view --json url returns a URL, or the commit SHA is reported on failure.When reviewing a run's output (by eval or by a human), also check that a reader can:
An agent's own review cannot confirm human understanding. A reviewer who received no human feedback records understanding as unconfirmed.
When a URL, clone, ingest, catalog build, auth, or PR step fails, or a repo is new, empty, huge, or already indexed, read references/edge-cases.md for the required response to each error. When in doubt, surface the issue to the user rather than silently dropping a repo; never overwrite an indexed repo with breaking changes without explicit confirmation.
After completion, delete every temp directory this run made:
tempRoot each worker returned verbatim. Never derive the target from clonePath.mktemp -d directory instead.INGEST_HOME (its literal path).rm -rf "<tempRoot>" # one per repo
rm -rf "<INGEST_HOME literal path>"
Optional and propose-only. After the run's result is delivered, run this check:
gh, jq, npx tsx, the GitHub API, or the Agent tool failed and a workaround worked.references/ (the directory holding this SKILL.md). Bump the patch number of metadata.version. If the skill is an installed copy or tracked in git, say so. Commit nothing unless the user asks.Off — the user opted out.references/discovery-contract.md — the Step 2 worker's slice: clone, discover, and report every SKILL.md as fixed JSON (including the tempRoot Cleanup deletes)references/audit-eval-contract.md — the Step 3 worker's slice: lightweight audit + asm eval, returned as fixed JSON rowsreferences/manual-index.md — Step 7 fallback: hand-built index file for a repo whose ingest failedreferences/commit-and-pr.md — Step 10 staging, commit message, and PR body templatereferences/star-baseline.md — Steps 8–9 star baseline for NEW reposreferences/edge-cases.md — the required response to each failure or unusual-repo condition (bad URL, clone/ingest/build failure, auth, already-indexed repo)MAmattpocock/skills337k近 7 天新增 4,978 个 star
MAmattpocock/skills337k近 7 天新增 4,978 个 star
MAmattpocock/skills337k近 7 天新增 4,978 个 star
OBobra/superpowers331k近 7 天新增 4,772 个 star
AFaffaan-m/ECC315k近 7 天新增 4,381 个 star
AFaffaan-m/ECC315k近 7 天新增 4,381 个 star