zuar-portal-mcp: Command for Claude Code

.claude/commands/portal-improve.md

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

A single, limited workflow for finding and making the worst-scoring improvements in a connected portal, then checking the result. A portal is an external content system that the workflow can read and write.

In plain words
What is it for?
Use it to score portal blocks, select low-scoring ones, apply only the named fixes, check for regressions, and report the change.
Why use it?
It limits each pass to a stated number of blocks and requires a writable connection, a saved baseline, and verification after changes. This helps prevent unverified or overly broad edits.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: model 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-improve.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-improve

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/patrickdeanfox/zuar-portal-mcp/portal-improve"><img src="https://agentmods.dev/badge/commands/patrickdeanfox/zuar-portal-mcp/portal-improve.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 505 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.00023 $0.00505
Opus 5 $0.00012 $0.00253
Sonnet 5 $0.00005 $0.00101
Haiku 4.5 $0.00002 $0.00051

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

Security

Grade A, and why

portal-improve 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/commands/portal-improve.md · 37 lines

What it actually says

Run ONE bounded portal-improvement pass. Writes are gated and provable — this is the loop the safety primitives were built for.

Confirm a portal is connected and writable: check_connection. If connected:false or read-only, relay the reason + fix and stop — an improvement pass with no write access is a no-op.

Parse $ARGUMENTS for limit (blocks per pass, default 5), min_score (only blocks below this are touched, default 90), tier (fast/standard/max, default standard). State the scope before starting.

Run the .claude/workflows/portal-improve.js Workflow with those args. What it does — and what you verify in its report:

  1. Baselinesnapshot_portal (the rollback point), score_portal update_baseline=true (pins the pre-state), worst-N selection with named deductions.
  2. Improve — one portal-block-debugger agent per block, fixing ONLY the named deductions: reads first, writes with expected_updated_at, content tools only, scratch named TMP · …, product decisions reported instead of guessed.
  3. Verify — the read-only portal-block-adversary re-checks each changed block; a regression verdict blocks the baseline update and triggers restore_resource from the snapshot.
  4. Close — re-score (the delta vs baseline is the proof), cleanup_scratch confirm=true, baseline locked in only when nothing regressed and the delta is non-negative.

Report to the user: baseline → final score, per-block improvements, any regressions (and that they were restored), anything flagged needs_human. The pass is designed to be safe to schedule nightly (/schedule): bounded blast radius, snapshot-first, provable delta, self-cleaning.

Scores measure the mechanically checkable — never "improve" a block's design intent from a score alone. Design work goes through /portal-build's full pipeline.

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 · 37 lines · 23 tokens per session scan A 4a925ef82a59

Subscribe to this mod's changes

portal-improve is a command published in the GitHub repository patrickdeanfox/zuar-portal-mcp (1 stars, last pushed 1mo ago), licensed MIT. It adds 23 tokens to every session and 505 once invoked, about $0.0001 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.