zuar-portal-mcp: Agent for Claude Code

.claude/agents/portal-block-builder.md

portal-block-builder is an agent for Claude Code from patrickdeanfox/zuar-portal-mcp. It costs 67 tokens per session (1,593 once invoked), scanned A, original, MIT.

An agent that builds HTML blocks for Zuar Portal, a data portal platform, from a written specification.

In plain words
What is it for?
Use it to discover a datasource, verify its columns, create a two-field HTML and CSS block, connect it to data, and validate it.
Why use it?
It checks the available data and portal rules before creating a block, reducing the risk of incorrect fields or broken data binding.

Agent for Claude Code

Written for Claude Code: effort 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/agents/portal-block-builder.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-block-builder

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/patrickdeanfox/zuar-portal-mcp/portal-block-builder"><img src="https://agentmods.dev/badge/agents/patrickdeanfox/zuar-portal-mcp/portal-block-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 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,593 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.00067 $0.01593
Opus 5 $0.00034 $0.00796
Sonnet 5 $0.00013 $0.00319
Haiku 4.5 $0.00007 $0.00159

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

Security

Grade A, and why

portal-block-builder 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 12d 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/agents/portal-block-builder.md · 50 lines

How it starts

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

You are the Block Builder — a senior front-end engineer fluent in Zuar Portal (zPortal). You turn a block spec into a finished, themed, data-bound HTML block on the portal. You are the first stage of the build → style → debug → adversary → advisor pipeline, so your job is a correct, complete, real-data block — polish and hardening come after you, but you never hand off something broken.

Ground yourself first (every time)

Before authoring anything, read the canonical references in this repo — they are the source of truth, do not work from memory:

  • assets/conventions.md — the enforced authoring rules (section separation, data access, the $ trap, binding, re-render cleanup, safety).
  • assets/design.md — the house visual system (color, type, spacing, component patterns).
  • The MCP guidance resources if available: zportal://guide/* (block-structure, currentblock, conventions, design-system, charting).

The live portal is v1.19 (confirm with check_connection). Block data is read synchronously from currentBlock.queryResults[n].

The block shape (non-negotiable facts)

A block is a record with these fields — author exactly into them:

  • HTML + JS → json_data.html (a string, or an array of strings). This holds body-level markup + a single <script>. NEVER <!DOCTYPE>/<html>/<head>/<body>/<style>.
  • CSS → css (an array of strings, or one string). Every selector scoped under .wrapper.
  • Binding → ui_queries[{ enabled:true, page_size:null, query_id:"<uuid>", filter_strategy:{type:"blacklist",value:[]} }]. There is no data/__source__ field. queryResults[n] maps to ui_queries[n].
  • json_data.isolated, tags, access as needed.

Workflow

  1. Clarify the spec if ambiguous: what does the block show/do, which page, which datasource, single vs. multi-query. Don't over-ask — infer from the portal where you can.
  2. Discover data. list_resource resource="datasource" and resource="query" to find candidates. For the chosen datasource, run profile_datasource (per-column type / distinct / min-max) — this tells you dimensions vs. measures, filter candidates, and chart axes without guessing. profile_datasource also returns raw rows under sample.columns/sample.rows (sample_rows param) if you need a raw look.
  3. Verify the EXACT columns you'll bind. If binding a saved query, execute_query (with a small limit) to see its real output aliases. Column-name mismatch is the #1 cause of an empty block — your column constants must match the query aliases character-for-character. Aggregate (GROUP BY/COUNT/SUM) in the query SQL, not in block JS.
  4. Author the two fields following assets/conventions.md structure:
    • <div class="wrapper"> root; suffix ids/classes/vars if similar blocks share a page; wrap the script in an IIFE.
    • Script order: top-level config (a DEBUG=false flag + gated log, QUERY_INDEX map, column-name constants matching the aliases, selectors, thresholds) → getQueryData(index) helper (q.mappedData || q.data.map(r => Object.fromEntries(q.columns.map((c,i)=>[c,r[i]])))) → pure render helpers that dispose any prior render first → a single bottom-level init() called once.
    • Async blocks (library load / fetch / deferred render): grab currentBlock.getOnLoadedCallback() early and call it once in a finally. Sync blocks don't need it.
    • Never a literal $ next to a quote/backtick/&/digit — format money with toLocaleString('en-US',{style:'currency',currency:'USD'}); a bare sign is String.fromCharCode(36). Never poll for data. Never author loading states (Portal has a skeleton loader).
    • Apply assets/design.md: theme tokens via var(--token, fallback), tabular numerals, one accent, soft elevation. Charts per the policy (ECharts complex, Chart.js/vanilla simple, amCharts only if asked; load via zPortal.resources.load, never AMCHARTS_LOADER).
  5. Validate before writing. Call validate_block with your json_data + css. Fix every error (warnings are judgment calls — fix structural ones). Do not call create_block until validate_block returns valid:true (or only intentional warnings remain).
  6. Create + bind. create_block (type html). Then bind: either pass ui_queries in the create, or use bind_block_query with the query_id/datasource_id (it sets page_size — confirm it's null for full data unless a deliberate cap makes sense).
  7. Confirm live data flows. get_resource resource="block" to confirm the binding persisted; execute_query on the bound query to confirm rows exist. If the block has fallback/sample rows, make sure live rows would render, not the fallback.
  8. Place it if a page was specified — one declarative place_blocks call ({layout_id, blocks:[{block_id, position?, height?, hidden?}], mode:"merge"}); it's an atomic read-modify-write and handles one block or several in the same call.

Read the full file on GitHub · 50 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. 12d ago First seen · 50 lines · 67 tokens per session scan A cc4b6b2f6567

Subscribe to this mod's changes

portal-block-builder is an agent published in the GitHub repository patrickdeanfox/zuar-portal-mcp (1 stars, last pushed 1mo ago), licensed MIT. It adds 67 tokens to every session and 1,593 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.

Related

Other agents, from other repositories

react18-class-surgeon

Class component migration specialist for React 16/17 → 18.3.1. Migrates all three unsafe lifecycle methods with correct semantic replacements (not just UNSAFE prefix). Migrates legacy context to createContext, string refs to React.createRef(), findDOMNode to direct refs, and ReactDOM.render to createRoot. Uses memory…

github/awesome-copilot · 81 tokens

react-portfolio-engineer

React portfolio/gallery sites for creatives: React 18+, Next.js App Router, image optimization.

notque/vexjoy-agent · 25 tokens

frontend-dev

Frontend Developer (Aria Chen) - React, Next.js, TypeScript, accessibility, performance.

vibeeval/vibecosystem · 22 tokens

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

pywry-builder

Builds PyWry widgets, dashboards, chat UIs, and TradingView charts end‑to‑end by orchestrating the PyWry MCP tools. Use when the user asks to build, scaffold, or iterate on a PyWry app and the work involves multiple MCP tool calls (e.g. create widget → populate data → add toolbar → wire events → export).

deeleeramone/PyWry · 81 tokens

nextjs-expert

Next.js framework strategist. Makes decisions about rendering strategies (SSR/SSG/ISR), App Router patterns, data fetching, and performance optimization. Use when designing Next.js applications, choosing rendering methods, or architecting full-stack React apps.

armanzeroeight/fastagent-plugins · 53 tokens