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 agentmods add commands/ciscodevnet/essentials/refactor-file-modulegit clone --depth 1 https://github.com/CiscoDevNet/essentialsWrote 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/commands/ciscodevnet/essentials/refactor-file-module)<a href="https://agentmods.dev/commands/ciscodevnet/essentials/refactor-file-module"><img src="https://agentmods.dev/badge/commands/ciscodevnet/essentials/refactor-file-module.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00000 | $0.00380 |
| Opus 5 | $0.00000 | $0.00190 |
| Sonnet 5 | $0.00000 | $0.00076 |
| Haiku 4.5 | $0.00000 | $0.00038 |
Grade A, and why
refactor-file-module 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 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.
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.
What it actually says
Refactor the given file into a module of the same name.
Example
Take the following commands.py file as an example.
CONSTANT_1 = "Constant 1"
CONSTANT_2 = "Constant 2"
class MyCommand:
pass
class MyOtherCommand:
pass
class YetAnotherCommand:
pass
Classes
- Create a
commandsdirectory. - For each class in the original
commands.pyfile, create a file and place the corresponding class there.
Constants
- Create a
commands/config.pyfile. - Move all constants into the
config.pyfile. Update each file to import the constants from theconfig.pyfile.
init.py
- Create a
commands/__init__.pyfile. - Export the items in this module using
__all__.
The __init__.py file should look like this:
from .config import CONSTANT_1, CONSTANT_2
from .my-command import MyCommand
from .my-other-command import MyOtherCommand
from .yet-another-command import YetAnotherCommand
__all__ = [
"CONSTANT_1",
"CONSTANT_2",
"MyCommand",
"MyOtherCommand",
"YetAnotherCommand",
]
Final file structure
The final file structure should look like this:
commands/ # `commands` module directory, same name as given file
- __init__.py # Init file to expose other items within this module
- config.py # Config file for constants
- my-command.py # For MyCommand
- my-other-command.py # For MyOtherCommand
- yet-another-command.py # For YetAnotherCommand
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.
- today First seen · 65 lines · 0 tokens per session scan A 1ffaa8860033
refactor-file-module is a command published in the GitHub repository CiscoDevNet/essentials (7 stars, last pushed 16d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 380 tokens. 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-04.
Other commands, from other repositories
types
Command "types" from ErisPulse/ErisPulse, covering erispulse.cli.commands.types 模块, 模块概述, 函数列表, issendmethod(name: str, func: any) and ismodulemethod(name: str, func: any).
create
Command "create" from ErisPulse/ErisPulse, covering erispulse.cli.commands.create 模块, 模块概述, 函数列表, cameltosnake(name: str) and toconvertername(name: str).
init
Command "init" from ErisPulse/ErisPulse, covering erispulse.cli.commands.init 模块, 模块概述, 函数列表, validateprojectname(name: str) and 类列表.
install
Command "install" from ErisPulse/ErisPulse, covering erispulse.cli.commands.install 模块, 模块概述, 类列表 and class installcommand(command).
run
Command "run" from ErisPulse/ErisPulse, covering erispulse.cli.commands.run 模块, 模块概述, 类列表, class reloadhandler(filesystemeventhandler) and class runcommand(command).
config
Command "config" from ErisPulse/ErisPulse, covering erispulse.cli.commands.config 模块, 模块概述, 类列表 and class configcommand(command).