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 skills add Sounio-lang/sounio --skill safe-refactoringgit clone --depth 1 https://github.com/Sounio-lang/sounioWrote 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/sounio-lang/sounio/safe-refactoring)<a href="https://agentmods.dev/skills/sounio-lang/sounio/safe-refactoring"><img src="https://agentmods.dev/badge/skills/sounio-lang/sounio/safe-refactoring/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.
<a href="https://agentmods.dev/skills/sounio-lang/sounio/safe-refactoring"><img src="https://agentmods.dev/badge/skills/sounio-lang/sounio/safe-refactoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.1 | $0.00034 | $0.00901 |
| Opus 5 | $0.00017 | $0.00451 |
| Sonnet 5 | $0.00007 | $0.00180 |
| Haiku 4.5 | $0.00003 | $0.00090 |
Grade A, and why
safe-refactoring 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Safe Refactoring
When to use this skill
Use this skill when you need to:
- Restructure code while preserving its external behavior
- Improve readability, maintainability, or performance without breaking functionality
- Migrate between API versions or library dependencies
- Split large functions or modules into smaller, cohesive units
- Rename identifiers consistently across a codebase
When NOT to use this skill
- For adding new features (use the appropriate development skill)
- For fixing bugs that are not related to code structure
- For performance optimizations that change algorithmic complexity
Inputs required
- The code to be refactored (file paths, repository location)
- The specific refactoring operation (rename, extract function, split module, etc.)
- Any invariants that must be preserved (e.g., “function X must always return a positive integer”)
- Existing test suite that can be used to validate correctness
Workflow
-
Understand the code and its dependencies
- Read the relevant source files and identify data flows
- Map callers and callees of the functions/modules being changed
- Note any implicit invariants (e.g., global state, side effects)
-
Plan the refactoring
- Choose the refactoring steps and their order
- Determine which tests will be affected and need updating
- Decide whether to use automated tools (e.g., semantic grep, AST transformers)
-
Execute the changes
- Apply one refactoring step at a time
- After each step, run the test suite to ensure nothing broke
- Use version control to create checkpoints (commits) for easy rollback
-
Validate the result
- Run the full test suite (unit, integration, regression)
- If available, run static analysis tools to detect new warnings
- Verify that the refactored code meets the original invariants
-
Update documentation
- Adjust comments, READMEs, and API references that refer to the changed code
- Ensure any examples in documentation still work
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.
- 9d ago First seen · 119 lines · 34 tokens per session scan A 635ef8dfe380
safe-refactoring is a skill published in the GitHub repository Sounio-lang/sounio (6 stars, last pushed today), licensed Apache-2.0. It adds 34 tokens to every session and 901 once invoked, about $0.0002 per session on Opus 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-08-31.
Other skills, from other repositories
migrate-oxlint
Guide for migrating a project from ESLint to Oxlint. Use when asked to migrate, convert, or switch a JavaScript/TypeScript project's linter from ESLint to Oxlint.
vera-language
Write programs in the Vera programming language. Use when asked to write, edit, debug, or review Vera code (.vera files). Vera is a statically typed, purely functional language with algebraic effects, mandatory contracts, and typed slot references (@T.n) instead of variable names.
handle-regression
Protocol for detecting, isolating, and fixing regressions in test262 pass count. Use when a test run shows fewer passes than expected.
regression-triage
Bulk-classify a list of test262 pass→other transitions from a CI run. Distinct from handle-regression (single fix) and analyze-regression (diff two runs). Use after a merge wave when the sharded run reports N regressions and you need to bucket them by root cause and decide which are false positives.
scratch-cleanup
Sweep leaked ad-hoc dev scratch files (check-.ts, debug-.ts, test--debug.ts, tests/probe-.test.ts, etc.) into .tmp/ so git status stays clean and token cost per tool call stays low.
analyze-wat
Compile a source file to WAT and analyze the output for codegen inefficiencies. Use after a codegen change to verify the output is clean, when investigating performance issues, or when creating optimization issues from real compiler output.