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.
curl -O https://raw.githubusercontent.com/patrickdeanfox/zuar-portal-mcp/main/.claude/skills/portal-block-perf/SKILL.mdgit clone --depth 1 https://github.com/patrickdeanfox/zuar-portal-mcpWrote 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/skills/patrickdeanfox/zuar-portal-mcp/portal-block-perf)<a href="https://agentmods.dev/skills/patrickdeanfox/zuar-portal-mcp/portal-block-perf"><img src="https://agentmods.dev/badge/skills/patrickdeanfox/zuar-portal-mcp/portal-block-perf/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/skills/patrickdeanfox/zuar-portal-mcp/portal-block-perf"><img src="https://agentmods.dev/badge/skills/patrickdeanfox/zuar-portal-mcp/portal-block-perf.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.00104 | $0.02426 |
| Opus 5 | $0.00052 | $0.01213 |
| Sonnet 5 | $0.00021 | $0.00485 |
| Haiku 4.5 | $0.00010 | $0.00243 |
Grade A, and why
portal-block-perf 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 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
description: Performance playbook for Zuar Portal blocks with large datasets — audit and trim SELECT * queries to referenced columns, load chart libraries in parallel with the query (amCharts prefetch pattern), 60s data- How it starts
The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Portal block performance playbook
Distilled from a production incident on a customer portal (2026-07-08): a block took
17–19 s to load on a fast connection and never loaded on slow ones. Root causes, in
order of impact: a SELECT * query shipping 46.8 MB of uncompressed JSON, a chart
library loaded serially after the data arrived, and a 15 s load timeout that turned
"slow" into "permanently blank". Every pattern below was verified in production.
The performance model
A block's wall-clock load =
DB query → server JSON serialization → network transfer → JS parse → chart-lib load → render.
For large datasets the DB is usually the SMALLEST slice (3 s of an 18 s load). Payload size drives serialization + transfer + parse, so bytes are the enemy, not the index. Diagnose with real numbers before touching anything:
# Login (host/creds in .zuar-portal/config.json)
curl -s -c cookies.txt "$HOST/auth/login?api_key=$KEY&user_id=$UID"
# Replay the block's exact execute call with timing
curl -s -b cookies.txt -H "X-Api-Key: $KEY" -H "Content-Type: application/json" --compressed \
-d '{"query_id":"<QID>","dsl":{"where":[]},"params":[],"datasource_filters":[{"datasource_id":"<DSID>","where":[]}],"response_control":{"include_count":true,"include_params_details":true,"include_columns":false}}' \
-o resp.json -w "ttfb=%{time_starttransfer}s total=%{time_total}s bytes=%{size_download}\n" \
"$HOST/api/queries/<QID>/execute"
jq '{count, rows: (.data|length), db_time: .timings.main_query}' resp.json
timings.main_query = DB time. ttfb − db_time = server serialization.
total − ttfb = transfer. Multi-second serialization or multi-MB payloads → trim the query.
1. Query audit: trim SELECT * to referenced columns
A granular table × 39 columns × 120k rows ≈ 47 MB. Blocks typically read fewer than half the columns. Trimming is free — no block-code changes — IF done safely:
- Find every column the block reads. Blocks access columns by NAME through
accessor helpers. Grep the block HTML for ALL of these patterns per column:
- quoted refs:
'col_name'/"col_name"(accessors likestr(r,'x'),num(r,'x'),getVal(row,'x'),getColVal(...)) - dot lookups on a column map:
colMap.col_name - plain word-boundary greps LIE (
titlematches HTML attributes;periodmatches variable names) — count quoted+dot matches only.
- quoted refs:
- Names referenced in JS but absent from the query are usually guarded fallbacks
(
if (colMap.x !== undefined)) — dropping nothing they need. Verify the guard exists. - Check the query isn't shared:
get_references resource="query" id=<QID>— thedependentslist shows every block bound to it. Trim only if this block is the sole binder (or audit all binders). - Update
sql_form.columnsfrom["*"]to the explicit list viaupdate_resource resource="query". Keepwhere/order_byverbatim. - Datasource filters are unaffected —
datasource_filtersapply inside the datasource CTE which still has all columns; the query projection only shapes the SELECT. - Re-measure with the curl above. Expect roughly
(kept/total columns)× old size.
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.
- 12d ago First seen · 174 lines · 104 tokens per session scan A 141da419d9f5
portal-block-perf is a skill published in the GitHub repository patrickdeanfox/zuar-portal-mcp (1 stars, last pushed 1mo ago), licensed MIT. It adds 104 tokens to every session and 2,426 once invoked, about $0.0005 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.
Other skills, from other repositories
create-pr
Creates a GitHub PR with a Linear-ticket-prefixed title and a decision-led, narrative description for Prisma 8. Use when the user wants to create a pull request, open a PR, or submit changes for review.
schema-exploration
Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database. Use when the user asks about database schema, table structure, column types, what tables exist, ERD, foreign keys, or how entities relate.
ha-data-stores
Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…
nornicdb-cypher-queries
Pick fast, predictable Cypher query shapes in NornicDB — point lookups, batch retrieval, pagination, search, traversal, batched UNWIND/MERGE writes, cleanup, multi-tenant isolation. Use when writing or reviewing Cypher whose latency or throughput matters; maps user intent to the executor's hot-path query templates.
supabase
Supabase / PostgREST Row-Level-Security playbook — pull the anon (or leaked servicerole) key out of the frontend JS, map tables from the auto-generated OpenAPI spec, test anonymous RLS READ disclosures (PII/secret leaks), and anonymous RLS WRITE abuse (insert/update/delete — e.g. forging…
volcengine-rds-postgresql
A tool for operating PostgreSQL databases hosted by Volcano Engine's managed database service. PostgreSQL is a relational database used to store structured application data.