openlore-plan-refactor

openlore-plan-refactor is a skill for Claude Code, Codex from clay-good/OpenLore. It costs 46 tokens per session (2,795 once invoked), scanned A, original, MIT.

A refactoring-planning tool that examines a codebase, chooses a high-priority improvement target, and writes a detailed plan to `.openlore/refactor-plan.md`. Refactoring means restructuring code without changing its intended behavior.

In plain words
What is it for?
Use it to assess a refactoring target, estimate which parts may be affected, define an ordered sequence of changes, and attach a test and verification step to each one.
Why use it?
Large code changes can affect many parts of a project and are risky to tackle all at once. The plan breaks the work into small, testable changes without editing the code.

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-plan-refactor
Any agent
npx skills add clay-good/OpenLore --skill openlore-plan-refactor
Clone the repo
git clone --depth 1 https://github.com/clay-good/OpenLore

Made for: Claude Code, Codex.

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 openlore-plan-refactor

README.md
[![agentmods](https://agentmods.dev/badge/skills/clay-good/openlore/openlore-plan-refactor.svg)](https://agentmods.dev/skills/clay-good/openlore/openlore-plan-refactor)
Your own site
<a href="https://agentmods.dev/skills/clay-good/openlore/openlore-plan-refactor"><img src="https://agentmods.dev/badge/skills/clay-good/openlore/openlore-plan-refactor.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,795 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.00046 $0.02795
Opus 5 $0.00023 $0.01398
Sonnet 5 $0.00009 $0.00559
Haiku 4.5 $0.00005 $0.00280

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

Security

Grade A, and why

openlore-plan-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 5d 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-plan-refactor/SKILL.md · 300 lines

How it starts

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

openlore: Plan Refactor

When to use this skill

Trigger this skill whenever the user asks to plan a refactoring on a codebase, with phrasings like:

  • "plan a refactoring of X"
  • "analyze my code and prepare a refactor plan"
  • "generate a refactoring plan"
  • "I want to refactor this function / this file"
  • explicit command /openlore-plan-refactor

This skill modifies no code files. It only produces .openlore/refactor-plan.md. To apply the plan, use the openlore-execute-refactor skill.


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

The plan must be written so that every entry in the change sequence is independently executable and testable.

Each change = one atomic edit → one diff verification → one full test run → ✅ or rollback.

This is not a final gate at the end. Testing is a mandatory sub-step after every single change. The plan must make this cycle explicit and impossible to skip.

For small models (< 13B parameters): each change must touch at most 50 contiguous lines in the source file. If a logical extraction exceeds this limit, split it into smaller sub-changes, each with its own test gate.


User-specified target — shortcut path

If the user has already named a specific file or function to refactor:

  • Skip Steps 2, 3, and 3b (discovery is not needed).
  • Do not skip Steps 3c, 4, 5, 6, and 6b — coverage check and impact analysis are mandatory regardless of how the target was chosen.
  • Jump directly to Step 3c using the user-provided target.

Step 1 — Confirm the project directory

Ask the user which project to analyze, or confirm the current workspace root.


Step 2 — Run static analysis

Call the openlore MCP tool analyze_codebase with {"directory": "$DIRECTORY"}.

If a recent analysis already exists, skip unless the user explicitly requests a fresh run.


Step 3 — Get the refactoring report

Call the openlore MCP tool get_refactor_report with {"directory": "$DIRECTORY"}.

Read the full file on GitHub · 300 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. 5d ago First seen · 300 lines · 46 tokens per session scan A 14620f7ceebf

Subscribe to this mod's changes

openlore-plan-refactor is a skill published in the GitHub repository clay-good/OpenLore (292 stars, last pushed yesterday), licensed MIT. It adds 46 tokens to every session and 2,795 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

architecture-decision-record-creator

Create structured Architecture Decision Records (ADRs) with 7 sections to document architecture decisions with full justification. Use this skill whenever the user has made or needs to make an architecture decision, wants to document why a technical choice was made, is choosing between technologies or patterns, needs…

bookforge-ai/bookforge-skills · 91 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

create-modal

Create declarative modals using the modal library API. Covers modal types (confirm, input, select, form), sections (Text, Buttons, Input, Textarea, Checkbox, List, Combo, When, Custom), rendering with OverlayModal, and keyboard/mouse handling. Use when adding modals or dialogs to the application.

marcus/sidecar · 69 tokens

merge-strategy

Git merge strategies, conflict resolution approaches, merge vs rebase recommendations, and branch integration patterns in sidecar. Covers pull strategy menu, direct merge workflow, squash merge, commit message templates, configurable defaults, and protected branches. Use when working on git merge features or making…

marcus/sidecar · 63 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