Zuar-Portal-MCP-Public: Agent for Claude Code

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

portal-block-builder is an agent for Claude Code from zuarbase/Zuar-Portal-MCP-Public. It costs 67 tokens per session (1,593 once invoked), scanned A, a copy of portal-block-builder, MIT.

A block-building agent for Zuar Portal that creates HTML blocks from a specification, connects them to real datasource results, and checks that they work.

In plain words
What is it for?
Use it to discover datasources, confirm available columns, write the block's HTML, JavaScript, and CSS, connect its query results, and validate the result.
Why use it?
It provides a complete starting block with verified data instead of leaving layout, code, and data connections to be assembled separately.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

This is zuarbase/Zuar-Portal-MCP-Public's own configuration. It tells Claude Code how to work on Zuar-Portal-MCP-Public 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-Public configures →

Reuse

Borrowing it

Nothing to install: this file belongs to zuarbase/Zuar-Portal-MCP-Public. 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/zuarbase/Zuar-Portal-MCP-Public/main/.claude/agents/portal-block-builder.md
Clone the repo
git clone --depth 1 https://github.com/zuarbase/Zuar-Portal-MCP-Public

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/zuarbase/zuar-portal-mcp-public/portal-block-builder/github.svg)](https://agentmods.dev/agents/zuarbase/zuar-portal-mcp-public/portal-block-builder)
Your own site
<a href="https://agentmods.dev/agents/zuarbase/zuar-portal-mcp-public/portal-block-builder"><img src="https://agentmods.dev/badge/agents/zuarbase/zuar-portal-mcp-public/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/zuarbase/zuar-portal-mcp-public/portal-block-builder"><img src="https://agentmods.dev/badge/agents/zuarbase/zuar-portal-mcp-public/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 100% copy Near-identical to another mod 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 10d ago against content hash cc4b6b2f6567, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 10d 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

This is a copy

100% identical to portal-block-builder — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.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. 10d 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 zuarbase/Zuar-Portal-MCP-Public (0 stars, last pushed 8d 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. It is 100% identical to portal-block-builder, differing in 0 lines, and is treated as a copy.

Related

Other agents, from other repositories

laravel-vue-developer

Build full-stack Laravel applications with Vue3 frontend. Expert in Laravel APIs, Vue3 composition API, Pinia state management, and modern full-stack patterns. Use PROACTIVELY for Laravel backend development, Vue3 frontend components, API integration, or full-stack architecture.

davepoon/buildwithclaude · 61 tokens

telemetry-processor

Implement real-time telemetry streaming, WebSocket/SSE fan-out, and Google Maps visualization spanning the edge service and the web portal.

atretyak1985/swarmery · 31 tokens

CMS Developer

Drupal and WordPress specialist for theme development, custom plugins/modules, content architecture, and code-first CMS implementation.

criptogus/agent-evolve-network · 24 tokens

Web GIS Developer

Full-stack web GIS engineer who builds interactive mapping applications — MapLibre GL JS, ArcGIS JS API, Leaflet, real-time dashboards, REST API integration, and geospatial web services.

criptogus/agent-evolve-network · 42 tokens

broadcasting-agent

Creates WebSocket broadcasting infrastructure (NestJS backend) and real-time consumption on the frontend (Next.js or React). Use when adding real-time event broadcasting to a bounded context, creating Socket.IO gateways, or implementing frontend event listeners. Dispatched after infrastructure layer is complete.

Softtor/nestjs-hexagonal · 58 tokens

mr-fantastic

Senior Fullstack Developer — front+back generalist, glue code, integrations, rapid prototyping, MVP. Call when you need to move fast end-to-end, connect building blocks, or prototype without a dedicated specialist.

CohesiumAI/assemble · 49 tokens