Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/starrocks/starrocks-debug-skills/materialized-viewnpx skills add StarRocks/starrocks-debug-skills --skill materialized-viewgit clone --depth 1 https://github.com/StarRocks/starrocks-debug-skillsWrote 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/starrocks/starrocks-debug-skills/materialized-view)<a href="https://agentmods.dev/skills/starrocks/starrocks-debug-skills/materialized-view"><img src="https://agentmods.dev/badge/skills/starrocks/starrocks-debug-skills/materialized-view.svg" alt="Measured on agentmods" 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.00077 | $0.05441 |
| Opus 5 | $0.00039 | $0.02721 |
| Sonnet 5 | $0.00015 | $0.01088 |
| Haiku 4.5 | $0.00008 | $0.00544 |
Grade A, and why
materialized-view 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 663 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Materialized View Troubleshooting
Investigation guide for async MV refresh failures, refresh timeouts, MV inactivation, query rewrite failures, and sync MV optimization.
Five root causes account for the vast majority of cases:
- Cause A — refresh OOM (memory exhaustion during materialization)
- Cause B — refresh timeout (SQL takes longer than configured limit)
- Cause C — MV inactive (base table schema change or manual deactivation)
- Cause D — query rewrite not used (structural mismatch, staleness, or disabled)
- Cause E — schedule persistence issue (FE restart breaks scheduler timing)
Metric Taxonomy — Read This First
Before using any metrics, understand the three observability layers:
MV state observability
SHOW MATERIALIZED VIEWS — primary MV health check:
| Field | Meaning |
|---|---|
is_active |
Whether the MV is active (true = can refresh and rewrite) |
last_refresh_state |
State of the last refresh: SUCCESS, FAILED, RUNNING |
last_refresh_error_message |
Error detail when last_refresh_state = FAILED |
last_refresh_time |
Timestamp of the last completed refresh |
last_refresh_duration_ms |
Duration of the last refresh in milliseconds |
inactive_reason |
Why the MV was deactivated (schema change, explicit call) |
refresh_type |
ASYNC / MANUAL / SCHEDULED |
next_refresh_time |
Next scheduled refresh (for scheduled MVs) |
Refresh task observability
-- Refresh history with error details
SELECT task_name, state, error_message, start_time, finish_time,
TIMESTAMPDIFF(SECOND, start_time, finish_time) AS duration_sec
FROM information_schema.task_runs
WHERE task_name LIKE 'mv-%'
ORDER BY start_time DESC LIMIT 20;
-- Running refresh tasks right now
SELECT * FROM information_schema.task_runs
WHERE state = 'RUNNING';
Resource consumption observability
-- Queries running during refresh (to identify resource contention)
SHOW PROC '/current_queries' \G
-- Analyze a specific refresh profile (get profile_id from task_runs)
ANALYZE PROFILE FROM '<profile_id>';
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 6d ago First seen · 663 lines · 77 tokens per session scan A 07a40847b5a7
materialized-view is a skill published in the GitHub repository StarRocks/starrocks-debug-skills (75 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 77 tokens to every session and 5,441 once invoked, about $0.0004 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-30.
Other skills, from other repositories
doris-debug-materialized-view
Use for Doris sync MV (rollup) miss or async MTMV refresh/rewrite issues. Commands: SHOW ALTER TABLE MATERIALIZED VIEW, mvinfos(), EXPLAIN, REFRESH MATERIALIZED VIEW.
fix-failing-tests
Diagnose a failing test in the googleapis/mcp-toolbox repo and land a fix by reasoning from the actual error: read the failure, reproduce it, shrink it until the cause is forced into the open, then fix the cause. Use this whenever a test or CI job is red, a build breaks after a change, many packages fail at once, or a…
triage-issues
Triage GitHub issues in the googleapis/mcp-toolbox repo: propose the correct labels (type / priority / product / status), check for duplicates, verify a bug has enough info to act on, and draft a triage comment. Use whenever a maintainer asks you to triage, label, categorize, prioritize, or "look at" an issue (or a…
postgresql-indexing
PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing…
graphjin-eval
Create, extend, run, baseline, and diagnose GraphJin agent evaluations through the graphjin eval CLI.
django-perf-review
Django performance code review. Use when asked to "review Django performance", "find N+1 queries", "optimize Django", "check queryset performance", "database performance", "Django ORM issues", or audit Django code for performance problems.