zuar-portal-mcp: Command for Claude Code

.claude/commands/portal-migrate.md

portal-migrate is a command for Claude Code from patrickdeanfox/zuar-portal-mcp. It costs 26 tokens per session (898 once invoked), scanned A, original, MIT.

A command for migrating all content in a connected Zuar Portal to a newer portal version. It coordinates scope decisions, checks the portal, converts blocks in batches, and verifies the result.

In plain words
What is it for?
Use it when moving a connected portal to a new version. It helps define the migration scope, run preflight checks, convert blocks, fix known issues, and perform verification.
Why use it?
A portal-wide migration can affect many blocks and may fail if compatibility or rollback plans are ignored. The command provides a staged process for checking and managing that work.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

This is patrickdeanfox/zuar-portal-mcp's own configuration. It tells Claude Code how to work on zuar-portal-mcp 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 zuar-portal-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to patrickdeanfox/zuar-portal-mcp. 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/patrickdeanfox/zuar-portal-mcp/main/.claude/commands/portal-migrate.md
Clone the repo
git clone --depth 1 https://github.com/patrickdeanfox/zuar-portal-mcp

Made for: Claude Code.

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 portal-migrate

README.md
[![agentmods](https://agentmods.dev/badge/commands/patrickdeanfox/zuar-portal-mcp/portal-migrate/github.svg)](https://agentmods.dev/commands/patrickdeanfox/zuar-portal-mcp/portal-migrate)
Your own site
<a href="https://agentmods.dev/commands/patrickdeanfox/zuar-portal-mcp/portal-migrate"><img src="https://agentmods.dev/badge/commands/patrickdeanfox/zuar-portal-mcp/portal-migrate/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 portal-migrate

Your own site · 80×15
<a href="https://agentmods.dev/commands/patrickdeanfox/zuar-portal-mcp/portal-migrate"><img src="https://agentmods.dev/badge/commands/patrickdeanfox/zuar-portal-mcp/portal-migrate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 898 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00026 $0.00898
Opus 5 $0.00013 $0.00449
Sonnet 5 $0.00005 $0.00180
Haiku 4.5 $0.00003 $0.00090

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

Security

Grade A, and why

portal-migrate scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

**7. Performance pass.** For any migrated block bound to a granular (100k+ row) datasource or reported slow: apply the `portal-block-perf` skill (or the `block_perf_pass` prompt) — measure the payload with timed curl, tr
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/commands/portal-migrate.md · 27 lines

What it actually says

Migrate the connected portal's content to a new portal version, following the migration playbook (zportal://guide/migration-playbook). Load the portal-118-migration skill for the block-level conversion pattern; this command is the portal-WIDE method around it.

Confirm a portal is connected: check_connection — one call gives you both the connection and the version (the target build). If it reports connected:false, relay its reason + fix and send the user to /portal-setup. If $ARGUMENTS is given, treat it as the target version and/or scope note.

1. Kickoff — scope decisions once, up front. Run the migration_kickoff MCP prompt (it is a prompt in v3, not a tool). It walks the same five scope questions in chat: native chart-widget policy (convert to ECharts / repair / leave — the user wants to be asked), test/QA pages in scope, fix hardcoded origins, cadence, rollback home. Record the answers to .zuar-portal/migration-scope.json, then proceed to migration_preflight. Don't start converting with these unanswered.

2. Preflight — probe, don't trust docs. Run migration_preflight. Read it as scope-by-FUNCTION: every placed block classified (scripted / template / markup / native-widget — the last breaks with zero migratable code), legacy patterns labeled in_live_code vs comment/string-only, hardcoded origins, snippet findings, orphans (unreachable via layouts AND partials AND snippets), and the data preflight (failing queries, stale stored column metadata → repair_query_metadata, stringly numeric columns). Deep-read any block whose classification is ambiguous — regex under-detects.

3. Snapshot. snapshot_portal and require complete: true (coverage is verified against live listings). No first write before a complete snapshot. Note where it lives per the kickoff's rollback decision.

4. Browser probes. With Claude for Chrome available (check_connectionbrowser_assist), run the browser_probes the preflight returned against the live build — data lifecycle, filter API shapes (verify by ROW COUNTS, not by docs), event semantics, render timing. Record what the build actually does; it overrides any guide.

5. Canary. Convert ONE representative block end-to-end: convert → validate_block { against_block_id } (pre-existing violations are grandfathered, only new ones block) → update_block → reload in browser → observe render + console. Only a green canary licenses batching.

6. Batches. Minimal diff always — preserve markup, CSS, names, formatting, even pre-existing bugs (log, don't fix). Round-trip verify every write (re-fetch, compare content + ui_queries). Any scripted text-patch must assert its expected match count and re-parse before moving on. Honor the kickoff cadence for pauses. Use the portal-bulk-operator agent for large batches.

7. Performance pass. For any migrated block bound to a granular (100k+ row) datasource or reported slow: apply the portal-block-perf skill (or the block_perf_pass prompt) — measure the payload with timed curl, trim SELECT * to the columns the block reads (get_references first if the query may be shared), prefetch the chart library, verify 60 s honest timeouts.

8. Verification sweep. One pass at the end: DOM/JS assertions and console reads first, screenshots only for what's ambiguous, state round-trips for interactive blocks (toggle ON → row count → toggle OFF → row count). Compare against reference captures taken at baseline, not live navigation. Silently-blank blocks: follow the diagnosis ladder in the playbook (§6) before touching code.

Close with a report: converted / repaired / left, grandfathered violations flagged, data repairs applied, rollback pointers (vc_log), and anything deferred.

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 · 27 lines · 26 tokens per session scan A 8de4df053205

Subscribe to this mod's changes

portal-migrate is a command published in the GitHub repository patrickdeanfox/zuar-portal-mcp (1 stars, last pushed 1mo ago), licensed MIT. It adds 26 tokens to every session and 898 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.