Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/luongnv89/asm/refresh-indexnpx skills add luongnv89/asm --skill refresh-indexgit clone --depth 1 https://github.com/luongnv89/asmWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/luongnv89/asm/refresh-index)<a href="https://agentmods.dev/skills/luongnv89/asm/refresh-index"><img src="https://agentmods.dev/badge/skills/luongnv89/asm/refresh-index.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00045 | $0.02646 |
| Opus 5 | $0.00023 | $0.01323 |
| Sonnet 5 | $0.00009 | $0.00529 |
| Haiku 4.5 | $0.00005 | $0.00265 |
Grade C, and why
refresh-index scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf /tmp/refresh-index How it starts
The opening of the file, as written. The whole thing — 234 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refresh Index
Re-ingest every enabled repository in data/skill-index-resources.json so data/skill-index/{owner}_{repo}.json matches upstream. Classify each repo as updated / unchanged / failed / skipped, verify the catalog rebuilds, then open one data-only PR after explicit confirmation.
This is the inverse of skill-index-updater (that skill adds repos). Keep SKILL.md as the spine and load step detail from references/ so the agent's context budget stays small.
When to Use
- User asks to "refresh the index", "update the indexed skills", "sync the catalog", "re-ingest all repos", or "batch-maintain the skill index"
- A scheduled refresh is due, or a release needs current upstream skill metadata
Do not trigger for: adding a new repository (skill-index-updater), authoring or improving a single skill (skill-creator, skill-auto-improver), opening an upstream PR (skill-upstream-pr), or installing/updating skills on the local machine (asm install, asm update).
Repo Sync Before Edits (mandatory)
Before re-ingesting anything, pull the latest remote branch:
branch="$(git rev-parse --abbrev-ref HEAD)"
dirty=0
if [ -n "$(git status --porcelain)" ]; then
git stash push -u -m "pre-refresh-index: ${branch}"
dirty=1
fi
git fetch origin
git pull --rebase origin "$branch"
if [ "$dirty" -eq 1 ]; then
git stash pop || {
echo "✗ Stash pop failed — recover with: git stash list && git stash show -p stash@{0}"
exit 1
}
fi
If origin is missing or rebase conflicts occur, stop and ask the user before continuing. Never silently overwrite local edits to data/skill-index/ or data/skill-index-resources.json.
Prerequisites
Verify each before any ingest. Stop and tell the user if any fails.
nodeon PATH (command -v node) — Node >= 22 perpackage.jsonenginesnpmon PATH (command -v npm) — required bynpm run preindexasmon PATH (command -v asm) — invoked transitively by the ingester forasm evalghon PATH and authenticated (gh auth status) — required for PR creationgiton PATH and inside the ASM repo working tree (git rev-parse --show-toplevel)- Network access to
github.com(each ingest clones the upstream repo)
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today Changed · -70 lines · -74 tokens per session cfd051024f68
- 4d ago First seen · 304 lines · 119 tokens per session scan C 3f63711df4a9
refresh-index is a skill published in the GitHub repository luongnv89/asm (908 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 2,646 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment.
finishing-a-development-branch
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work.
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code.
receiving-code-review
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation.