magnitude: Skill for Claude Code

.agents/skills/refine/SKILL.md

refine is a skill for Claude Code, Codex from magnitudedev/magnitude. It costs 13 tokens per session (1,162 once invoked), scanned A, original, Apache-2.0.

A review process for improving code after changes have been made. It first gathers the relevant code, plans, design documents, and architecture before checking correctness and quality.

In plain words
What is it for?
Use it to inspect a completed change, compare it with the intended plan, find quality or correctness issues, and guide further improvements.
Why use it?
It reduces the risk of accepting code that works superficially but conflicts with the project's requirements or design. The process supports repeated review and refinement.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is magnitudedev/magnitude's own configuration. It tells Claude Code and Codex how to work on magnitude itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything magnitude configures →

About the project

Magnitude is an open-source inference server, meaning software that runs language models and answers requests on a user's own computer. It profiles available hardware, recommends suitable local models, and connects them to coding agents for private and offline use on macOS, Linux, or Windows through WSL. Its catalogue entries help agents set up and use Magnitude.

magnitudedev/magnitude · 4,229 stars · on GitHub · magnitude.dev

Reuse

Borrowing it

Nothing to install: this file belongs to magnitudedev/magnitude. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/magnitudedev/magnitude/main/.agents/skills/refine/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/magnitudedev/magnitude

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 refine

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/magnitudedev/magnitude/refine"><img src="https://agentmods.dev/badge/skills/magnitudedev/magnitude/refine.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,162 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00013 $0.01162
Opus 5 $0.00006 $0.00581
Sonnet 5 $0.00003 $0.00232
Haiku 4.5 $0.00001 $0.00116

Measured 10d ago against content hash b492acc46905, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

refine 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 10d 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.

.agents/skills/refine/SKILL.md · 117 lines

How it starts

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

Overview

This skill documents a generic process for iterative code refinement. It is intented to be used when code changes are in place, but their correctness and quality is not yet guaranteed.

The objective of this skill's use is to prescribe an iterative loop that can be followed to ensure correctness and optimize for code quality.

Phase 1: Grounding

Before reviewing the code, it is important to understand the changes, the context behind them, and any requirements or constraints they are intended to follow.

If you are the agent which made these changes, you may already have some of this context, however you still may be missing some.

Gather the following information:

  • The actual code changes, staged and unstaged (use git diff and/or read files directly as appropriate)
  • Any plan the changes are based on
  • Any relevant design docs
  • Related code and architecture

Use the code changes to inform what other code and design docs you need to read to get the full picture.

Plan documents

Plan documents represent some point-in-time intended delta. Consider that a plan may prescribe changes that were adapted in-flight. The plan may not serve as an up-to-date source of truth for what was meant to be implemented, and may be missing information or contain outdated information. The plan should serve as one piece of evidence in your understanding of the changes being undergone and what they may or may not be doing correctly, rather than some ultimate source of truth.

Design documents

Design documents serve as a semantic basis for the intented project state. These documents, however, may not be fully up to date. Relevant design documents should be read, but their content should be treated as evidence rather than ultimate truth.

Use findings from the code changes and design documents to identify related code - code that touches or integrates with the changes, as well as code which follows similar patterns or is architectually related. This will give you a better understanding of whether the current code is following established practices, whether there are duplicated patterns, or whether architectural changes or new abstractions may be necessary.

Read the full file on GitHub · 117 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. 10d ago First seen · 117 lines · 13 tokens per session scan A b492acc46905

Subscribe to this mod's changes

refine is a skill published in the GitHub repository magnitudedev/magnitude (4,229 stars, last pushed today), licensed Apache-2.0. It adds 13 tokens to every session and 1,162 once invoked, about $0.0001 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.