n8n-pilot: Command for Claude Code

.codex/commands/migration-router.md

migration-router is a command for Claude Code, Codex from AI-agents-incubator/n8n-pilot. It costs 0 tokens per session (151 once invoked), scanned A, original, MIT.

A first-launch routing command for projects that may need migration. It reads a migration context file and chooses a legacy, upgrade, or new-project startup path.

In plain words
What is it for?
Use it to route legacy migrations, upgrades, or fresh installations and return the selected next command as JSON.
Why use it?
It lets one startup process handle different project histories without changing the existing Claude adapter logic. It also keeps migration records and removes the marker only after success.

Command for Claude CodeCodex

Written for Codex and Claude Code: installed under .codex/, but also a Claude Code command (commands/*.md). Also seen: mentions Codex.

This is AI-agents-incubator/n8n-pilot's own configuration. It tells Claude Code and Codex how to work on n8n-pilot 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 n8n-pilot configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AI-agents-incubator/n8n-pilot. 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/AI-agents-incubator/n8n-pilot/main/.codex/commands/migration-router.md
Clone the repo
git clone --depth 1 https://github.com/AI-agents-incubator/n8n-pilot

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 migration-router

README.md
[![agentmods](https://agentmods.dev/badge/commands/ai-agents-incubator/n8n-pilot/migration-router/github.svg)](https://agentmods.dev/commands/ai-agents-incubator/n8n-pilot/migration-router)
Your own site
<a href="https://agentmods.dev/commands/ai-agents-incubator/n8n-pilot/migration-router"><img src="https://agentmods.dev/badge/commands/ai-agents-incubator/n8n-pilot/migration-router/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 migration-router

Your own site · 80×15
<a href="https://agentmods.dev/commands/ai-agents-incubator/n8n-pilot/migration-router"><img src="https://agentmods.dev/badge/commands/ai-agents-incubator/n8n-pilot/migration-router.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 151 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.00151
Opus 5 $0.00000 $0.00076
Sonnet 5 $0.00000 $0.00030
Haiku 4.5 $0.00000 $0.00015

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

Security

Grade A, and why

migration-router 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 5d 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.

.codex/commands/migration-router.md · 21 lines

What it actually says

Codex Migration Router

Goal:

  • Route first-launch migration scenarios without changing Claude adapter logic.

Executable entry:

  • bash .codex/commands/migration-router.sh

Procedure:

  1. Check .claude/migration-context.json.
  2. If absent: continue standard start path.
  3. If present, route by mode:
    • legacy -> execute legacy migration workflow equivalent.
    • upgrade -> execute upgrade workflow equivalent.
    • new -> continue standard start for a freshly installed project.
  4. Preserve migration logs and safety checks.
  5. Remove migration marker only after successful completion.

Output contract:

  • JSON with fields: has_migration_context, mode, route, next_command.
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. 5d ago First seen · 21 lines · 0 tokens per session scan A dcd918855d51

Subscribe to this mod's changes

migration-router is a command published in the GitHub repository AI-agents-incubator/n8n-pilot (29 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 151 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-09-04.