freeze

freeze is a skill for Claude Code, Codex from rijuvashisht/Magneto. It costs 0 tokens per session (643 once invoked), scanned A, original, MIT.

An edit lock that restricts file changes to selected folders or file patterns. It records the lock and blocked attempts in a safety file.

In plain words
What is it for?
Use it to allow changes only in specified directories or matching files, then remove the restriction when the task is finished.
Why use it?
It prevents accidental edits to unrelated parts of a codebase during a focused task.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to allow changes only in specified directories or matching files, then remove the restriction when the task is finished.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rijuvashisht/magneto/freeze
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 rijuvashisht/Magneto --skill freeze
Clone the repo
git clone --depth 1 https://github.com/rijuvashisht/Magneto

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 freeze

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/rijuvashisht/magneto/freeze"><img src="https://agentmods.dev/badge/skills/rijuvashisht/magneto/freeze.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 643 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.00000 $0.00643
Opus 5 $0.00000 $0.00321
Sonnet 5 $0.00000 $0.00129
Haiku 4.5 $0.00000 $0.00064

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

Security

Grade A, and why

freeze 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 11d 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.

src/templates/magneto-skills/skills/freeze/SKILL.md · 82 lines

How it starts

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

/freeze — Restrict Edits to One Directory

Role: Edit Lock Inputs: one or more path globs Outputs: updates .magneto/safety.json Audit actions: freeze.activated, freeze.blocked_write


What /freeze Does

Karpathy's Rule 3: "Surgical Changes — touch only what you must." /freeze enforces this mechanically. Once activated, you MUST NOT edit any file outside the frozen glob(s).

This prevents:

  • Drive-by "improvements" to unrelated code
  • Refactoring that wasn't asked for
  • Accidental changes to working systems while debugging something else

Activation

magneto freeze src/auth          # lock edits to src/auth/ and subdirectories
magneto freeze src/auth src/api  # lock edits to multiple directories
magneto freeze '**/*.test.ts'    # lock edits to test files only
magneto unfreeze                 # release the lock
magneto careful status           # show current freeze globs

Integration Contract (for host agents)

Before editing any file, check .magneto/safety.json:

state = read(".magneto/safety.json")
if state["freezeGlobs"]:
    if not any(matches_glob(target_path, g) for g in state["freezeGlobs"]):
        abort(f"Path {target_path} is outside freeze scope: {state['freezeGlobs']}")
        audit("freeze.blocked_write", {"path": target_path})

Magneto provides a glob matcher via magneto safety check-path <path> — exit code 0 means allowed, 1 means blocked.

When to Use

  • Debugging a specific module → magneto freeze src/auth
  • Implementing one feature without scope creep → magneto freeze src/payments
  • Production work where you need maximum discipline → magneto guard src/payments

When NOT to Use

  • Cross-cutting refactors that genuinely need to touch many files
  • New feature scaffolding (freeze AFTER the files exist)

Example

User: /freeze src/auth
Agent: /freeze activated. Edits restricted to:
       ◆ src/auth

User: While you're at it, fix the typo in src/users/README.md
Agent: Blocked. src/users/README.md is outside the freeze scope.
       Options:
       1. Note this for later (mention it in design.md)
       2. `magneto unfreeze`, then fix, then re-freeze
       3. `magneto freeze src/auth src/users` to expand scope

Read the full file on GitHub · 82 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. 11d ago First seen · 82 lines · 0 tokens per session scan A c5ee5cac77f9

Subscribe to this mod's changes

freeze is a skill published in the GitHub repository rijuvashisht/Magneto (6 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 643 tokens. 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.