openlore-execute-refactor

A step-by-step workflow for applying an approved refactoring plan stored in .openlore/refactor-plan.md. Refactoring means changing code structure without changing its intended behavior.

In plain words
What is it for?
Use it to execute planned refactors one at a time, review each diff, run the plan's test gate, and mark successful changes in the plan.
Why use it?
It limits each change, checks the result immediately, and stops after repeated test failures instead of leaving a sequence of unverified edits.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/clay-good/openlore/openlore-execute-refactor
Any agent
npx skills add clay-good/OpenLore --skill openlore-execute-refactor
Clone the repo
git clone --depth 1 https://github.com/clay-good/OpenLore

Made for: Claude Code, Codex.

Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,338 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00041 $0.02338
Opus 5 $0.00020 $0.01169
Sonnet 5 $0.00008 $0.00468
Haiku 4.5 $0.00004 $0.00234

Measured 3d ago against content hash 3df7e43532c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

openlore-execute-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 3d 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.

examples/mistral-vibe/skills/openlore-execute-refactor/SKILL.md · 244 lines

How it starts

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

openlore: Execute Refactor

When to use this skill

Trigger this skill when the user asks to apply a refactoring plan, with phrasings like:

  • "apply the refactor plan"
  • "execute the planned refactoring"
  • explicit command /openlore-execute-refactor

Prerequisite: the openlore-plan-refactor skill must have been run and the plan confirmed. The file .openlore/refactor-plan.md must exist.


⚠️ Fundamental principle — each change is a complete mini-development

Each change in the plan is treated as an independent, self-contained development unit. The cycle for every single change, without exception:

READ plan entry
  → EDIT  (targeted tool, ≤ 50 lines touched)
  → DIFF  (git diff --stat + git diff — verify no lost code)
  → TEST  (run the test gate from the plan)
     ├─ green → mark ✅ in plan, move to next change
     └─ red   → git checkout HEAD -- <file>
                diagnose the failure
                retry from EDIT (attempt 2, then 3)
                if still red after 3 attempts → STOP (see circuit-breaker below)

Never accumulate broken state. Never skip the test gate. Never batch two changes before testing.

Circuit-breaker — 3 failed attempts

If a change fails its test gate 3 times in a row, stop immediately and report:

"Change N (<label>) failed after 3 attempts. The working tree has been restored to the last green state. Options: a) Split this change into smaller sub-changes (≤ 50 lines each) and update the plan b) Return to planning (/openlore-plan-refactor) to redesign this step c) Skip this change and continue — note the acceptance criteria may not be fully met"

Do not attempt a 4th retry without explicit user instruction.


Step 1 — Read the plan

Read .openlore/refactor-plan.md from the project directory.

If the file does not exist, stop immediately:

"No refactor plan found at .openlore/refactor-plan.md. Please run /openlore-plan-refactor first."

Extract and display a summary:

  • Target function, file, and line range
  • Strategy and risk score
  • Number of changes planned
  • Test command
  • Acceptance criteria

Read the full file on GitHub · 244 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. 3d ago First seen · 244 lines · 41 tokens per session scan A 3df7e43532c7

Subscribe to this mod's changes

openlore-execute-refactor is a skill published in the GitHub repository clay-good/OpenLore (290 stars, last pushed 3d ago), licensed MIT. It adds 41 tokens to every session and 2,338 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

campus-fyp-architecture

Activate when a student asks for help architecting, scoping, or documenting a university Final Year Project (FYP), software capstone, or research-linked undergraduate thesis project — trigger phrasings include "help me design the architecture for my final year project", "what tech stack should I use for my FYP", "how…

ieeecsopen/mcp-cs · 160 tokens

software-architect

Software architecture engineering consultancy skill. Analyzes overall application structure, recommends sustainable approaches, enforces architectural consistency, and documents decisions for future sessions. Use this skill whenever the user asks about system design, architecture decisions, feature integration…

eligapris/software-architect · 171 tokens

autoprompt

Explicit-only useful-first orchestration. Invoke /autoprompt to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Never infer invocation from ordinary requests. Never resume from leftover artifacts without an explicit resume instruction.

Spielewoy/autoprompt-skill · 56 tokens

autoprompt

Explicit-only useful-first orchestration. Invoke /autoprompt to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Never infer invocation from ordinary requests. Never resume from leftover artifacts without an explicit resume instruction.

Spielewoy/autoprompt-skill · 56 tokens

ap-fresh-verifier

L4 blind fresh verifier - independently checks a candidate roadmap or plan against the exact mission and repository; APPROVE/REJECT, default-FAIL.

Spielewoy/autoprompt-skill · 36 tokens

agenticx-query-data-source

Use when the user asks about verifiable quantitative facts (stock prices, financial indicators, macro data, company registry, academic metrics, legal statutes) that must come from a live data source rather than training memory.

DemonDamon/AgenticX · 49 tokens