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.
git clone --depth 1 https://github.com/mhmdreza-rafiei/agent-toolsWrote 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.
[](https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/migration)<a href="https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/migration"><img src="https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/migration/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.
<a href="https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/migration"><img src="https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00864 | $0.00864 |
| Opus 5 | $0.00432 | $0.00432 |
| Sonnet 5 | $0.00173 | $0.00173 |
| Haiku 4.5 | $0.00086 | $0.00086 |
Grade A, and why
migration 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 8d 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 — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code migration (structure & location)
Structural changes: move/rename files or folders, relocate symbols to another module, split/merge files, or rename exports used across the repo.
Not database schema migrations (use project-specific migration tools for those).
Skip when the task is chat-only or a tiny edit with no path or module boundary change.
Before you change anything
- Inventory — Search for the old path, file name, folder name, and public symbols (imports,
require, dynamic imports, string paths, URLs in config). - Plan — List what will move, what will reference it, and config/docs that must change (build, test, CI, Docker, path aliases,
package.jsonexports, OpenAPI paths, etc.). - Checkpoint — If the repo has git, suggest a local commit (per git-workflow) before large moves so rollback is one command away.
- Prefer
git mvwhen using git — preserves history and makes the rename obvious in diffs.
Execution order (safeguards)
Do not delete or drop the old location until the migration is verified.
1. Add destination (new file/folder or new exports) — copy or move content
2. Update every consumer (imports, configs, docs, tests, assets)
3. Verify (grep, build, tests, run app if relevant)
4. Remove old only when nothing legitimate still points at it
- Move/rename: Update references first or in the same change set as the move; never leave the tree broken overnight if avoidable.
- Extract code to another file: New module must compile and callers must use it; then remove duplicated code from the source file.
- Rename symbol: Update definitions, imports, re-exports, tests, and docs; grep old name before deleting anything.
Removing the old version
| Situation | Rule |
|---|---|
| Old file after move | Delete only after zero stale path references and verification passes |
| Leftover duplicate logic | Remove duplicate after behavior is unchanged (diff mentally or test) |
| Empty directory | Remove after children moved and tooling does not require the path |
| Public API rename | Ask if a compat shim is needed (re-export / deprecated alias) unless user asked for a clean break |
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.
- 8d ago First seen · 74 lines · 864 tokens per session scan A 33448e360ae0
migration is a cursor rule published in the GitHub repository mhmdreza-rafiei/agent-tools (5 stars, last pushed 24d ago), licensed MIT. It adds 864 tokens to every session, about $0.0043 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-09-03.
Other cursor rules, from other repositories
git-commit-attribution
Git commits must use the human developer identity only; never Cursor Agent co-authorship.
iris
GitHub operations specialist — branches, pull requests, issues, releases, tags. Called by zeus after review. Never pushes or merges without explicit human approval. Integrates with VS Code GitHub Pull Requests extension.
rebase-only-merged-agents
When rebasing after a merge, only rebase the agents whose branches you just merged. Do not rebase agents that are still running.
git-workflow
Rules for git operations, commit strategy, and GitHub CLI usage.
skill-management
The Clade capability renderer delivers skills to .cursor/skills/ /, commands to .cursor/commands/, and agent instructions to .cursor/agents/. These are distinct from .cursor/rules/ instruction delivery and from the native Task tool. Keep source/hash ownership for generated artifacts and preserve consumer-owned or…
release-checklist
What to update with each code change or version release.