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 agents/muhiminosim/code-refactoring-skill/genericgit clone --depth 1 https://github.com/MuhiminOsim/code-refactoring-skillWhat 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.00900 |
| Opus 5 | $0.00000 | $0.00450 |
| Sonnet 5 | $0.00000 | $0.00180 |
| Haiku 4.5 | $0.00000 | $0.00090 |
Grade A, and why
generic scanned grade A with 1 finding 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 yesterday.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -o PROMPT.md \ How it starts
The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Setup: Any Agent or CLI
If your tool accepts a system prompt, custom instructions, or a rules file — this skill works with it.
The Universal Pattern
Every agent has one of these mechanisms:
1. System prompt / instructions field
Paste the contents of PROMPT.md into whatever your tool calls its "system prompt", "instructions", "custom instructions", "rules", or "persona".
2. Rules / context file in the project
Many tools automatically load markdown files from your project:
| Tool | File to create |
|---|---|
| Cursor | .cursor/rules/refactor.mdc |
| Copilot | .github/copilot-instructions.md |
| Continue | .continuerules |
| Windsurf | .windsurfrules |
| Zed | .rules |
| Aider | CONVENTIONS.md |
| Any tool with auto-load | Check your tool's docs for the filename |
In all cases, the content is the same — paste or symlink PROMPT.md:
# Download once
curl -o PROMPT.md \
https://raw.githubusercontent.com/MuhiminOsim/code-refactoring-skill/main/PROMPT.md
# Then copy to the right location for your tool
cp PROMPT.md .github/copilot-instructions.md # Copilot
cp PROMPT.md .cursor/rules/refactor.mdc # Cursor
cp PROMPT.md .windsurfrules # Windsurf
cp PROMPT.md .continuerules # Continue
cp PROMPT.md CONVENTIONS.md # Aider
3. CLI flag
Many CLI tools accept a system prompt as a flag:
# Generic pattern
your-ai-cli --system-prompt "$(cat PROMPT.md)" "refactor src/orders.py"
# llm (Simon Willison's llm)
llm -s "$(cat PROMPT.md)" "refactor this function"
# sgpt / shell_gpt
sgpt --role refactor "extract the discount logic"
# Gemini CLI
gemini --system-instruction "$(cat PROMPT.md)" "refactor src/orders.ts"
# Amazon Q CLI
q chat --context "$(cat PROMPT.md)"
4. API call
If you're calling an LLM API directly:
# Any OpenAI-compatible API
response = client.chat.completions.create(
model="your-model",
messages=[
{"role": "system", "content": open("PROMPT.md").read()},
{"role": "user", "content": "Refactor the processOrder function"}
]
)
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.
- yesterday First seen · 121 lines · 0 tokens per session scan A f67958e28a8c
generic is an agent published in the GitHub repository MuhiminOsim/code-refactoring-skill (5 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 900 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.
AVM Owner Triage
Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.
Ultimate Transparent Thinking Beast Mode
Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.
code-reviewer
Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.