RedHat Code Refactor Engine

v1.0.0

Refactor code safely without changing behavior.

0· 38·0 current·0 all-time
byMauricio Z. Filho@mzfshark

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for mzfshark/axodus-refactor-engine.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "RedHat Code Refactor Engine" (mzfshark/axodus-refactor-engine) from ClawHub.
Skill page: https://clawhub.ai/mzfshark/axodus-refactor-engine
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Canonical install target

openclaw skills install mzfshark/axodus-refactor-engine

ClawHub CLI

Package manager switcher

npx clawhub@latest install axodus-refactor-engine
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (refactor code safely) align with the content: the SKILL.md contains step-by-step refactoring instructions, validation guidance, and expected outputs. Nothing requested (no env vars, no binaries, no installs) is disproportionate to this purpose.
Instruction Scope
Runtime instructions are limited to code-refactoring workflows: run tests, add characterization tests, make small commits/patches, and re-run validation. The instructions imply access to the target repository/files and test runner (expected for a refactor tool) and do not ask for unrelated system files, credentials, or external endpoints.
Install Mechanism
There is no install spec and no code files — the skill is instruction-only, so nothing is written to disk or downloaded during install.
Credentials
The skill declares no environment variables, credentials, or config paths. The example mentions running 'pnpm test', but that is an example command (not a declared requirement) and is proportional to the task of validating refactors.
Persistence & Privilege
The skill does not request 'always: true' or any persistent privileges, nor does it modify other skills' configs. Autonomous invocation is allowed by default on the platform but is not combined here with broad access.
Assessment
This skill is a text-only refactoring procedure and appears coherent. Before enabling it, note that it will need access to your codebase and test tooling to run the validation steps — review and run any proposed diffs/commits yourself, ensure tests exist or add characterization tests, and confirm the project has the appropriate test runner (the example shows pnpm). Because the skill can be invoked by the agent, avoid granting it credentials or network access it doesn't need, and require human review of actual code changes or merges. If you need higher assurance, run the agent in a sandboxed environment and require pull-request-based workflows so changes are reviewed before merging.

Like a lobster shell, security has layers — review code before you run it.

latestvk970k6bk4qjbgrjgkxh038v8rx85ftxq
38downloads
0stars
1versions
Updated 20h ago
v1.0.0
MIT-0

SKILL: refactor-engine

Purpose

Improve existing code structure (readability, modularity, maintainability) while preserving behavior.

When to Use

  • Complexity is growing and changes are becoming risky.
  • Duplicate logic appears across modules.
  • Tests exist (or can be added) to protect behavior.

Inputs

  • target_area (required, string): file(s)/module(s) to refactor.
  • refactor_goal (required, string): what improves (e.g., reduce duplication, isolate side effects).
  • constraints (optional, string[]): behavior must not change; performance bounds; compatibility.
  • validation_commands (optional, string[]): tests/build/lint to run before/after.

Steps

  1. Establish a baseline:
    • run existing tests (or add a minimal characterization test)
  2. Identify refactor seam(s):
    • extract pure functions
    • isolate I/O
    • reduce global state
  3. Apply refactor in small commits/patches:
    • one transformation per step
    • keep diffs readable
  4. Re-run validations after each meaningful transformation.
  5. If behavior changes, revert that change and adjust approach.

Validation

  • Behavior is preserved (tests pass; outputs unchanged for known cases).
  • Public interfaces remain stable (or are versioned/migrated explicitly).
  • Complexity decreases measurably (smaller functions, fewer branches, less duplication).

Output

  • refactor_summary
  • files_changed
  • behavior_guards (tests added/used)
  • validation_results

Safety Rules

  • Do not refactor without a behavior guard (tests or a deterministic reproduction).
  • Avoid “big bang” rewrites.
  • Do not change public APIs unless explicitly required.

Example

Goal: “Extract request validation from controller into validators/ and add unit tests.” Validation: pnpm test after each extraction step.

Comments

Loading comments...