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.
curl -O https://raw.githubusercontent.com/zuarbase/Zuar-Portal-MCP-Public/main/.claude/agents/portal-block-builder.mdgit clone --depth 1 https://github.com/zuarbase/Zuar-Portal-MCP-PublicWrote 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.
[](https://agentmods.dev/agents/zuarbase/zuar-portal-mcp-public/portal-block-builder)<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.
<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>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00067 | $0.01593 |
| Opus 5.5 | $0.00027 | $0.00637 |
| Sonnet 5.5 | $0.00013 | $0.00319 |
| Haiku 4.5 | $0.00007 | $0.00159 |
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 1mo 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.
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.
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 nodata/__source__field.queryResults[n]maps toui_queries[n]. json_data.isolated,tags,accessas needed.
Workflow
- 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.
- Discover data.
list_resource resource="datasource"andresource="query"to find candidates. For the chosen datasource, runprofile_datasource(per-column type / distinct / min-max) — this tells you dimensions vs. measures, filter candidates, and chart axes without guessing.profile_datasourcealso returns raw rows undersample.columns/sample.rows(sample_rowsparam) if you need a raw look. - Verify the EXACT columns you'll bind. If binding a saved query,
execute_query(with a smalllimit) 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. - Author the two fields following
assets/conventions.mdstructure:<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=falseflag + gatedlog,QUERY_INDEXmap, 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-levelinit()called once. - Async blocks (library load / fetch / deferred render): grab
currentBlock.getOnLoadedCallback()early and call it once in afinally. Sync blocks don't need it. - Never a literal
$next to a quote/backtick/&/digit — format money withtoLocaleString('en-US',{style:'currency',currency:'USD'}); a bare sign isString.fromCharCode(36). Never poll for data. Never author loading states (Portal has a skeleton loader). - Apply
assets/design.md: theme tokens viavar(--token, fallback), tabular numerals, one accent, soft elevation. Charts per the policy (ECharts complex, Chart.js/vanilla simple, amCharts only if asked; load viazPortal.resources.load, neverAMCHARTS_LOADER).
- Validate before writing. Call
validate_blockwith yourjson_data+css. Fix every error (warnings are judgment calls — fix structural ones). Do not callcreate_blockuntilvalidate_blockreturnsvalid:true(or only intentional warnings remain). - Create + bind.
create_block(type html). Then bind: either passui_queriesin the create, or usebind_block_querywith thequery_id/datasource_id(it setspage_size— confirm it'snullfor full data unless a deliberate cap makes sense). - Confirm live data flows.
get_resource resource="block"to confirm the binding persisted;execute_queryon the bound query to confirm rows exist. If the block has fallback/sample rows, make sure live rows would render, not the fallback. - Place it if a page was specified — one declarative
place_blockscall ({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.
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.
- 1mo ago First seen · 50 lines · 67 tokens per session scan A cc4b6b2f6567
portal-block-builder is an agent published in the GitHub repository zuarbase/Zuar-Portal-MCP-Public (0 stars, last pushed 19d ago), licensed MIT. It adds 67 tokens to every session and 1,593 once invoked, about $0.0003 per session on Opus 5.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.
Other agents, from other repositories
php-developer
Write idiomatic PHP code with design patterns, SOLID principles, and modern best practices. Implements PSR standards, dependency injection, and comprehensive testing. Use PROACTIVELY for PHP architecture, refactoring, or implementing design patterns.
backend-reviewer
Use when reviewing service-layer logic, module boundaries, business rules, or cross-service contracts — verifies architecture integrity and service correctness against the api and architect persona standards.
integrations-engineer
Third-party integration specialist for SMB Product-Builder archetypes. Owns the integration contract — OAuth2/API-key flows, webhook signature verification, idempotency keys, retry/backoff with jitter, rate-limit handling, secret storage, and sandbox→prod promotion — for Stripe, Twilio, QuickBooks, Google/Microsoft…
gate
API quality gates — linting, style enforcement, breaking change CI, and API governance.
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.
dotnet-architecture-reviewer
Reviews a .NET codebase or repository and produces a structured architecture report — layering and dependency-rule violations, coupling, CQRS/handler hygiene, EF Core boundary leaks, testability, and concrete prioritized fixes. Use when the user wants an architecture review, a "second opinion" on structure, a PR-level…