asm
CLAUDE.md949 starsChanged 6 months agoMITView on GitHub
agent-skill-manager (asm) — a TypeScript CLI plus ink/React TUI that manages Agent Skills installed for Claude Code, Codex, Gemini, and OpenClaw. npm test is vitest run src/, and that argument is a substring filter on the test path, not a directory — website-src/src/__tests__/ matches it too, so npm run test:site is a subset of npm test, not a separate leg. Only tests/e2e/ is excluded. Measured timings and evidence: docs/AGENT_ENVIRONMENT.md. npm run test:coverage is vitest run --coverage src/ with @vitest/coverage-v8 (5.x,…
- Installs packages
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- website-src/llms.txtllms.txt
- find-me-skillsSkill
- hello-worldSkill
- refresh-indexSkill
- skill-auto-improverSkill
- skill-creatorSkill
- skill-index-updaterSkill
- skill-install-improvedSkill
- skill-shortenerSkill
- skill-upstream-prSkill
The file
We split this CLAUDE.md into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 81
Do not remove that setup — without it the suite writes the real user config.
- Very specific: line 84
Never commit dist/ or node_modules/.
- Distinctive: line 86
Never delete or rewrite untracked scratch files at the repo root.
- Very specific: line 95
Run npm run typecheck after a series of edits.
- Distinctive: line 100
Keep changes minimal and scoped to the task.
- Distinctive: line 104
Never re-read files you just wrote or edited.
- Distinctive: line 105
Never re-run commands to "verify" unless the outcome was uncertain.
- Distinctive: line 106
Don't echo back large blocks of code or file contents unless asked.
- Distinctive: line 109
If a task needs 1 tool call, don't use 3.
- Distinctive: line 110
Do not summarize what you just did unless the result is ambiguous or you need additional input.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
agent-skill-manager (asm) — a TypeScript CLI plus ink/React TUI that manages
Agent Skills installed for Claude Code, Codex, Gemini, and OpenClaw.
Critical commands
npm install # postinstall no-ops when CI or ASM_SKIP_POSTINSTALL is set
npm run build # tsx scripts/build.ts -> dist/ (gitignored)
CI=true npm test # unit suite — the command of record
npm run test:coverage # v8 coverage for src/ — measurement only, no fail gate
npm run typecheck # tsc --noEmit
npm run lint # eslint over src/
npm run lint:site # eslint over website-src/src
npm run test:e2e # tests/e2e/ — NOT covered by `npm test`
npm start # run the TUI from sourcenpm test is vitest run src/, and that argument is a substring filter on the
test path, not a directory — website-src/src/__tests__/ matches it too, so
npm run test:site is a subset of npm test, not a separate leg. Only
tests/e2e/ is excluded. Measured timings and evidence: docs/AGENT_ENVIRONMENT.md.
npm run test:coverage is vitest run --coverage src/ with
@vitest/coverage-v8 (5.x, matching current vitest). It reports line and
branch percentages for src/ product files only (test files excluded). There
is no coverage threshold and no CI fail gate — measurement before
improvement (F-TEST-003 / #438). Vitest 5 remaps V8 coverage via AST, so the
denominators below are not comparable to the vitest-4 #438 baseline; keep
coverage.include.
Coverage baseline (2026-09-12, src/, v8, CI=true npm run test:coverage,
2800 tests):
- Lines: 82.69% (8740/10569)
- Branches: 73.74% (5393/7313)
src/commands/ measures 63.74% lines (#673): src/cli-*.test.ts dispatches
runCLI() in-process via src/cli-test-harness.ts instead of spawning tsx
children that v8 could not
attribute (the layer previously read 10.53%). Still subprocess-bound by
design: the runInlineTs readLine tests (stdin pipes need a real child), the
cross-process borrow-lock test under asm get --path, and one bundle export
no-overwrite case whose process.exit sits inside a catch that would
swallow the in-process sentinel. toggle.ts (disable/enable) stays low
because nothing exercises it — a real gap, not an attribution artifact.
M3's coverage target is bound to max(60%, baseline + 20pp):
- Lines:
max(60%, 102.69%)= 100% (formula saturates at 100) - Branches:
max(60%, 93.74%)= 93.74%
Node and npm must satisfy package.json engines — node ">=22 <27", npm
">=9".
Architecture map
bin/agent-skill-manager.ts— entry point: args go tosrc/cli.ts, none to the TUI.src/cli.ts— argv dispatcher routing to thecmd*handler modules insrc/commands/; all output throughsrc/formatter.ts.src/index.tsx+src/views/— the ink/React TUI.src/*.ts— one module per domain (scanner, installer, auditor, skill-index, …), each with its*.test.tsbeside it.data/skill-index/— committed per-repo index JSON; generated, never hand-edited.website-src/— site source;website/— its published output.scripts/— build, preindex, catalog generation.- Detail:
docs/ARCHITECTURE.md,docs/DEVELOPMENT.md.
Hard rules
- YOU MUST NOT run
npm run preindex,npm run build:website, ornpm run refresh:repo-bundlesas a probe. They rewrite tracked files underdata/skill-index/andwebsite/. Run them only when regenerating the catalog is the point of the change, then review the diff. - IMPORTANT:
npm run preindexalso rewrites the developer's real~/.config/agent-skill-manager/skill-index/— a mutation no git diff shows. - Unit tests sandbox user state.
src/test-setup.ts(vitestsetupFiles) setsHOME,USERPROFILE, andASM_CONFIG_DIRto a temp dir.getConfigDir()insrc/config.tsreadsASM_CONFIG_DIR(fallback~/.config/agent-skill-manager). Do not remove that setup — without it the suite writes the real user config. - IMPORTANT:
CI=truedoes not itself isolate the suite; hermeticity is the env override + lazygetConfigDir(), not theCIflag. - Never commit
dist/ornode_modules/. Most ofwebsite/is gitignored, but its*-stats.jsonandrobots.txtare tracked — commit those only on a deliberate regeneration. - Never delete or rewrite untracked scratch files at the repo root; other sessions own them.
- Conventional Commits; branch from
mainas<type>/<issue>-<description>; PR intomain.
Workflow preferences
- Iterate with the narrowest runner —
npx vitest run src/<module>.test.ts— and runCI=true npm testonly before pushing. - Run
npm run typecheckafter a series of edits; do not wait for the commit hook. - Change
src/<name>.tsand itssrc/<name>.test.tstogether. - Install both hook stages; a plain
pre-commit installsilently skips pre-push:pre-commit install --hook-type pre-commit --hook-type pre-push. - Prettier runs on commit — do not hand-format markdown, TS, or JSON to match it.
- Keep changes minimal and scoped to the task; do not opportunistically refactor.
Token Efficiency
- Never re-read files you just wrote or edited. You know the contents.
- Never re-run commands to "verify" unless the outcome was uncertain.
- Don't echo back large blocks of code or file contents unless asked.
- Batch related edits into single operations. Don't make 5 edits when 1 handles it.
- Skip confirmations like "I'll continue..." Just do it.
- If a task needs 1 tool call, don't use 3. Plan before acting.
- Do not summarize what you just did unless the result is ambiguous or you need additional input.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

