migrate_clinerules

A project-file conversion command for changing an old Cline/MCP configuration file into Claude Code's CLAUDE.md format. Cline was an earlier coding-agent tool, and CLAUDE.md stores instructions for Claude Code in a project.

In plain words
What is it for?
Importing .clinerules/project.md or another specified legacy file into CLAUDE.md, while checking whether a CLAUDE.md already exists.
Why use it?
It avoids manually moving project instructions between two file formats while keeping the author's written content. It also removes outdated Cline and MCP-specific material.

Command

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 commands/blendsdk/claude-codeops/migrate_clinerules
Clone the repo
git clone --depth 1 https://github.com/blendsdk/claude-codeops
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,169 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.00059 $0.01169
Opus 5 $0.00030 $0.00584
Sonnet 5 $0.00012 $0.00234
Haiku 4.5 $0.00006 $0.00117

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

Security

Grade A, and why

migrate_clinerules 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.

commands/migrate_clinerules.md · 79 lines

How it starts

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

migrate_clinerules — convert a legacy .clinerules/project.md into CLAUDE.md

Translate a project's old codeops-mcp .clinerules/project.md (the Cline/MCP era format) into the lean Claude Code CLAUDE.md. This is a format translation that preserves the user's hand-authored content — it is not a fresh scan. For a from-scratch scan, use /analyze_project instead.

Target source is $ARGUMENTS if provided, otherwise ./.clinerules/project.md.

Step 1 — Locate and read the source (read-only)

  • Resolve the source file: $ARGUMENTS, else ./.clinerules/project.md. If neither exists, stop and tell the user there is nothing to migrate (suggest /analyze_project to generate a fresh CLAUDE.md instead).
  • Read the source in full. Also check whether a CLAUDE.md already exists at the project root.

Step 2 — Map sections (preserve user content verbatim)

Translate the old structure into the new CLAUDE.md template (see /analyze_project for the canonical template). Carry hand-authored prose across verbatim — never paraphrase the user's conventions, special rules, or env notes.

Old .clinerules/project.md section New CLAUDE.md section
Project Overview (Name, Description, Type) ## Overview
Toolchain (Language, Framework, Package Manager, Test) ## Toolchain
Commands (Build / Test / Verify / Clean) ## Commands
Project Structure (layout, source & test locations) ## Project structure
Import & Module Conventions + Coding Conventions ## Conventions (merge the two)
Git & Commit Conventions ## Git conventions
Environment & Dependencies ## Special rules (or its own short section)
Special Rules (Project-Specific) ## Special rules (append, verbatim)

Step 3 — Strip the obsolete Cline/MCP cruft

These sections existed only for Cline + the old MCP and must not be carried over:

  • 🚨 "MANDATORY: Load CodeOps Rules" / get_rule(...) block — drop entirely. Skills now auto-load; there is nothing to pre-load.
  • "Terminal Delay" section, and the clear && sleep [n] && prefix on every command — strip the prefix so each command is the bare runnable command (e.g. clear && sleep 3 && yarn buildyarn build). That prefix was a VS Code/Cline terminal workaround.
  • "Agent Automation" (scripts/agent.sh start/finished) — drop; Cline Act Mode only.
  • "Cross-References" to old rule files (make_plan.md, code.md, testing.md, agents.md, git-commands.md, requirements.md, roadmap.md) — drop; those are skills now.
  • Roadmap directive prose tied to get_rule("roadmap") — drop the MCP phrasing; the roadmap skill is invoked directly.
  • Empty template placeholders ([fill in], unchecked [ ] boxes, untouched examples) — omit rather than copy. Keep only fields the user actually filled in. Mark genuine unknowns as TODO: so they are visible.

Read the full file on GitHub · 79 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. 2d ago First seen · 79 lines · 59 tokens per session scan A 754a528958eb

Subscribe to this mod's changes

migrate_clinerules is a command published in the GitHub repository blendsdk/claude-codeops (4 stars, last pushed 1mo ago), licensed MIT. It adds 59 tokens to every session and 1,169 once invoked, about $0.0003 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.