codemeridian-refactor

codemeridian-refactor is a skill for Codex from Driftya/code-meridian. It costs 34 tokens per session (2,330 once invoked), scanned A, original, MIT.

A safer planning process for changing existing code with CodeMeridian, a tool that maps relationships between code symbols and files. It checks callers, dependencies, tests, duplicate code, and architecture risks before edits begin.

In plain words
What is it for?
Use it to plan refactors such as splitting classes, extracting services, removing duplication, simplifying flows, or reducing coupling.
Why use it?
It reduces the chance that a rename, move, deletion, or cleanup silently breaks other parts of the project. It also checks whether the relationship map matches the current working files.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to plan refactors such as splitting classes, extracting services, removing duplication, simplifying flows, or reducing coupling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/driftya/code-meridian/codemeridian-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 Driftya/code-meridian --skill codemeridian-refactor
Clone the repo
git clone --depth 1 https://github.com/Driftya/code-meridian

Made for: 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 codemeridian-refactor

README.md
[![agentmods](https://agentmods.dev/badge/skills/driftya/code-meridian/codemeridian-refactor/github.svg)](https://agentmods.dev/skills/driftya/code-meridian/codemeridian-refactor)
Your own site
<a href="https://agentmods.dev/skills/driftya/code-meridian/codemeridian-refactor"><img src="https://agentmods.dev/badge/skills/driftya/code-meridian/codemeridian-refactor/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 codemeridian-refactor

Your own site · 80×15
<a href="https://agentmods.dev/skills/driftya/code-meridian/codemeridian-refactor"><img src="https://agentmods.dev/badge/skills/driftya/code-meridian/codemeridian-refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,330 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.00034 $0.02330
Opus 5.5 $0.00014 $0.00932
Sonnet 5.5 $0.00007 $0.00466
Haiku 4.5 $0.00003 $0.00233

Measured 1mo ago against content hash b1e91510d9a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codemeridian-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 1mo 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.

docs/agent-capabilities/skills/codemeridian-refactor/SKILL.md · 357 lines

How it starts

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

CodeMeridian Refactor Skill

Use this skill when working in a repository indexed by CodeMeridian and the user asks to refactor, rename, split, extract, move, simplify, deduplicate, delete, or replace code.

The goal is to make refactoring safer by using graph context before changing files.

Target Scope

Read get_project_profile(projectContext, targetPath?) before selecting refactor tools. Markdown/text targets use document review; callable impact, test, and architecture checks each require published evidence for their own semantics and scope. Inspect per-step applicability and omitted optional steps. An unavailable check is not a clean result. When coverage is unknown, retain bounded advisory/source context and state the gap; do not automatically index, ingest, install dependencies, or run scripts to make the route ready.

Resolve each supplied file/directory from its own location, including external paths. Find its Git/worktree or configured solution root and the nearest applicable ancestor meridian.json (project), stopping at the owning root; nested configs can define distinct index roots. Honor explicit user/index-invocation context. Current-repository/global/environment defaults do not prove external ownership. Missing config makes solution (.sln/.slnx), workspace, package and folder names candidates requiring a bounded known-file/symbol graph lookup. Report unresolved scope instead of guessing.

Keep target -> index root -> project context and freshness; use paths relative to that root and returned canonical IDs. Build-project/framework scope is distinct from repository context. Start new paths at their nearest existing parent. Keep relevant unindexed external source as labeled evidence. Read supplied external context without expanding edit/build/index scope, and discover through ancestors rather than scanning sibling repositories.

Before extracting, renaming or changing a shared API, inspect find_cross_project_dependencies for relevant contexts and resolve producer/consumer endpoints separately. Check exact connections, impact and test shields. Preserve installed package version/framework and source status: verified source edges support normal traversal; current-source associations identify potential consumers and require compatibility consideration, not a claim about the installed implementation. Ambiguous, missing and pending links are unresolved risk, not permission to delete or proof of no consumers.

Read the full file on GitHub · 357 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. 1mo ago Changed · +1 lines b1e91510d9a9
  2. 2mo ago Changed · +16 lines 10f1e25f14e7
  3. 2mo ago Changed · +11 lines e8e746e181e0
  4. 3mo ago First seen · 329 lines · 34 tokens per session scan A 21cb8623a368

Subscribe to this mod's changes

codemeridian-refactor is a skill published in the GitHub repository Driftya/code-meridian (5 stars, last pushed 7d ago), licensed MIT. It adds 34 tokens to every session and 2,330 once invoked, about $0.0001 per session on Opus 5.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

codemeridian-refactor compared with skills from other repositories

codemeridian-refactor next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codemeridian-refactorDriftya/code-meridianSkill57d agoMITA34Codex
threadsysevol-ai/CodeNibSkill112todayApache-2.0A69Claude Code
memtrace-style-fingerprintsyncable-dev/memtrace-publicSkill515todaynoneA111Claude Code
memtrace-refactoring-guidesyncable-dev/memtrace-publicSkill515todaynoneA100Claude Code
memtrace-code-reviewsyncable-dev/memtrace-publicSkill515todaynoneA110Claude Code
memtrace-qualitysyncable-dev/memtrace-publicSkill515todaynoneA84Claude Code
graphbartolli/codannaSkill76513d agoApache-2.0A131Claude Code