script-reuse

script-reuse is a skill for Claude Code, Codex from wefio/NodeMemoryGraph. It costs 35 tokens per session (1,794 once invoked), scanned A, original, MIT.

A guide for writing reliable one-off scripts and reusing existing helpers in a code repository. It covers command-line inputs, rejecting missing or empty data, checking results, and recording where outputs came from.

In plain words
What is it for?
Use it for quick scripts, ad-hoc data analysis, and small probes of a codebase. It helps add input flags, fail safely, validate calculations, and include output provenance.
Why use it?
It prevents throwaway scripts from silently producing incorrect numbers or duplicating code that already exists. It also makes each run repeatable without editing the source first.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { writeJsonAtomic } from "../tools/parts/fs.ts";.

Good fit Use it for quick scripts, ad-hoc data analysis, and small probes of a codebase. It helps add input flags, fail safely, validate calculations, and include output provenance.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/wefio/NodeMemoryGraph
agentmods
npx agentmods add skills/wefio/nodememorygraph/script-reuse

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 script-reuse

README.md
[![agentmods](https://agentmods.dev/badge/skills/wefio/nodememorygraph/script-reuse/github.svg)](https://agentmods.dev/skills/wefio/nodememorygraph/script-reuse)
Your own site
<a href="https://agentmods.dev/skills/wefio/nodememorygraph/script-reuse"><img src="https://agentmods.dev/badge/skills/wefio/nodememorygraph/script-reuse/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for script-reuse

Your own site · 80×15
<a href="https://agentmods.dev/skills/wefio/nodememorygraph/script-reuse"><img src="https://agentmods.dev/badge/skills/wefio/nodememorygraph/script-reuse.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,794 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00035 $0.01794
Opus 5.5 $0.00014 $0.00718
Sonnet 5.5 $0.00007 $0.00359
Haiku 4.5 $0.00003 $0.00179

Measured 1mo ago against content hash f299e3dba830, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

script-reuse scanned grade A with 0 findings 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 1mo ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/script-reuse/SKILL.md · 153 lines

How it starts

The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Write the one-off script, and write it right

中文 · Terms used

A one-off script is the normal answer to a one-off question. Write it. Nothing here is meant to talk you out of that. Two things are governed instead:

  • do not write the second copy of a part that already exists;
  • do not ship a script that quietly produces a wrong number — the number gets quoted long after the script is deleted.

These boundaries also apply when a script is retained for others to rerun. Before adding a helper or orchestration block, search the relevant code and parts shelf for its responsibility, not just its proposed name. Import an existing implementation when its contract fits. The shelf is a discovery aid, not a required dependency or an exhaustive inventory. A local helper is fine for its first consumer; actual reuse, not anticipated reuse, justifies extraction.

What makes it right

In the order these bite:

  1. One command line, no editing. Inputs come from flags, not from constants you edit before each run. node:util already has parseArgs; do not write one.
  2. Refuse to run on missing input. Missing flag, missing file, empty dataset → throw. A run over zero rows must not print a number.
  3. Assert something about the result. Counts add up, values are finite, parts sum to the whole. One if (...) throw is enough; it is the only thing that separates "measured" from "ran".
  4. Say what you measured in the output. The script is throwaway, its output is not. Write the input path, row count, and timestamp next to the number, so the number can still be interpreted after the script is deleted.
  5. Fail loudly and non-zero. Never catch {}, never process.exit(0) after a failure, never ?? 0 to paper over a missing value on a measurement path.
import { readFileSync } from "node:fs";
import { parseArgs } from "node:util";

import { writeJsonAtomic } from "../tools/parts/fs.ts";
import { mean } from "../tools/parts/stats.ts";

const { values } = parseArgs({
  options: { input: { type: "string" }, out: { type: "string" } },
});
if (!values.input || !values.out) throw new Error("usage: --input <file> --out <file>");

const rows = JSON.parse(readFileSync(values.input, "utf8")) as number[];
if (rows.length === 0) throw new Error(`${values.input} has no rows`);
if (!rows.every(Number.isFinite)) throw new Error(`${values.input} has a non-finite value`);

writeJsonAtomic(values.out, {
  input: values.input,
  rows: rows.length,
  measuredAt: new Date().toISOString(),
  mean: mean(rows),
});

Read the full file on GitHub · 153 lines

Files

What ships with it

2 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. 1mo ago Changed · +38 lines · -27 tokens per session f299e3dba830
  2. 1mo ago Changed · +4 lines dccb2eaa48b2
  3. 2mo ago First seen · 111 lines · 62 tokens per session scan A 8d076d59a082

Subscribe to this mod's changes

script-reuse is a skill published in the GitHub repository wefio/NodeMemoryGraph (0 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 1,794 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-10.

Related

script-reuse compared with skills from other repositories

script-reuse next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
script-reusewefio/NodeMemoryGraphSkill0yesterdayMITA35Claude Code, Codex
test-runnerPrismer-AI/PrismerCloudSkill1.4k1mo agoMITA59Claude Code
skills-constitutionjiabaobei/skills-constitutionSkill23619d agoMITA119Claude Code
bhivedArtKeyAi/bhived-mcpSkill3515d agoApache-2.0A96Claude Code
systematic-debuggingHezaoHezao/poirotSkill2624mo agoMITA16Claude Code
simplify-codeHezaoHezao/poirotSkill2624mo agoMITA15Claude Code
skill-authoringHezaoHezao/poirotSkill2624mo agoMITA17Claude Code