save-script-to-skill

save-script-to-skill is a skill for Claude Code from eranw2000/claude-maintenance-skills. It costs 165 tokens per session (1,651 once invoked), scanned A, original, MIT.

A workflow that turns a one-off script written during a skill run into a reusable tool inside that skill. It finds candidate scripts from the session record, replaces session-specific values with arguments, and updates the skill to run the tool.

In plain words
What is it for?
Use it after a skill run when a script should become a permanent, repeatable part of that skill.
Why use it?
It prevents the same helper script from being rewritten from scratch every time the skill is used.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; names the AskUserQuestion tool.

Good fit Use it after a skill run when a script should become a permanent, repeatable part of that skill.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/eranw2000/claude-maintenance-skills/save-script-to-skill
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.

Any agent
npx skills add eranw2000/claude-maintenance-skills --skill save-script-to-skill
Clone the repo
git clone --depth 1 https://github.com/eranw2000/claude-maintenance-skills

Made for: Claude Code.

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 save-script-to-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/eranw2000/claude-maintenance-skills/save-script-to-skill/github.svg)](https://agentmods.dev/skills/eranw2000/claude-maintenance-skills/save-script-to-skill)
Your own site
<a href="https://agentmods.dev/skills/eranw2000/claude-maintenance-skills/save-script-to-skill"><img src="https://agentmods.dev/badge/skills/eranw2000/claude-maintenance-skills/save-script-to-skill/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 save-script-to-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/eranw2000/claude-maintenance-skills/save-script-to-skill"><img src="https://agentmods.dev/badge/skills/eranw2000/claude-maintenance-skills/save-script-to-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 165 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,651 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.00165 $0.01651
Opus 5.5 $0.00066 $0.00660
Sonnet 5.5 $0.00033 $0.00330
Haiku 4.5 $0.00016 $0.00165

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

Security

Grade A, and why

save-script-to-skill 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.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/find_session_scripts.py, scripts/test_find_session_scripts.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

save-script-to-skill/SKILL.md · 123 lines

How it starts

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

save-script-to-skill

A skill ran. To finish the job, Claude wrote a script and ran it. Next time the skill runs, Claude would write that script again from scratch. This skill stops that: the script moves into <skill dir>/scripts/, and the skill's SKILL.md says to RUN it.

The end state looks like this: a skill folder with a scripts/ subfolder holding a helper that began as an ad hoc script written during a session, and a SKILL.md that runs it.

Arguments

Both optional. $1 is the skill name (default: the skill invoked last in this session). $2 is the script, as a path or as the number the finder prints (default: ask, unless there is exactly one clear candidate).

Steps

1. Find the skill and the script

Run the finder. It reads the session transcript, not your memory of the conversation:

python3 ~/.claude/skills/save-script-to-skill/scripts/find_session_scripts.py [--skill NAME]

It prints the skill, its directory, and every script written (Write/Edit of a .py, .sh, .js ...) or run inline (heredoc, python3 -c) after that skill was invoked, with how many times each ran and how many runs failed. --show N prints candidate N in full; --json for all fields. Exit 3 means no skill was invoked in this session: ask the user which skill they mean and pass --skill. If the transcript is not found (exit 2), pass --cwd <launch dir> or --transcript <path>.

Pick the script:

  • Skip the project's own code. A file that is part of the repo being worked on (a module, a test, anything tracked by that repo's git) is the WORK, not a helper. The helper is the one that did the skill's job: usually in a scratch or job tmp/ folder, or an inline heredoc.
  • Prefer the LAST version that ran without failing.
  • If more than one real candidate is left, ask the user with AskUserQuestion, one line each.

Stop and say why if:

  • the skill directory is a plugin skill (name:with-colon) or has no SKILL.md you can edit;
  • the script is a one-off tied to this session's data (it only makes sense for one file, one customer, one date). Say so and ask whether the user still wants it.

Read the full file on GitHub · 123 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 First seen · 123 lines · 165 tokens per session scan A 0a15ed481628

Subscribe to this mod's changes

save-script-to-skill is a skill published in the GitHub repository eranw2000/claude-maintenance-skills (8 stars, last pushed 4d ago), licensed MIT. It adds 165 tokens to every session and 1,651 once invoked, about $0.0007 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-24.

Related

save-script-to-skill compared with skills from other repositories

save-script-to-skill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
save-script-to-skilleranw2000/claude-maintenance-skillsSkill84d agoMITA165Claude Code
agents-v2-pylingxling/awesome-skills-cnSkill3291mo agoMITA39Claude Code
analytics-productlingxling/awesome-skills-cnSkill3291mo agoMITA35Claude Code
api-security-best-practiceslingxling/awesome-skills-cnSkill3291mo agoMITA29Claude Code
antigravity-workflowslingxling/awesome-skills-cnSkill3291mo agoMITA41Claude Code
oci-services-expertfrankxai/claude-skills-librarySkill47yesterdayMITA43Claude Code
v-swarmfrankxai/claude-skills-librarySkill47yesterdayMITA141Claude Code