divine-mobile: Skill for Claude Code

.agents/skills/clickhouse-rust-view-column-order/SKILL.md

clickhouse-rust-view-column-order is a skill for Claude Code, Codex from divinevideo/divine-mobile. It costs 132 tokens per session (1,476 once invoked), scanned B, original, MPL-2.0.

A guide to fixing Rust data-reading errors caused by SQL result columns arriving in a different order than the fields in a Rust struct.

In plain words
What is it for?
Use it when only some query or sorting variants fail, especially when selecting all view columns together with extra computed or joined columns.
Why use it?
The Rust ClickHouse library matches values by position, so a computed view column in the wrong place can put each value into the wrong field.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code; installed under .agents/ (shared by several agents).

This is divinevideo/divine-mobile's own configuration. It tells Claude Code and Codex how to work on divine-mobile 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 divine-mobile configures →

Reuse

Borrowing it

Nothing to install: this file belongs to divinevideo/divine-mobile. 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/divinevideo/divine-mobile/main/.agents/skills/clickhouse-rust-view-column-order/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/divinevideo/divine-mobile

Made for: Claude Code, Codex.

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 clickhouse-rust-view-column-order

README.md
[![agentmods](https://agentmods.dev/badge/skills/divinevideo/divine-mobile/clickhouse-rust-view-column-order/github.svg)](https://agentmods.dev/skills/divinevideo/divine-mobile/clickhouse-rust-view-column-order)
Your own site
<a href="https://agentmods.dev/skills/divinevideo/divine-mobile/clickhouse-rust-view-column-order"><img src="https://agentmods.dev/badge/skills/divinevideo/divine-mobile/clickhouse-rust-view-column-order/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 clickhouse-rust-view-column-order

Your own site · 80×15
<a href="https://agentmods.dev/skills/divinevideo/divine-mobile/clickhouse-rust-view-column-order"><img src="https://agentmods.dev/badge/skills/divinevideo/divine-mobile/clickhouse-rust-view-column-order.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,476 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 91
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
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.00132 $0.01476
Opus 5 $0.00066 $0.00738
Sonnet 5 $0.00026 $0.00295
Haiku 4.5 $0.00013 $0.00148

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

Security

Grade B, and why

clickhouse-rust-view-column-order scanned grade B with 2 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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

curl ... --data-binary \

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -u 'user:pass' 'https://clickhouse-host:8443' \
.agents/skills/clickhouse-rust-view-column-order/SKILL.md · 157 lines

How it starts

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

ClickHouse Rust: View Computed Column Ordering

Problem

When using SELECT alias.* , extra_col FROM my_view alias LEFT JOIN ..., ClickHouse expands alias.* to include ALL columns defined in the view — including any computed columns added by the view itself (e.g. SELECT *, expr AS trending_score FROM base). Those computed columns appear INSIDE the alias.* expansion, BEFORE any columns appended after it in the outer query.

The clickhouse Rust crate (#[derive(Row)]) deserializes positionally — field N in the Rust struct receives column N from the query result. If the struct field order doesn't match the actual SQL column order, the wrong bytes land in the wrong fields, causing type errors at deserialization even though the column count is correct.

Symptoms

  • HTTP 500 on one sort variant (e.g. sort=trending, sort=popular) but not others (e.g. sort=recent) that query a different view or table
  • Error like: "cannot decode Float64 from String" or similar type mismatch
  • Column COUNT is correct (no "not enough data" error)
  • Bug appears after adding a computed column to an existing view

Root Cause Explained

Suppose trending_videos is defined as:

CREATE VIEW trending_videos AS
SELECT
    *,                                          -- all base columns
    (views * 0.5 + likes * 2.0) AS trending_score  -- computed column APPENDED HERE
FROM video_stats;

An outer query then does:

SELECT
    tv.*,                   -- expands to: base_cols..., trending_score
    text_track_ref,         -- subtitle columns come AFTER
    text_track_content
FROM trending_videos tv
LEFT JOIN subtitle_subquery USING (id);

The actual SQL result column order is:

[...base_cols, trending_score, text_track_ref, text_track_content]

But if the Rust struct was written with subtitle fields before trending_score:

pub struct TrendingVideo {
    // ...base fields...
    pub text_track_ref: String,      // position N   <- WRONG: gets trending_score bytes
    pub text_track_content: String,  // position N+1 <- WRONG: gets text_track_ref bytes
    pub trending_score: f64,         // position N+2 <- WRONG: gets text_track_content bytes
}

Read the full file on GitHub · 157 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 · 157 lines · 132 tokens per session scan B 0a36a618da9c

Subscribe to this mod's changes

clickhouse-rust-view-column-order is a skill published in the GitHub repository divinevideo/divine-mobile (265 stars, last pushed today), licensed MPL-2.0. It adds 132 tokens to every session and 1,476 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

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…

googleapis/mcp-toolbox · 87 tokens

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…

googleapis/mcp-toolbox · 164 tokens

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…

prowler-cloud/prowler · 108 tokens

graphjin-eval

Create, extend, run, baseline, and diagnose GraphJin agent evaluations through the graphjin eval CLI.

dosco/graphjin · 27 tokens

axiom-audit-grdb-performance

Use when the user mentions GRDB performance review, slow GRDB queries, app-group database setup audit, a ValueObservation that stopped updating, or pre-release GRDB scan.

CharlesWiltgen/Axiom · 43 tokens

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.

getsentry/skills · 55 tokens