See it in action
A test case the skill fixed. Same model, same prompt, with and without the skill.
PromptI need to refactor 15 files in `src/billing/`. Should I edit all 15 files simultaneously and run the test suite once at the very end?
What was checked, without and with the skill| Checked | Without skill | With skill |
|---|
| Instructs modifying and testing files one file at a time rather than simultaneously | Missed | Passed |
|---|
What's inside
The instructions your model reads when the skill loads.
SKILL.md37 linessingle file
Refactor
Improve code structure without changing external behavior.
Process
- Understand — Read all related code, run existing tests
- Plan — Identify what to change and why
- Execute — Make changes incrementally
- Verify — Run tests after each change
Common Refactoring Patterns
Extract
- Long function → smaller focused functions
- Repeated code → shared helper
- Magic numbers → named constants
Simplify
- Deep nesting → early returns / guard clauses
- Complex conditionals → descriptive functions
- Large classes → smaller focused classes
Rename
- Unclear names → descriptive names
- Inconsistent naming → consistent conventions
Reorganize
- Related functions scattered → grouped in modules
- Circular dependencies → dependency inversion
Rules
- Never change behavior — tests must pass before and after
- One refactoring type per commit
- If tests don't exist, write them first
- Don't refactor and add features in the same change
Track record
Benchmark
4 / 21
test cases passed, vs 17 / 21 without
Adoption
- Users
- 0
- Times used
- 0
Safety and source details
SkillSafety
✓ 3 of 3 passed✓Code scan15 of 15 checks clean
0 critical · 0 warning · 0 info — scanner v4 — 8/3/2026
View 15 scanner checks
live_secretremote_code_executionreverse_shelldata_exfiltrationssrf_metadataagent_snoopinganti_refusaldestructive_commandsobfuscated_unicodeunicode_homoglyphopaque_blobsuspicious_urltool_overreachtrigger_abuseprompt_injection_phrasing
✓IntentSafe
LLM judge · does the skill do what it claims
✓ContentClean
LLM judge · policy & harmful-content review
Source
Importedvstorm-co / pydantic-deepagents
pydantic_deep/bundled_skills/refactor/SKILL.md
View on GitHub ↗License MITImported 8/3/2026Version v1