automation-refactor

automation-refactor is a skill for Claude Code from MacroMan5/AutomationHelper_plugins. It costs 88 tokens per session (8,242 once invoked), scanned A, original, MIT.

A skill for improving existing workflows in Power Automate, n8n, Make, Zapier, and similar automation tools while keeping their intended behavior.

In plain words
What is it for?
It is for reviewing workflow JSON, applying platform-specific improvements, preserving functionality, and producing a refactored workflow with a change report.
Why use it?
It helps make workflows faster, more reliable, easier to maintain, and closer to platform best practices.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents; names the AskUserQuestion tool.

Part of the automation-helper plugin — 6 skills, 5 agents shipped together

Good fit It is for reviewing workflow JSON, applying platform-specific improvements, preserving functionality, and producing a refactored workflow with a change report.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/macroman5/automationhelper_plugins/automation-refactor
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.

Any agent
npx skills add MacroMan5/AutomationHelper_plugins --skill automation-refactor
Clone the repo
git clone --depth 1 https://github.com/MacroMan5/AutomationHelper_plugins

Made for: Claude Code.

Or install automation-helper, the plugin that ships this one along with the rest of its 6 skills, 5 agents.

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 automation-refactor

README.md
[![agentmods](https://agentmods.dev/badge/skills/macroman5/automationhelper_plugins/automation-refactor.svg)](https://agentmods.dev/skills/macroman5/automationhelper_plugins/automation-refactor)
Your own site
<a href="https://agentmods.dev/skills/macroman5/automationhelper_plugins/automation-refactor"><img src="https://agentmods.dev/badge/skills/macroman5/automationhelper_plugins/automation-refactor.svg" alt="Measured on agentmods" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,242 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.00088 $0.08242
Opus 5 $0.00044 $0.04121
Sonnet 5 $0.00018 $0.01648
Haiku 4.5 $0.00009 $0.00824

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

Security

Grade A, and why

automation-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 7d 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/skills/automation-refactor/SKILL.md · 1,181 lines

How it starts

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

Automation Refactor

Expert system for refactoring and optimizing automation workflows across multiple platforms while maintaining functional equivalence and improving code quality.

Supported Platforms

  • Power Automate (Microsoft)
  • n8n (Open-source automation)
  • Make (formerly Integromat)
  • Zapier
  • Other JSON-based workflow platforms

Purpose

This skill provides comprehensive workflow refactoring by:

  1. Analyzing existing workflow JSON for improvement opportunities
  2. Applying platform-specific best practices from documentation (Docs/ directory)
  3. Optimizing performance, reliability, and maintainability
  4. Generating refactored JSON that maintains original functionality
  5. Providing detailed report of changes and additional optimization suggestions
  6. Ensuring no hallucinations by strictly referencing platform documentation

Common Pitfalls to AVOID

❌ CRITICAL ERROR #1: Assuming Data Structures (Most Common!)

The Mistake:

// You see a variable used in a filter
"where": "@contains(item(), 'keyword')"

// And you ASSUME it's an array of objects, so you write:
"value": "@items('Loop')?['PropertyName']"  // ← WRONG!

The Reality:

// item() without property → Array of STRINGS!
// Correct usage:
"value": "@items('Loop')"  // ← RIGHT!

How to Avoid:

  1. ALWAYS look at the filter's where clause first
  2. item() = array of primitives (strings/numbers)
  3. item()?['Prop'] = array of objects
  4. Ask user if unsure - never guess!

❌ ERROR #2: Not Researching Documentation

The Mistake: Guessing connector outputs, property names, or behaviors

How to Avoid:

  1. Search local Docs/ directory FIRST
  2. Use WebSearch for official docs if not found locally
  3. Ask user to confirm if documentation is unclear
  4. Reference specific documentation sections in your output

❌ ERROR #3: Overconfidence Without Validation

The Mistake: Providing fixes without verifying against actual data structures

Read the full file on GitHub · 1,181 lines

Files

What ships with it

1 file 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.

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. 7d ago First seen · 1,181 lines · 88 tokens per session scan A ffd404f682ec

Subscribe to this mod's changes

automation-refactor is a skill published in the GitHub repository MacroMan5/AutomationHelper_plugins (3 stars, last pushed 10mo ago), licensed MIT. It adds 88 tokens to every session and 8,242 once invoked, about $0.0004 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 skills, from other repositories

workspace-knowledge

Answer questions about the whole workspace — which repo owns or handles something, where a feature/endpoint/event lives, or how concerns span repos. Reads registry.json as the ownership index, routes the question to the owning repo, and hands off to that repo's specialist for detail. Use for cross-repo and 'which…

architonixlabs/RepoOrch · 91 tokens

release-notes

Generate and publish concise, evidence-based notes in the body of the latest existing GitHub Release. Use only when the user explicitly invokes $release-notes or explicitly asks to update the latest existing GitHub Release body. Do not invoke for general release planning, changelog, tag, or version tasks.

kenryu42/cc-safety-net · 65 tokens

add-teams

Adds Microsoft Teams connector to a Power Apps code app. Use when sending Teams messages, posting to channels, or integrating with Teams chat.

microsoft/power-platform-skills · 31 tokens

sys-configure

Configure Claude Octopus — redirects to /octo:setup interactive wizard.

nyldn/claude-octopus · 18 tokens

recipe-front-review

Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, then applies user-approved React corrections.

shinpr/claude-code-workflows · 29 tokens

37signals-way

Build lean, opinionated products using the 37signals philosophy from "Getting Real", "Rework", and "Shape Up". Use when the user mentions "Getting Real", "Rework", "Shape Up", "37signals", "Basecamp method", "six-week cycles", "fixed time variable scope", "appetite vs estimates", "betting table", "breadboarding", "fat…

wondelai/skills · 177 tokens