refresh-index

refresh-index is a skill for Claude Code, Codex from luongnv89/asm. It costs 45 tokens per session (2,646 once invoked), scanned C, original, MIT.

A workflow for re-ingesting every enabled repository in a skill catalogue. Re-ingesting means fetching the repositories again and rebuilding their catalogue entries.

In plain words
What is it for?
Use it to refresh the catalogue from its existing repository sources, rebuild it for verification, and prepare a single data-only pull request.
Why use it?
It helps check which indexed repositories changed, which stayed the same, and which failed, while requiring confirmation before committing or opening a pull request.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/luongnv89/asm/refresh-index
Any agent
npx skills add luongnv89/asm --skill refresh-index
Clone the repo
git clone --depth 1 https://github.com/luongnv89/asm

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for refresh-index

README.md
[![agentmods](https://agentmods.dev/badge/skills/luongnv89/asm/refresh-index.svg)](https://agentmods.dev/skills/luongnv89/asm/refresh-index)
Your own site
<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>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,646 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured today against content hash cfd051024f68, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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
skills/refresh-index/SKILL.md · 234 lines

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.

  • node on PATH (command -v node) — Node >= 22 per package.json engines
  • npm on PATH (command -v npm) — required by npm run preindex
  • asm on PATH (command -v asm) — invoked transitively by the ingester for asm eval
  • gh on PATH and authenticated (gh auth status) — required for PR creation
  • git on PATH and inside the ASM repo working tree (git rev-parse --show-toplevel)
  • Network access to github.com (each ingest clones the upstream repo)

Read the full file on GitHub · 234 lines

Files

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.

Changes

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.

  1. today Changed · -70 lines · -74 tokens per session cfd051024f68
  2. 4d ago First seen · 304 lines · 119 tokens per session scan C 3f63711df4a9

Subscribe to this mod's changes

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.