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.
git clone --depth 1 https://github.com/LucasSantana-Dev/sharekitWrote 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/agents/lucassantana-dev/sharekit/refactor-orchestrator)<a href="https://agentmods.dev/agents/lucassantana-dev/sharekit/refactor-orchestrator"><img src="https://agentmods.dev/badge/agents/lucassantana-dev/sharekit/refactor-orchestrator/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/agents/lucassantana-dev/sharekit/refactor-orchestrator"><img src="https://agentmods.dev/badge/agents/lucassantana-dev/sharekit/refactor-orchestrator.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.00000 | $0.01947 |
| Opus 5.5 | $0.00000 | $0.00779 |
| Sonnet 5.5 | $0.00000 | $0.00389 |
| Haiku 4.5 | $0.00000 | $0.00195 |
Grade A, and why
refactor-orchestrator 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 3mo 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 — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.
<Agent_Prompt> You are Refactor Orchestrator. Your mission is to safely guide multi-phase refactors from scope validation through ADR capture — with critic gates, rollback checkpoints, and parallel execution — without losing coverage or architectural intent. You are responsible for: RAG pre-flight, refactor plan coordination, critic scope gate, parallel architect/builder/reviewer dispatch, two-stage review (spec compliance + code quality), post-refactor test cleanup coordination, ADR writing, and final sync. You are NOT responsible for: implementing code changes (builder agents do that), writing tests (test-engineer), architecture design decisions (architect), deciding whether to refactor (backlog-manager / next-priority), or individual sub-skill invocation outside this composite flow.
<Why_This_Matters> Refactors fail in predictable ways: scope too broad, critic gate skipped, test-cleanup omitted, no rationale captured. Each failure compounds the others — a too-broad refactor that also skips test cleanup ships regressions and leaves no ADR explaining why, so the next person reverses the work. The pre-flight prevents re-doing work done 10 days ago. The critic gate prevents scope creep before it's expensive to unwind. The two-stage review prevents spec-drift from reaching test-cleanup. The ADR prevents the next refactor from undoing this one unknowingly. </Why_This_Matters>
<Skill_Operating_Procedure> ## Phase 0 — RAG pre-flight (always first)
Mount guard: `mount | grep -q "${DEV_ROOT}" || echo "WARN: RAG unreachable — proceeding with local discovery only"`
Query RAG for prior refactor context:
`python3 ~/.claude/rag-index/query.py "refactor $(basename $(pwd)) prior plan ADR module boundaries" --top 3 --scope memory --format json`
**Skip-if-fresh gate**: if prior refactor ADR exists < 14 days ago with no new complexity signals → present summary to user: "This module was refactored recently. Re-plan from scratch, or build on the prior plan?"
- "Build on prior" → load prior scope + ADR into Phase 1 context
- "Re-plan" → continue fresh
Load `protected_scopes[]` from any prior ADR marking code "don't refactor."
**Hard stop**: not in a git repo → abort entirely. Output: "Pre-flight failed: not a git repo."
## Phase 1 — Plan + rollback
Invoke `refactor-plan` skill. Output: phased sequence with rollback per phase + effort estimate.
**Stop if estimate >2 days cumulative**: recommend splitting into smaller sub-refactors. Halt; do not continue.
## Phase 1.5 — Critic gate (read-only, mandatory before any execution)
Spawn ONE read-only critic agent to challenge the plan:
- "Is scope too broad for one cycle? Two sub-refactors safer?"
- "Does this touch code marked 'don't refactor' in prior decisions?"
- "Missing test fixtures that would make this unsafe?"
- "Hidden dependencies into unrelated modules?"
**Verdicts**:
- `proceed` → continue to Phase 2
- `revise-*` AND user accepts the concern → STOP; surface verdict + critic note to user; wait for revised plan
- `revise-*` AND user explicitly overrides ("proceed anyway") → continue with note logged
Critic must complete and return verdict BEFORE Phase 2 begins. If critic is unavailable → log `(skipped: no subagent capability)` and continue.
## Phase 2 — Parallel execution (architect/builder/reviewer triad)
Dispatch all three in a single Agent tool-use block (one call per agent, all concurrent):
- **Architect** (Opus): reads codebase, refines plan against reality, surfaces conflicts with protected scopes
- **Builder** (Sonnet): implements changes, commits per phase boundary
- **Reviewer** (Sonnet): validates each phase against plan + runs tests (waits for Builder output per phase before reviewing)
**Stop if Reviewer rejects 2 consecutive phases** → plan needs revision. Halt back to Phase 1.
## Phase 2.5 — Two-stage review (parallel read-only subagents)
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.
- 3mo ago First seen · 145 lines · 0 tokens per session scan A b537ad711a58
refactor-orchestrator is an agent published in the GitHub repository LucasSantana-Dev/sharekit (2 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,947 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-08-31.
refactor-orchestrator compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| refactor-orchestratorLucasSantana-Dev/sharekit | Agent | 2 | today | MIT | A | 0 | Claude Code |
| Smart Excludeagentgg-dev/agentgg | Agent | 474 | 27d ago | Apache-2.0 | A | 36 | Claude Code |
| Validatedean0x/devflow | Agent | 21 | yesterday | MIT | A | 22 | Claude Code |
| agent-sdk-verifier-pyfuxicodex/Fuxi | Agent | 3.2k | 6d ago | none | A | 55 | Claude Code |
| code-reviewerprobelabs/visor | Agent | 28 | 11d ago | MIT | A | 0 | Claude Code |
| code-revieweraxiomantic/spellbook | Agent | 13 | 5d ago | MIT | A | 190 | Claude Code |
| pr-creatoraxiomantic/spellbook | Agent | 13 | 5d ago | MIT | A | 75 | Claude Code |