refactor-specialist

refactor-specialist is an agent for Claude Code from eco-ansible-content/agentic-workflows. It costs 17 tokens per session (1,856 once invoked), scanned A, original, MIT.

An agent for reviewing completed Windows Ansible modules and extracting duplicated PowerShell code into shared utilities. PowerShell is a scripting language commonly used to automate Windows.

In plain words
What is it for?
Use it at milestones such as every ten modules to scan for repeated patterns, create reusable utilities, update modules, and improve the collection’s structure.
Why use it?
It reduces repeated logic and helps keep related modules consistent as the collection grows. It pauses parallel work during the review to avoid conflicts while shared code is being changed.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the agentic-workflows plugin — 2 skills, 22 agents, 1 plugin shipped together

Good fit Use it at milestones such as every ten modules to scan for repeated patterns, create reusable utilities, update modules, and improve the collection’s structure.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/eco-ansible-content/agentic-workflows/windows-collection-swarm-refactor-specialist
Install

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.

Clone the repo
git clone --depth 1 https://github.com/eco-ansible-content/agentic-workflows

Made for: Claude Code.

Or install agentic-workflows, the plugin that ships this one along with the rest of its 2 skills, 22 agents, 1 plugin.

Wrote 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.

agentmods badge for refactor-specialist

README.md
[![agentmods](https://agentmods.dev/badge/agents/eco-ansible-content/agentic-workflows/windows-collection-swarm-refactor-specialist/github.svg)](https://agentmods.dev/agents/eco-ansible-content/agentic-workflows/windows-collection-swarm-refactor-specialist)
Your own site
<a href="https://agentmods.dev/agents/eco-ansible-content/agentic-workflows/windows-collection-swarm-refactor-specialist"><img src="https://agentmods.dev/badge/agents/eco-ansible-content/agentic-workflows/windows-collection-swarm-refactor-specialist/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.

agentmods 80×15 button for refactor-specialist

Your own site · 80×15
<a href="https://agentmods.dev/agents/eco-ansible-content/agentic-workflows/windows-collection-swarm-refactor-specialist"><img src="https://agentmods.dev/badge/agents/eco-ansible-content/agentic-workflows/windows-collection-swarm-refactor-specialist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,856 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.01856
Opus 5 $0.00009 $0.00928
Sonnet 5 $0.00003 $0.00371
Haiku 4.5 $0.00002 $0.00186

Measured 10d ago against content hash f6e0e958834d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

refactor-specialist 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 10d 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.

claude/agents/windows-collection-swarm-refactor-specialist.md · 240 lines

How it starts

The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Architectural Refactor Specialist

You are the Refactor Specialist for Windows Ansible Collections. Your mission is to eliminate duplication and promote code reuse by extracting common patterns into shared utilities.

Core Directives

Decennial Audit

  • MANDATE: Execute every 10 completed modules
  • Trigger: Lead Architect will invoke you at module milestones (10, 20, 30, etc.)
  • Requirement: PAUSE ALL PARALLEL EXECUTION during refactoring
  • This prevents integration conflicts and ensures clean abstractions

Audit Process

When invoked, perform a comprehensive analysis:

  1. Scan all completed modules in plugins/modules/
  2. Identify duplicated PowerShell logic across modules
  3. Detect common patterns that can be abstracted
  4. Prioritize extractions by impact (most duplicated first)

Common Patterns to Extract

Pattern 1: JSON Response Handling
  • Symptom: Multiple modules parse JSON output from commands
  • Solution: Create plugins/module_utils/json_handler.psm1
  • Functions: ConvertFrom-JsonSafe, Test-JsonValid
Pattern 2: SID Lookups
  • Symptom: Multiple modules convert usernames to SIDs
  • Solution: Create plugins/module_utils/sid_lookup.psm1
  • Functions: Get-UserSid, Get-GroupSid, ConvertTo-Sid
Pattern 3: Service Management
  • Symptom: Multiple modules manage Windows services
  • Solution: Create plugins/module_utils/service_helper.psm1
  • Functions: Get-ServiceState, Set-ServiceState, Test-ServiceExists
Pattern 4: Registry Operations
  • Symptom: Multiple modules read/write registry keys
  • Solution: Create plugins/module_utils/registry_helper.psm1
  • Functions: Get-RegistryValue, Set-RegistryValue, Test-RegistryPath
Pattern 5: Error Formatting
  • Symptom: Multiple modules format error messages similarly
  • Solution: Create plugins/module_utils/error_handler.psm1
  • Functions: Format-AnsibleError, Get-DetailedError

Read the full file on GitHub · 240 lines

Changes

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.

  1. 10d ago First seen · 240 lines · 17 tokens per session scan A f6e0e958834d

Subscribe to this mod's changes

refactor-specialist is an agent published in the GitHub repository eco-ansible-content/agentic-workflows (2 stars, last pushed 17d ago), licensed MIT. It adds 17 tokens to every session and 1,856 once invoked, about $0.0001 per session on Opus 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-08-31.

Related

Other agents, from other repositories

reviewer

Read-only reviewer for an SDD implementation — checks that the change satisfies the acceptance criteria it claims (stage 1) and meets quality/convention/edge-case bars (stage 2). Use after a task (or the whole feature) reaches GREEN, before it's considered done. It reads the diff and the upstream artifacts and reports…

genkovich/sdd · 81 tokens

atomic-auditor

Final gate for a finished implementation. Dispatched exactly once after the implement-review loop goes green, never per iteration. Never touches the repo; its one write is the audit report into the task scratchpad. Audits the delivered work as a whole: cumulative spec compliance, cross-iteration coherence…

damusix/atomic-claude · 169 tokens

bt6-pr-auditor

Reviews one pull request in a BT6 codebase for correctness, research integrity, security, verification quality, and merge readiness.

elder-plinius/T3MP3ST · 32 tokens

Reviewer

Mandatory fast reviewer: validates every agent delegation output before acceptance. Checks acceptance criteria, file partitions, regressions, type safety, security basics.

monkilabs/opencastle · 30 tokens

security-auditor

Use this agent when reviewing local code changes or pull requests to identify security vulnerabilities and risks. This agent should be invoked proactively after completing security-sensitive changes or before merging any PR.

NeoLabHQ/context-engineering-kit · 40 tokens

reviewer-architecture

Use this agent for architecture-focused code review. Evaluates implementation against the plan's architectural decisions, checks separation of concerns, pattern consistency, and proper use of existing abstractions. Spawned in parallel with other reviewers when a review task is dispatched.

HirogaKatageri/hirokata · 56 tokens