[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F4Y7GQNSEP528VS6YF7S2M":3,"skill-same:01M7F4Y7GQNSEP528VS6YF7S2M":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M7F4Y7GQNSEP528VS6YF7S2M","skill-index-updater",null,"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 authoring (skill-creator), improving (skill-auto-improver), or install (asm install).","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fskill-index-updater\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: skill-index-updater\ndescription: \"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 authoring (skill-creator), improving (skill-auto-improver), or install (asm install).\"\nlicense: MIT\ncompatibility: Claude Code\nallowed-tools: Bash Read Write Edit Grep Glob WebFetch Agent\neffort: high\nmetadata:\n  version: 2.0.0\n  author: luongnv89\n---\n\n# Skill Index Updater\n\nYou 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:\u002F\u002Fluongnv.com\u002Fasm\u002F — every repo you add here becomes discoverable and installable by thousands of users.\n\n## Example\n\n```\nUser: add github.com\u002Fanthropics\u002Fskills to the index\nSkill output:\n  Step 1: Parsed 1 URL → anthropics\u002Fskills (NEW)\n  Step 2: Discovered 14 SKILL.md files\n  Step 3: Audit OK on 14\u002F14, eval scores 71–94\n  Step 6–8: data\u002Fskill-index-resources.json + data\u002Fskill-index\u002Fanthropics_skills.json updated, catalog rebuilt\n  Step 10: PR #312 opened — feat(index): add anthropics\u002Fskills (14 skills)\n```\n\n## Repo Sync Before Edits (mandatory)\n\nBefore modifying any files, pull the latest remote branch:\n\n```bash\nbranch=\"$(git rev-parse --abbrev-ref HEAD)\"\ngit fetch origin\ngit pull --rebase origin \"$branch\"\n```\n\nIf the working tree is dirty: stash, sync, then pop. If `origin` is missing or conflicts occur: stop and ask the user before continuing.\n\n## Input\n\nThe user provides one or more GitHub repository URLs. These can be in various formats:\n\n- `https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo`\n- `github.com\u002Fowner\u002Frepo`\n- `github:owner\u002Frepo`\n- `owner\u002Frepo` (shorthand)\n\nNormalize all inputs to extract `owner` and `repo`.\n\n## Pipeline\n\nFollow these steps in order. Each step has a verification check — do not proceed to the next step if verification fails.\n\nYou are the **orchestrator**. Steps 2 and 3 are the heavy ones, and you delegate both: each names the slice of `references\u002F` 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. (Step 7's manual-generation fallback is the one place you may call `asm eval` directly.)\n\n**No Agent tool?** Degrade gracefully: read `references\u002Fdiscovery-contract.md` and `references\u002Faudit-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.\n\n### Step 1: Parse and Validate Input URLs\n\nFor each URL provided:\n\n1. Extract `owner` and `repo` from the URL\n2. Verify the repository exists by checking `https:\u002F\u002Fapi.github.com\u002Frepos\u002F{owner}\u002F{repo}`\n3. Check if the repo is already in `data\u002Fskill-index-resources.json` — if so, mark it for **update** instead of **add**\n\nOutput a summary table:\n\n```\n| # | Owner\u002FRepo          | Status   | Notes                    |\n|---|---------------------|----------|--------------------------|\n| 1 | owner\u002Frepo          | NEW      | Will be added            |\n| 2 | other\u002Frepo          | EXISTS   | Will be re-indexed       |\n| 3 | bad\u002Frepo            | INVALID  | 404 - repo not found     |\n```\n\nIf ALL repos are invalid, stop and tell the user.\n\n### Step 2: Discover Skills in Each Repository (workers, one per repo)\n\nSpawn one discovery worker per valid repo, **in the same turn** so they run concurrently. Each worker's contract:\n\n- Input: `references\u002Fdiscovery-contract.md`, plus that repo's `owner` and `repo`\n- Output: the fixed JSON in that contract — `{owner, repo, tempRoot, clonePath, status, error, skills[]}`, one object per repo\n- You do NOT read `references\u002Fdiscovery-contract.md` yourself; the worker does\n\nKeep 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'.\n\nReport how many skills were found per repo. A repo that comes back `status: \"no-skills\"` gets flagged — ask the user whether to include it anyway (it might have skills added later). A repo that comes back `status: \"clone-failed\"` is skipped with its `error` reported; the other repos continue.\n\n### Step 3: Audit and Evaluate Discovered Skills (workers, one per batch)\n\nSpawn one audit worker per repo — or per batch of ~20 skills for a large repo — again in the same turn. Each worker's contract:\n\n- Input: `references\u002Faudit-eval-contract.md`, that repo's `clonePath` from Step 2, and the `relPath` list for its batch\n- Output: the fixed JSON array in that contract — one object per skill, `{relPath, name, auditStatus, notes[], overallScore, grade}`\n- You do NOT read `references\u002Faudit-eval-contract.md` yourself, and no worker re-clones: they run against the Step 2 clones\n\n#### Combined report\n\nMerge the workers' JSON — no re-reading of any skill file — into one table so the user sees quality and safety at a glance:\n\n```\nRepo: owner\u002Frepo (N skills discovered)\n\n  skill-name-1        OK     92 \u002F A    name + description present, no security flags\n  skill-name-2        WARN   58 \u002F D    missing description\n  skill-name-3        FLAG   71 \u002F C    contains shell execution patterns (exec, spawn)\n```\n\nColumns: `audit status`, `eval overallScore \u002F grade`, notes.\n\nThe current policy is **permissive** — accept all repos that have at least one valid skill (with name + description). Security warnings and low eval scores are informational only and do not block inclusion; they exist so the reviewer can make an informed call. If a user asks \"should we really add this one?\", point at the eval categories for specifics. This policy may become stricter in future versions.\n\n#### Where the eval result ends up\n\nAfter Step 7 regenerates the index, each skill entry in `data\u002Fskill-index\u002F{owner}_{repo}.json` gains two derived fields:\n\n- `tokenCount`: heuristic token estimate for the SKILL.md body\n- `evalSummary`: `{ overallScore, grade, categories[], evaluatedAt, evaluatedVersion }`\n\nThese power the \"est. tokens\" and \"eval score\" badges shown in the website catalog, the TUI, and `asm inspect`. No manual editing required — the ingester populates them as part of `preindex`.\n\n### Step 4: Check for Existing Repos to Update\n\nFor repos already in the index (`EXISTS` status from Step 1):\n\n1. Compare the existing index file (`data\u002Fskill-index\u002F{owner}_{repo}.json`) against freshly discovered skills\n2. Report what changed:\n   - New skills added\n   - Skills removed\n   - Skills with updated metadata (version, description, etc.)\n\nAsk the user to confirm updates before proceeding.\n\n### Step 5: Create Feature Branch\n\nOnly proceed if there are legitimate new repos to add or existing repos to update.\n\n```bash\ngit checkout -b feat\u002Findex-add-{repo-names}\n```\n\nUse a descriptive branch name. If adding multiple repos, abbreviate: `feat\u002Findex-add-multiple-repos-{date}`.\n\n### Step 6: Update skill-index-resources.json\n\nFor each NEW repo, add an entry to `data\u002Fskill-index-resources.json` in the `repos` array:\n\n```json\n{\n  \"source\": \"github:{owner}\u002F{repo}\",\n  \"url\": \"https:\u002F\u002Fgithub.com\u002F{owner}\u002F{repo}\",\n  \"owner\": \"{owner}\",\n  \"repo\": \"{repo}\",\n  \"description\": \"{repo description from GitHub API}\",\n  \"maintainer\": \"@{owner}\",\n  \"enabled\": true\n}\n```\n\nAlso update the `updatedAt` timestamp at the top level to the current ISO date.\n\n### Step 7: Generate Index Files\n\nFor each repo (new and updated), generate the index JSON file. Use the project's built-in `preindex` script if possible:\n\n```bash\ncd \"$(git rev-parse --show-toplevel)\"\nnpm run preindex\n```\n\nIf `npm run preindex` fails or takes too long, generate the index file manually by creating `data\u002Fskill-index\u002F{owner}_{repo}.json` with this structure:\n\n```json\n{\n  \"repoUrl\": \"https:\u002F\u002Fgithub.com\u002F{owner}\u002F{repo}.git\",\n  \"owner\": \"{owner}\",\n  \"repo\": \"{repo}\",\n  \"updatedAt\": \"{ISO timestamp}\",\n  \"skillCount\": N,\n  \"skills\": [\n    {\n      \"name\": \"skill-name\",\n      \"description\": \"Skill description from frontmatter\",\n      \"version\": \"0.0.0\",\n      \"license\": \"\",\n      \"creator\": \"\",\n      \"compatibility\": \"\",\n      \"allowedTools\": [],\n      \"installUrl\": \"github:{owner}\u002F{repo}:{relative\u002Fpath\u002Fto\u002Fskill}\",\n      \"relPath\": \"relative\u002Fpath\u002Fto\u002Fskill\",\n      \"tokenCount\": 0,\n      \"evalSummary\": {\n        \"overallScore\": 0,\n        \"grade\": \"F\",\n        \"categories\": [\n          { \"id\": \"structure\", \"name\": \"Structure & completeness\", \"score\": 0, \"max\": 10 }\n        ],\n        \"evaluatedAt\": \"{ISO timestamp}\",\n        \"evaluatedVersion\": \"0.0.0\"\n      }\n    }\n  ]\n}\n```\n\nThe `installUrl` format matters — it's how `asm install` locates skills. For single-skill repos (SKILL.md at root), omit the path portion. For multi-skill repos, include the relative path to the skill directory.\n\nIf you fall back to manual generation, you can populate `tokenCount` and `evalSummary` by calling `asm eval \u003CclonePath>\u002F\u003CrelPath> --json` on each skill directory — both values come from that repo's Step 2 worker result, and a root-level skill has an empty `relPath`, so its path is just `clonePath` — and lifting the `overallScore`, `grade`, `categories`, `evaluatedAt` fields into the skill entry. When `preindex` succeeds, the ingester handles this for you automatically.\n\n### Step 8: Rebuild Website Catalog\n\nRun the catalog build script to regenerate `website\u002Fcatalog.json`:\n\n```bash\nnpx tsx scripts\u002Fbuild-catalog.ts\n```\n\nVerify the output:\n\n- `website\u002Fcatalog.json` was updated\n- Total skill count increased (or stayed the same for pure updates)\n- No errors in the build output\n\n### Step 9: Verify Everything\n\nRun a final check:\n\n1. `data\u002Fskill-index-resources.json` is valid JSON and contains the new entries\n2. Each new `data\u002Fskill-index\u002F{owner}_{repo}.json` exists and is valid JSON\n3. Each skill entry in those index files has `tokenCount` (number) and `evalSummary` (object with `overallScore`, `grade`, `categories`) populated — if any are missing, re-run `npm run preindex` or fall back to manual population as described in Step 7\n4. `website\u002Fcatalog.json` is valid JSON and includes the new skills\n5. `git diff --stat` shows only the expected files changed\n\nReport a summary to the user:\n\n```\nAdded N new repo(s), updated M existing repo(s)\nTotal new skills indexed: X\nFiles changed: list of files\n\nReady to commit and create PR.\n```\n\n### Step 10: Commit, Push, and Create PR\n\nStage and commit with the conventional commit format:\n\nNote: `website\u002Fcatalog.json` is gitignored and rebuilt by CI (`deploy-website.yml`) on merge. Do NOT stage it — only stage the data files.\n\n```bash\ngit add data\u002Fskill-index-resources.json data\u002Fskill-index\u002F*.json\ngit commit -m \"feat(index): add {owner}\u002F{repo} to curated skill index\"\n```\n\nFor multiple repos:\n\n```bash\ngit commit -m \"feat(index): add N new skill sources\n\nAdded:\n- owner1\u002Frepo1 (X skills)\n- owner2\u002Frepo2 (Y skills)\n\"\n```\n\nPush and create a PR:\n\n```bash\ngit push -u origin HEAD\ngh pr create --title \"feat(index): add {description}\" --body \"$(cat \u003C\u003C'EOF'\n## Summary\n- Added N new skill repository source(s) to the curated index\n- Total new skills: X\n\n### New Repos\n| Repo | Skills | Description |\n|------|--------|-------------|\n| [owner\u002Frepo](url) | N | description |\n\n### Audit Summary\nAll skills passed the lightweight audit. No critical security flags.\n\n## Test Plan\n- [ ] `data\u002Fskill-index-resources.json` is valid JSON\n- [ ] Index files generated in `data\u002Fskill-index\u002F`\n- [ ] `website\u002Fcatalog.json` rebuilt successfully\n- [ ] CI passes\nEOF\n)\"\n```\n\n## Edge Cases & Error Handling\n\nEach row names a condition, the step that owns it, and the required response. When in doubt, surface the issue to the user rather than silently dropping a repo — the reviewer policy is **permissive** but **transparent**.\n\n| Condition                                                           | Response                                                                                                                               |\n| ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| **Repo URL is a 404 \u002F private repo**                                | Mark `INVALID` in the Step 1 table and skip; don't abort if other URLs are valid.                                                      |\n| **Git clone fails**                                                 | The Step 2 worker returns `status: clone-failed`; skip that repo, report its `error`, continue with the others.                        |\n| **Repo has zero SKILL.md files**                                    | The Step 2 worker returns `status: no-skills`; flag it and ask whether to include anyway (some repos seed empty and add skills later). |\n| **Repo has 50+ SKILL.md files**                                     | Keep going, but warn about runtime — `asm eval` over many skills is slow.                                                              |\n| **Repo already in index, unchanged**                                | Report `EXISTS, no diff` and skip index regeneration for that repo.                                                                    |\n| **Repo already in index, breaking changes** (skill removed\u002Frenamed) | Show a diff in Step 4 and require explicit user confirmation before overwriting.                                                       |\n| **`npm run preindex` missing or fails**                             | Fall back to manual generation per Step 7; do not block the PR.                                                                        |\n| **`npx tsx scripts\u002Fbuild-catalog.ts` fails**                        | Stop in Step 8 — structural; a PR with a broken catalog must not land.                                                                 |\n| **`gh` not authenticated**                                          | Prompt `gh auth login`; do not attempt to push without auth.                                                                           |\n| **`gh pr create` fails** (auth, network, missing remote)            | Print the committed SHA so the user can push and open the PR manually.                                                                 |\n| **Non-GitHub URL** (GitLab, Bitbucket)                              | Reject in Step 1 — this skill only indexes github.com.                                                                                 |\n| **URL to a single skill subdirectory** (`...\u002Ftree\u002Fmain\u002Fskills\u002Ffoo`) | Treat as the parent repo URL; let the Step 2 worker pick up just that skill.                                                           |\n| **Agent tool unavailable**                                          | Read both contract files yourself, run Steps 2 and 3 inline, and say so in the Step 9 summary.                                         |\n\n## Cleanup\n\nAfter completion, delete every temp directory Step 2 made. When Step 2 was delegated, use the `tempRoot` each worker returned verbatim — the clones live in the workers' temp directories, so there is no `$TEMP_DIR` in your shell to remove. If you ran Step 2 inline because the Agent tool was unavailable, the `mktemp -d` directory is your own: remove that one instead. Either way, never derive the target from `clonePath`:\n\n```bash\n# one per repo, the tempRoot from that repo's Step 2 result\nrm -rf \"\u003CtempRoot>\"\n```\n\n## References\n\n- `references\u002Fdiscovery-contract.md` — the Step 2 worker's slice: clone, discover, and report every SKILL.md as fixed JSON (including the `tempRoot` Cleanup deletes)\n- `references\u002Faudit-eval-contract.md` — the Step 3 worker's slice: lightweight audit + `asm eval`, returned as fixed JSON rows\n","# Skill Index Updater\n\nYou 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:\u002F\u002Fluongnv.com\u002Fasm\u002F — every repo you add here becomes discoverable and installable by thousands of users.\n\n## Example\n\n```\nUser: add github.com\u002Fanthropics\u002Fskills to the index\nSkill output:\n  Step 1: Parsed 1 URL → anthropics\u002Fskills (NEW)\n  Step 2: Discovered 14 SKILL.md files\n  Step 3: Audit OK on 14\u002F14, eval scores 71–94\n  Step 6–8: data\u002Fskill-index-resources.json + data\u002Fskill-index\u002Fanthropics_skills.json updated, catalog rebuilt\n  Step 10: PR #312 opened — feat(index): add anthropics\u002Fskills (14 skills)\n```\n\n## Repo Sync Before Edits (mandatory)\n\nBefore modifying any files, pull the latest remote branch:\n\n```bash\nbranch=\"$(git rev-parse --abbrev-ref HEAD)\"\ngit fetch origin\ngit pull --rebase origin \"$branch\"\n```\n\nIf the working tree is dirty: stash, sync, then pop. If `origin` is missing or conflicts occur: stop and ask the user before continuing.\n\n## Input\n\nThe user provides one or more GitHub repository URLs. These can be in various formats:\n\n- `https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo`\n- `github.com\u002Fowner\u002Frepo`\n- `github:owner\u002Frepo`\n- `owner\u002Frepo` (shorthand)\n\nNormalize all inputs to extract `owner` and `repo`.\n\n## Pipeline\n\nFollow these steps in order. Each step has a verification check — do not proceed to the next step if verification fails.\n\nYou are the **orchestrator**. Steps 2 and 3 are the heavy ones, and you delegate both: each names the slice of `references\u002F` 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. (Step 7's manual-generation fallback is the one place you may call `asm eval` directly.)\n\n**No Agent tool?** Degrade gracefully: read `references\u002Fdiscovery-contract.md` and `references\u002Faudit-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.\n\n### Step 1: Parse and Validate Input URLs\n\nFor each URL provided:\n\n1. Extract `owner` and `repo` from the URL\n2. Verify the repository exists by checking `https:\u002F\u002Fapi.github.com\u002Frepos\u002F{owner}\u002F{repo}`\n3. Check if the repo is already in `data\u002Fskill-index-resources.json` — if so, mark it for **update** instead of **add**\n\nOutput a summary table:\n\n```\n| # | Owner\u002FRepo          | Status   | Notes                    |\n|---|---------------------|----------|--------------------------|\n| 1 | owner\u002Frepo          | NEW      | Will be added            |\n| 2 | other\u002Frepo          | EXISTS   | Will be re-indexed       |\n| 3 | bad\u002Frepo            | INVALID  | 404 - repo not found     |\n```\n\nIf ALL repos are invalid, stop and tell the user.\n\n### Step 2: Discover Skills in Each Repository (workers, one per repo)\n\nSpawn one discovery worker per valid repo, **in the same turn** so they run concurrently. Each worker's contract:\n\n- Input: `references\u002Fdiscovery-contract.md`, plus that repo's `owner` and `repo`\n- Output: the fixed JSON in that contract — `{owner, repo, tempRoot, clonePath, status, error, skills[]}`, one object per repo\n- You do NOT read `references\u002Fdiscovery-contract.md` yourself; the worker does\n\nKeep 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'.\n\nReport how many skills were found per repo. A repo that comes back `status: \"no-skills\"` gets flagged — ask the user whether to include it anyway (it might have skills added later). A repo that comes back `status: \"clone-failed\"` is skipped with its `error` reported; the other repos continue.\n\n### Step 3: Audit and Evaluate Discovered Skills (workers, one per batch)\n\nSpawn one audit worker per repo — or per batch of ~20 skills for a large repo — again in the same turn. Each worker's contract:\n\n- Input: `references\u002Faudit-eval-contract.md`, that repo's `clonePath` from Step 2, and the `relPath` list for its batch\n- Output: the fixed JSON array in that contract — one object per skill, `{relPath, name, auditStatus, notes[], overallScore, grade}`\n- You do NOT read `references\u002Faudit-eval-contract.md` yourself, and no worker re-clones: they run against the Step 2 clones\n\n#### Combined report\n\nMerge the workers' JSON — no re-reading of any skill file — into one table so the user sees quality and safety at a glance:\n\n```\nRepo: owner\u002Frepo (N skills discovered)\n\n  skill-name-1        OK     92 \u002F A    name + description present, no security flags\n  skill-name-2        WARN   58 \u002F D    missing description\n  skill-name-3        FLAG   71 \u002F C    contains shell execution patterns (exec, spawn)\n```\n\nColumns: `audit status`, `eval overallScore \u002F grade`, notes.\n\nThe current policy is **permissive** — accept all repos that have at least one valid skill (with name + description). Security warnings and low eval scores are informational only and do not block inclusion; they exist so the reviewer can make an informed call. If a user asks \"should we really add this one?\", point at the eval categories for specifics. This policy may become stricter in future versions.\n\n#### Where the eval result ends up\n\nAfter Step 7 regenerates the index, each skill entry in `data\u002Fskill-index\u002F{owner}_{repo}.json` gains two derived fields:\n\n- `tokenCount`: heuristic token estimate for the SKILL.md body\n- `evalSummary`: `{ overallScore, grade, categories[], evaluatedAt, evaluatedVersion }`\n\nThese power the \"est. tokens\" and \"eval score\" badges shown in the website catalog, the TUI, and `asm inspect`. No manual editing required — the ingester populates them as part of `preindex`.\n\n### Step 4: Check for Existing Repos to Update\n\nFor repos already in the index (`EXISTS` status from Step 1):\n\n1. Compare the existing index file (`data\u002Fskill-index\u002F{owner}_{repo}.json`) against freshly discovered skills\n2. Report what changed:\n   - New skills added\n   - Skills removed\n   - Skills with updated metadata (version, description, etc.)\n\nAsk the user to confirm updates before proceeding.\n\n### Step 5: Create Feature Branch\n\nOnly proceed if there are legitimate new repos to add or existing repos to update.\n\n```bash\ngit checkout -b feat\u002Findex-add-{repo-names}\n```\n\nUse a descriptive branch name. If adding multiple repos, abbreviate: `feat\u002Findex-add-multiple-repos-{date}`.\n\n### Step 6: Update skill-index-resources.json\n\nFor each NEW repo, add an entry to `data\u002Fskill-index-resources.json` in the `repos` array:\n\n```json\n{\n  \"source\": \"github:{owner}\u002F{repo}\",\n  \"url\": \"https:\u002F\u002Fgithub.com\u002F{owner}\u002F{repo}\",\n  \"owner\": \"{owner}\",\n  \"repo\": \"{repo}\",\n  \"description\": \"{repo description from GitHub API}\",\n  \"maintainer\": \"@{owner}\",\n  \"enabled\": true\n}\n```\n\nAlso update the `updatedAt` timestamp at the top level to the current ISO date.\n\n### Step 7: Generate Index Files\n\nFor each repo (new and updated), generate the index JSON file. Use the project's built-in `preindex` script if possible:\n\n```bash\ncd \"$(git rev-parse --show-toplevel)\"\nnpm run preindex\n```\n\nIf `npm run preindex` fails or takes too long, generate the index file manually by creating `data\u002Fskill-index\u002F{owner}_{repo}.json` with this structure:\n\n```json\n{\n  \"repoUrl\": \"https:\u002F\u002Fgithub.com\u002F{owner}\u002F{repo}.git\",\n  \"owner\": \"{owner}\",\n  \"repo\": \"{repo}\",\n  \"updatedAt\": \"{ISO timestamp}\",\n  \"skillCount\": N,\n  \"skills\": [\n    {\n      \"name\": \"skill-name\",\n      \"description\": \"Skill description from frontmatter\",\n      \"version\": \"0.0.0\",\n      \"license\": \"\",\n      \"creator\": \"\",\n      \"compatibility\": \"\",\n      \"allowedTools\": [],\n      \"installUrl\": \"github:{owner}\u002F{repo}:{relative\u002Fpath\u002Fto\u002Fskill}\",\n      \"relPath\": \"relative\u002Fpath\u002Fto\u002Fskill\",\n      \"tokenCount\": 0,\n      \"evalSummary\": {\n        \"overallScore\": 0,\n        \"grade\": \"F\",\n        \"categories\": [\n          { \"id\": \"structure\", \"name\": \"Structure & completeness\", \"score\": 0, \"max\": 10 }\n        ],\n        \"evaluatedAt\": \"{ISO timestamp}\",\n        \"evaluatedVersion\": \"0.0.0\"\n      }\n    }\n  ]\n}\n```\n\nThe `installUrl` format matters — it's how `asm install` locates skills. For single-skill repos (SKILL.md at root), omit the path portion. For multi-skill repos, include the relative path to the skill directory.\n\nIf you fall back to manual generation, you can populate `tokenCount` and `evalSummary` by calling `asm eval \u003CclonePath>\u002F\u003CrelPath> --json` on each skill directory — both values come from that repo's Step 2 worker result, and a root-level skill has an empty `relPath`, so its path is just `clonePath` — and lifting the `overallScore`, `grade`, `categories`, `evaluatedAt` fields into the skill entry. When `preindex` succeeds, the ingester handles this for you automatically.\n\n### Step 8: Rebuild Website Catalog\n\nRun the catalog build script to regenerate `website\u002Fcatalog.json`:\n\n```bash\nnpx tsx scripts\u002Fbuild-catalog.ts\n```\n\nVerify the output:\n\n- `website\u002Fcatalog.json` was updated\n- Total skill count increased (or stayed the same for pure updates)\n- No errors in the build output\n\n### Step 9: Verify Everything\n\nRun a final check:\n\n1. `data\u002Fskill-index-resources.json` is valid JSON and contains the new entries\n2. Each new `data\u002Fskill-index\u002F{owner}_{repo}.json` exists and is valid JSON\n3. Each skill entry in those index files has `tokenCount` (number) and `evalSummary` (object with `overallScore`, `grade`, `categories`) populated — if any are missing, re-run `npm run preindex` or fall back to manual population as described in Step 7\n4. `website\u002Fcatalog.json` is valid JSON and includes the new skills\n5. `git diff --stat` shows only the expected files changed\n\nReport a summary to the user:\n\n```\nAdded N new repo(s), updated M existing repo(s)\nTotal new skills indexed: X\nFiles changed: list of files\n\nReady to commit and create PR.\n```\n\n### Step 10: Commit, Push, and Create PR\n\nStage and commit with the conventional commit format:\n\nNote: `website\u002Fcatalog.json` is gitignored and rebuilt by CI (`deploy-website.yml`) on merge. Do NOT stage it — only stage the data files.\n\n```bash\ngit add data\u002Fskill-index-resources.json data\u002Fskill-index\u002F*.json\ngit commit -m \"feat(index): add {owner}\u002F{repo} to curated skill index\"\n```\n\nFor multiple repos:\n\n```bash\ngit commit -m \"feat(index): add N new skill sources\n\nAdded:\n- owner1\u002Frepo1 (X skills)\n- owner2\u002Frepo2 (Y skills)\n\"\n```\n\nPush and create a PR:\n\n```bash\ngit push -u origin HEAD\ngh pr create --title \"feat(index): add {description}\" --body \"$(cat \u003C\u003C'EOF'\n## Summary\n- Added N new skill repository source(s) to the curated index\n- Total new skills: X\n\n### New Repos\n| Repo | Skills | Description |\n|------|--------|-------------|\n| [owner\u002Frepo](url) | N | description |\n\n### Audit Summary\nAll skills passed the lightweight audit. No critical security flags.\n\n## Test Plan\n- [ ] `data\u002Fskill-index-resources.json` is valid JSON\n- [ ] Index files generated in `data\u002Fskill-index\u002F`\n- [ ] `website\u002Fcatalog.json` rebuilt successfully\n- [ ] CI passes\nEOF\n)\"\n```\n\n## Edge Cases & Error Handling\n\nEach row names a condition, the step that owns it, and the required response. When in doubt, surface the issue to the user rather than silently dropping a repo — the reviewer policy is **permissive** but **transparent**.\n\n| Condition                                                           | Response                                                                                                                               |\n| ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| **Repo URL is a 404 \u002F private repo**                                | Mark `INVALID` in the Step 1 table and skip; don't abort if other URLs are valid.                                                      |\n| **Git clone fails**                                                 | The Step 2 worker returns `status: clone-failed`; skip that repo, report its `error`, continue with the others.                        |\n| **Repo has zero SKILL.md files**                                    | The Step 2 worker returns `status: no-skills`; flag it and ask whether to include anyway (some repos seed empty and add skills later). |\n| **Repo has 50+ SKILL.md files**                                     | Keep going, but warn about runtime — `asm eval` over many skills is slow.                                                              |\n| **Repo already in index, unchanged**                                | Report `EXISTS, no diff` and skip index regeneration for that repo.                                                                    |\n| **Repo already in index, breaking changes** (skill removed\u002Frenamed) | Show a diff in Step 4 and require explicit user confirmation before overwriting.                                                       |\n| **`npm run preindex` missing or fails**                             | Fall back to manual generation per Step 7; do not block the PR.                                                                        |\n| **`npx tsx scripts\u002Fbuild-catalog.ts` fails**                        | Stop in Step 8 — structural; a PR with a broken catalog must not land.                                                                 |\n| **`gh` not authenticated**                                          | Prompt `gh auth login`; do not attempt to push without auth.                                                                           |\n| **`gh pr create` fails** (auth, network, missing remote)            | Print the committed SHA so the user can push and open the PR manually.                                                                 |\n| **Non-GitHub URL** (GitLab, Bitbucket)                              | Reject in Step 1 — this skill only indexes github.com.                                                                                 |\n| **URL to a single skill subdirectory** (`...\u002Ftree\u002Fmain\u002Fskills\u002Ffoo`) | Treat as the parent repo URL; let the Step 2 worker pick up just that skill.                                                           |\n| **Agent tool unavailable**                                          | Read both contract files yourself, run Steps 2 and 3 inline, and say so in the Step 9 summary.                                         |\n\n## Cleanup\n\nAfter completion, delete every temp directory Step 2 made. When Step 2 was delegated, use the `tempRoot` each worker returned verbatim — the clones live in the workers' temp directories, so there is no `$TEMP_DIR` in your shell to remove. If you ran Step 2 inline because the Agent tool was unavailable, the `mktemp -d` directory is your own: remove that one instead. Either way, never derive the target from `clonePath`:\n\n```bash\n# one per repo, the tempRoot from that repo's Step 2 result\nrm -rf \"\u003CtempRoot>\"\n```\n\n## References\n\n- `references\u002Fdiscovery-contract.md` — the Step 2 worker's slice: clone, discover, and report every SKILL.md as fixed JSON (including the `tempRoot` Cleanup deletes)\n- `references\u002Faudit-eval-contract.md` — the Step 3 worker's slice: lightweight audit + `asm eval`, returned as fixed JSON rows\n",{"name":5,"effort":24,"license":15,"metadata":25,"description":7,"allowed-tools":28,"compatibility":29},"high",{"author":26,"version":27},"luongnv89","2.0.0","Bash Read Write Edit Grep Glob WebFetch Agent","Claude Code","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","05-技能与代理开发\u002Fskill-index-updater",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill skill-index-updater",{"tool":44,"command":45},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill skill-index-updater",{"tool":47,"command":48},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill skill-index-updater","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fskill-index-updater\u002FSKILL.md",true,[52,58,62],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"docs\u002FREADME.md","REFERENCE","参考文档",3862,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fskill-index-updater\u002Fdocs\u002FREADME.md",{"path":59,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Faudit-eval-contract.md",3298,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fskill-index-updater\u002Freferences\u002Faudit-eval-contract.md",{"path":63,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Fdiscovery-contract.md",3999,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fskill-index-updater\u002Freferences\u002Fdiscovery-contract.md",[67,74,79,86,93,100],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":75,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]