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 existential-birds/beagle --skill fowler-refactoringgit clone --depth 1 https://github.com/existential-birds/beagleWrote 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/existential-birds/beagle/fowler-refactoring)<a href="https://agentmods.dev/skills/existential-birds/beagle/fowler-refactoring"><img src="https://agentmods.dev/badge/skills/existential-birds/beagle/fowler-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/existential-birds/beagle/fowler-refactoring"><img src="https://agentmods.dev/badge/skills/existential-birds/beagle/fowler-refactoring.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00016 | $0.01532 |
| Opus 5.5 | $0.00006 | $0.00613 |
| Sonnet 5.5 | $0.00003 | $0.00306 |
| Haiku 4.5 | $0.00002 | $0.00153 |
Grade A, and why
fowler-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 4d 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 — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Fowler Refactoring
Apply the decision rules and small-step transformations in Martin Fowler's Refactoring: Improving the Design of Existing Code, Second Edition, with contributions by Kent Beck (2019). This is a knowledge base for improving existing code, not permission to rewrite a system or alter its behavior; it needs no package, credential, or original PDF at runtime.
When to Use
- "Refactor this without changing behavior."
- "Which refactoring fits this code smell?"
- "Separate calculation from presentation."
- "Improve these functions, data structures, APIs, or classes."
- "Explain Fowler's refactoring mechanics and tradeoffs."
Prerequisites
- For code changes: access to the relevant repository, its instructions, and its existing test/build tooling.
- Establish a passing baseline and tests for the behavior at risk; do not invent a project test command.
- No environment variables, credentials, MCP server, or additional dependencies for these notes.
How to Run
Read this file, then load the relevant chapter by reading its relative path (for example references/ch01-first-example.md).
For implementation, inspect definitions and callers with search_files and read_file, edit with patch or write_file, and invoke the repository's verified test command through terminal after each small transformation.
The chapter files are on-demand detail, not mandatory bulk reading.
Tool names (terminal, read_file, search_files, patch, write_file) denote capabilities — shell execution, file reading, content search, scoped edits, and file writing — and map to the host agent's native equivalents; they are not a required product.
Quick Reference
references/ch01-first-example.md— load the relevant chapter by relative path.search_files— definitions, callers, state writes, and existing tests.read_file— repository instructions, implementation, and test configuration.patch/write_file— scoped implementation and test edits.terminal— established tests, builds, type checks, and diff inspection.
What ships with it
14 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.
- references/ch01-first-example.md 7.5 KB
- references/ch02-principles.md 8.9 KB
- references/ch03-code-smells.md 8.1 KB
- references/ch04-building-tests.md 7.5 KB
- references/ch05-using-the-catalog.md 4.0 KB
- references/ch06-first-refactorings.md 8.4 KB
- references/ch07-encapsulation.md 7.6 KB
- references/ch08-moving-features.md 7.5 KB
- references/ch09-organizing-data.md 6.9 KB
- references/ch10-conditional-logic.md 7.6 KB
- references/ch11-refactoring-apis.md 8.5 KB
- references/ch12-inheritance.md 9.1 KB
- references/decision-guide.md 6.5 KB
- references/glossary.md 7.6 KB
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.
- 4d ago First seen · 93 lines · 16 tokens per session scan A 272180e43076
fowler-refactoring is a skill published in the GitHub repository existential-birds/beagle (91 stars, last pushed 4d ago), licensed Apache-2.0. It adds 16 tokens to every session and 1,532 once invoked, about $0.0001 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-11-26.
fowler-refactoring compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| fowler-refactoringexistential-birds/beagle | Skill | 91 | 4d ago | Apache-2.0 | A | 16 | Claude Code, Codex |
| autoreviewopenclaw/clawhub | Skill | 9.6k | yesterday | MIT | A | 17 | Claude Code, Codex |
| omh-code-reviewrlaope/oh-my-hermes | Skill | 6.2k | today | MIT | A | 18 | Claude Code |
| agent-teams-simplify-and-hardenLeoYeAI/openclaw-master-skills | Skill | 2.2k | 8d ago | MIT | A | 115 | Claude Code, Codex |
| asplos-writing-stylebrycewang-stanford/Awesome-Journal-Skills | Skill | 1.5k | 2d ago | MIT | A | 65 | Claude Code |
| revdiff-planumputun/revdiff | Skill | 974 | 2d ago | MIT | A | 84 | Claude Code |
| re0-mergeLilMGenius/paperthin | Skill | 1.5k | 5d ago | MIT | A | 51 | Claude Code, Codex |