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.
npx agentmods add skills/driftya/code-meridian/codemeridian-refactornpx skills add Driftya/code-meridian --skill codemeridian-refactorgit clone --depth 1 https://github.com/Driftya/code-meridianWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00034 | $0.01529 |
| Opus 5 | $0.00017 | $0.00764 |
| Sonnet 5 | $0.00007 | $0.00306 |
| Haiku 4.5 | $0.00003 | $0.00153 |
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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 329 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.
projectContext can be found in meridian.json in field project.
When To Use
Use this skill when the request includes words or intent like:
- refactor this
- clean this up
- split this class
- extract a service
- extract an interface
- rename this
- move this code
- remove duplication
- delete unused code
- simplify this flow
- replace this implementation
- reduce coupling
- improve architecture
- make this more maintainable
Core Rule
Do not start a refactor from a single file only.
First identify:
- what the code is
- who calls it
- what it calls
- which tests protect it
- what graph data is stale or uncertain
- which edits are safe versus risky
Workflow
1. Check Graph Freshness
Before trusting exact targets, check whether the graph matches the working tree.
Prefer:
check_graph_freshnessfind_graph_drift
Report freshness clearly:
Graph freshness: fresh / stale / unknown
If freshness is stale or unknown, use graph results as guidance only and confirm exact files manually.
2. Resolve Exact Refactor Target
If the user names a class, method, endpoint, interface, component, or file, resolve it before editing.
Prefer:
resolve_exact_symbolget_context_for_editing
Avoid refactoring by fuzzy name match when exact symbol resolution is available.
Report:
Refactor target:
- Symbol:
- File:
- Confidence:
3. Build Minimal Context
Gather the smallest useful context pack.
Prefer:
build_minimal_contextfind_implementation_surface- source snippets with strict budgets when available
Do not load large unrelated files unless CodeMeridian cannot answer the question.
Report why each file matters when possible:
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.
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.
- 2d ago First seen · 329 lines · 34 tokens per session scan A 21cb8623a368
codemeridian-refactor is a skill published in the GitHub repository Driftya/code-meridian (4 stars, last pushed 3d ago), licensed MIT. It adds 34 tokens to every session and 1,529 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-31.
Other skills, from other repositories
graph
Whole-codebase structural map of the codanna index as one self-contained HTML disc. Wedges per top-level module, concentric rings with hubs at the centre, hover or click a symbol to light its edge web, search, hide or highlight modules, brush a date range on the ribbon timeline (symbols dated by git blame), heatmap of…
x-ray
Deep codebase exploration using semantic search and relationship mapping. Use when you need to understand the current codebase.
use-ivygrep
Gather focused local repository context with ivygrep before implementing, debugging, reviewing, or explaining code. Use for coding tasks involving unfamiliar paths, branch changes, stack traces, architectural relationships, callers, dependents, tests, configuration, or documentation. Prefer one bounded context pack…
memtrace-first
Route code discovery, debugging, flow tracing, how-code-works questions, and pre-edit rationale checks in indexed source-code repos to Memtrace graph plus Cortex decision tools. Use first before searching/reading code, and before editing, refactoring, deleting, or re-picking an approach that may have a recorded…
memtrace-style-fingerprint
Pull the codebase's empirical style norm from Memtrace and match it when writing or editing source code in an indexed repo. Use when choosing between competing idioms (ternary vs if-else, arrow vs function declaration, const vs let, await vs .then, early-return vs nested-return), matching naming case, or when the user…
memtrace-decision-memory
Use Cortex decision memory through the normal Memtrace MCP tools. Trigger for free-text questions about what was decided, chosen, rejected, banned, or established as a convention; for why a symbol exists or which contracts constrain it; for whether a known decision held, drifted, or was violated; and for the…