Mosaic preflight contextual data check

Mosaic preflight contextual data check is a skill for Claude Code, Codex from mstr-sharma/strategy-automate. It costs 65 tokens per session (1,152 once invoked), scanned A, original, MIT.

A pre-build checker for Mosaic semantic models that examines database tables and an optional model blueprint before construction.

In plain words
What is it for?
It is for checking new warehouse models, porting older semantic models to Mosaic, and adding model validation to CI or a Makefile.
Why use it?
It catches serious modelling problems early and can stop a build when findings reach the configured severity.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 skills/build-mosaic-model/scripts/preflight_model_check.py \.

Good fit It is for checking new warehouse models, porting older semantic models to Mosaic, and adding model validation to CI or a Makefile.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/mstr-sharma/strategy-automate
agentmods
npx agentmods add skills/mstr-sharma/strategy-automate/reference_mosaic_preflight

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 Mosaic preflight contextual data check

README.md
[![agentmods](https://agentmods.dev/badge/skills/mstr-sharma/strategy-automate/reference_mosaic_preflight/github.svg)](https://agentmods.dev/skills/mstr-sharma/strategy-automate/reference_mosaic_preflight)
Your own site
<a href="https://agentmods.dev/skills/mstr-sharma/strategy-automate/reference_mosaic_preflight"><img src="https://agentmods.dev/badge/skills/mstr-sharma/strategy-automate/reference_mosaic_preflight/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 Mosaic preflight contextual data check

Your own site · 80×15
<a href="https://agentmods.dev/skills/mstr-sharma/strategy-automate/reference_mosaic_preflight"><img src="https://agentmods.dev/badge/skills/mstr-sharma/strategy-automate/reference_mosaic_preflight.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,152 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 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.00065 $0.01152
Opus 5 $0.00032 $0.00576
Sonnet 5 $0.00013 $0.00230
Haiku 4.5 $0.00006 $0.00115

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

Security

Grade A, and why

Mosaic preflight contextual data check 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 5d 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.

memory/reference_mosaic_preflight_skill.md · 86 lines

How it starts

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

Preflight is step 6 of the build-mosaic-model execution flow (see skills/build-mosaic-model/SKILL.md). It is not wrapped as its own SKILL.md — the script is invoked directly, and ERROR-severity findings stop the build.

Location: skills/build-mosaic-model/scripts/preflight_model_check.py.

When to run

Before every build_mosaic.py build invocation when:

  • the warehouse tables are new to this project (no prior Mosaic model to diff against)
  • a user has asked you to port a legacy semantic model to Mosaic (pass the blueprint JSON)
  • CI is gating a config-driven build

If the build is a tiny tweak to an existing model (single attribute rename, metric formula change), skip preflight and lean on validate-model post-build instead.

Invocation

python3 skills/build-mosaic-model/scripts/preflight_model_check.py \
  --instance "<Your DB Instance>" --schema <YOUR_SCHEMA> \
  --tables T1 T2 T3 FACT \
  --blueprint /tmp/model_blueprint.json \
  --out /tmp/preflight.json \
  --fail-on ERROR

Exit code 1 when any finding at --fail-on severity or above is present — wire this into CI or a pre-build Makefile target.

What it checks (6 categories)

  1. Naming convention — mixed-case duplicates, locale-column explosion (*_DE/_ES/_FR/...), audit-column pollution (LOAD_TS, ETL_BATCH_ID, ...), non-identifier characters requiring quoting.
  2. Attribute vs metric classification — for each column, predicts the build's role assignment and flags mismatches: numeric ID columns that would get SUM'd (Total X ID anti-pattern), natural numeric dimensions (YEAR/MONTH/QUARTER) misclassified as metrics, text columns that look like dates.
  3. Datatype sanitydecimal(38,0) IDs (valid but flagged), text columns named *_DATE, over-wide varchar.
  4. Relationship inferability — no shared ID columns across tables (ERROR), bridge-table candidates (INFO), orphan key columns with no join partner.
  5. Contextual fit vs legacy blueprint (when --blueprint given) — missing attributes, expected multi-form attributes, blueprint relationships to propagate, metric definitions that are derived formulas (not plain sums).
  6. Governance guards — PII-looking columns (EMAIL, SSN, DOB, PHONE, ADDRESS, LAT/LON, CREDIT_CARD) prompting ACL/security-filter decisions.

Read the full file on GitHub · 86 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. 5d ago First seen · 86 lines · 65 tokens per session scan A 52633c9c9072

Subscribe to this mod's changes

Mosaic preflight contextual data check is a skill published in the GitHub repository mstr-sharma/strategy-automate (2 stars, last pushed 5d ago), licensed MIT. It adds 65 tokens to every session and 1,152 once invoked, about $0.0003 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-09-04.

Related

Other skills, from other repositories

research-engineer

An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.

davila7/claude-code-templates · 43 tokens

tika-eval-compare

Compare extracts from two Tika builds over a corpus to detect regressions in content, encoding, exceptions, and embedded-document handling. Use for "compare before/after extracts", "eval this change against the corpus".

apache/tika · 50 tokens

neuron-evaluation-engineer

Create and run AI evaluations with datasets, assertions, and output drivers in Neuron AI. Use this skill whenever the user mentions evaluation, testing AI systems, creating evaluators, dataset-driven testing, assertion-based validation, or wants to measure AI system performance. Also trigger for tasks involving…

neuron-core/neuron-ai · 77 tokens

jetson-validate-image

Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.

NVIDIA/skills · 50 tokens

atmos-validation

Validate Atmos projects, components, arbitrary JSON Schema inputs, EditorConfig, and GitHub Actions; use affected-file selection and native CI annotations.

cloudposse/atmos · 31 tokens

skill-benchmark

Benchmark AI skill effectiveness by measuring implementation quality against legacy constraints.

HoangNguyen0403/agent-skills-standard · 16 tokens