Borrowing it
Nothing to install: this file belongs to gitkb/meta. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/gitkb/meta/main/.claude/skills/before-refactor/SKILL.mdgit clone --depth 1 https://github.com/gitkb/metaWrote 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/gitkb/meta/before-refactor)<a href="https://agentmods.dev/skills/gitkb/meta/before-refactor"><img src="https://agentmods.dev/badge/skills/gitkb/meta/before-refactor/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/gitkb/meta/before-refactor"><img src="https://agentmods.dev/badge/skills/gitkb/meta/before-refactor.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.00019 | $0.00778 |
| Opus 5.5 | $0.00008 | $0.00311 |
| Sonnet 5.5 | $0.00004 | $0.00156 |
| Haiku 4.5 | $0.00002 | $0.00078 |
Grade A, and why
before-refactor 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 15d 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 — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/before-refactor
Safety check before modifying a function, method, or type. Shows all call sites that would need updates if you change the signature, plus impact analysis.
When to Use
- Before changing a function signature
- Before renaming a public symbol
- Before modifying an interface or type's fields
- Before any change that could break callers
Steps
-
Find the symbol and its location:
kb_symbols with search: "<symbol-name>" -
Get all callers (who would break if you change the signature):
kb_callers with symbol: "<full-symbol-id>" -
Get callees (what this function depends on):
kb_callees with symbol: "<full-symbol-id>" -
Run impact analysis on the file:
kb_impact with file_path: "<file-path>" -
Check for related documents:
kb_symbol_refs with symbol: "<full-symbol-id>"
Output Format
## Refactor Safety Check: `symbolName()`
### Location
- File: src/services/auth.ts:45-67
- Kind: function
- Signature: `async function symbolName(param: Type): Promise<Result>`
### Direct Callers (5)
These will break if you change the signature:
- src/routes/auth.ts:45 -> handleRequest()
- src/routes/auth.ts:89 -> handleRefresh()
- src/middleware/auth.ts:22 -> authenticate()
- tests/auth.test.ts:15 -> testLogin()
- tests/integration.test.ts:88 -> testFullFlow()
### Transitive Impact
- 12 symbols transitively depend on this
- Affects 4 files
### What This Calls
- src/db/users.ts::findUser()
- src/crypto/tokens.ts::generateToken()
### Related Documents
- tasks/my-task (Related Task)
### Recommendation
[LOW|MEDIUM|HIGH] impact refactor:
- LOW: 0-2 callers, all in same module
- MEDIUM: 3-10 callers, multiple modules
- HIGH: 10+ callers or public API surface
Files that need updates if signature changes:
1. src/routes/auth.ts
2. src/middleware/auth.ts
3. tests/auth.test.ts
4. tests/integration.test.ts
Example
Input: /before-refactor login
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.
- 15d ago First seen · 130 lines · 19 tokens per session scan A dcd8f4dcd0e5
before-refactor is a skill published in the GitHub repository gitkb/meta (20 stars, last pushed 8d ago), licensed MIT. It adds 19 tokens to every session and 778 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-15.
before-refactor compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| before-refactorgitkb/meta | Skill | 20 | 8d ago | MIT | A | 19 | Claude Code |
| sync-bridgechromium/chromium | Skill | 25k | today | BSD-3-Clause | A | 109 | Claude Code, Codex |
| sync-model-processorchromium/chromium | Skill | 25k | today | BSD-3-Clause | A | 98 | Claude Code, Codex |
| adversarial-revieweremdash-cms/emdash | Skill | 15k | today | MIT | A | 72 | Claude Code, Codex |
| gsd-ns-reviewopen-gsd/gsd-core | Skill | 12k | today | MIT | A | 16 | Claude Code |
| gitnexushashgraph-online/awesome-codex-plugins | Skill | 1.6k | 2d ago | Apache-2.0 | A | 58 | Codex |
| issuejeremylongshore/tons-of-skills-marketplace | Skill | 3.0k | today | MIT | A | 115 | Claude Code |