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 skills add twells89/sigma-skills --skill custom-sql-to-data-modelgit clone --depth 1 https://github.com/twells89/sigma-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/twells89/sigma-skills/custom-sql-to-data-model)<a href="https://agentmods.dev/skills/twells89/sigma-skills/custom-sql-to-data-model"><img src="https://agentmods.dev/badge/skills/twells89/sigma-skills/custom-sql-to-data-model/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/twells89/sigma-skills/custom-sql-to-data-model"><img src="https://agentmods.dev/badge/skills/twells89/sigma-skills/custom-sql-to-data-model.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.00072 | $0.06921 |
| Opus 5.5 | $0.00029 | $0.02768 |
| Sonnet 5.5 | $0.00014 | $0.01384 |
| Haiku 4.5 | $0.00007 | $0.00692 |
Grade A, and why
custom-sql-to-data-model 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 28d 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.
curl -s -X POST \ This is a copy
88% identical to custom-sql-to-data-model — 48 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 — 626 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Custom SQL → Data Model
End-to-end flow:
- Scan workbooks for
source.kind: "sql"elements (Phase 1). - Scan data models to index every existing SQL or warehouse-table source (Phase 1.5).
- Group manifest entries by normalized SQL; for each group, decide reuse an existing DM element or build a new one (Phase 1.5 → plan).
- Build DMs only for the to-build groups (Phase 2 / 3 / 4).
- Drive
:swapSourcesfrom the plan, one workbook at a time (Phase 5). - Audit and repair residual
[Prefix/SNAKE_CASE]formulas left behind by Sigma's auto-match (Phase 6).
The key win versus the legacy GET/mutate/PUT approach: one workbook with N
SQL elements is one API call with N entries in sourceMapping, and the
auto-match handles formula rewrites — except for the rough edges Phase 6
catches.
Prerequisites
Required env var: SIGMA_BASE_URL. For an interactive terminal, prefer a
one-time browser login through the sigma-api skill:
eval "$(bash <repo-root>/sigma-api/scripts/browser-login.sh)"
It keeps the refresh token exclusively in the OS keychain. For unattended
hosts, set SIGMA_CLIENT_ID and SIGMA_CLIENT_SECRET (Sigma Administration →
Developer Access) as the fallback.
The local get_token.py is a byte-identical synced copy of the canonical
sigma-api provider. In default auto mode it uses a cached/refreshable
browser session first, then client credentials. Override with
SIGMA_AUTH_MODE / --auth-mode (auto, browser, or
client-credentials). Before either auth mode succeeds, the provider requires
a non-redirecting, valid-JSON GET /v2/whoami; 401, 403, non-JSON, and
redirect responses fail without emitting or writing the token.
Default (shell-neutral, works in bash/zsh/PowerShell/cmd): mint a token
with the stdlib-only Python script and let scripts/lib/sigma_rest.rb pick
it up automatically from auth.json — no eval, no shell-specific syntax:
python3 scripts/get_token.py --workdir /tmp/custom-sql-run
What ships with it
17 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.
- generated/cline/custom-sql-to-data-model.md 26 KB
- generated/codex/AGENTS.md 26 KB
- generated/continue/custom-sql-to-data-model.md 26 KB
- generated/cursor/rules/custom-sql-to-data-model.mdc 26 KB
- scripts/audit-formulas.rb 2.5 KB runs code
- scripts/get_token.py 20 KB runs code
- scripts/get-token.sh 4.4 KB runs code
- scripts/lib/code_rep.rb 12 KB runs code
- scripts/lib/formula_audit.rb 1.1 KB runs code
- scripts/lib/sigma_rest.rb 7.8 KB runs code
- scripts/lib/workbook_sql.rb 961 B runs code
- scripts/plan-dedup.rb 4.1 KB runs code
- scripts/scan-data-models.rb 4.0 KB runs code
- scripts/scan-workbooks.rb 2.5 KB runs code
- scripts/test-code-rep.rb 4.0 KB runs code
- scripts/test-sigma-rest-auth.rb 4.4 KB runs code
- scripts/test-workbook-sql.rb 3.1 KB runs code
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.
- 28d ago Changed · +4 lines 53da794f2463
- 1mo ago Changed · +9 lines 1829d39db3ff
- 3mo ago First seen · 613 lines · 72 tokens per session scan A 0cc71542f104
custom-sql-to-data-model is a skill published in the GitHub repository twells89/sigma-skills (16 stars, last pushed 28d ago), licensed Apache-2.0. It adds 72 tokens to every session and 6,921 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). It is 88% identical to custom-sql-to-data-model, differing in 48 lines, and is treated as a copy.
custom-sql-to-data-model compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| custom-sql-to-data-modeltwells89/sigma-skills | Skill | 16 | 28d ago | Apache-2.0 | A | 72 | Claude Code |
| create-prprisma/orm | Skill | 48k | today | Apache-2.0 | A | 47 | Claude Code, Codex |
| schema-explorationlangchain-ai/deepagents | Skill | 32k | today | MIT | A | 57 | Claude Code, Codex |
| atlas-mssqlariga/atlas | Skill | 8.9k | today | Apache-2.0 | A | 163 | Claude Code |
| ha-data-storesshiwenwen/hope-agent | Skill | 1.9k | yesterday | MIT | A | 115 | Claude Code, Codex |
| bex-keyvaluebex-co/bex | Skill | 1.6k | today | Apache-2.0 | A | 117 | Claude Code, Codex |
| pentesting-mysqlxalgorix/xalgorix | Skill | 1.6k | today | Apache-2.0 | A | 65 | Claude Code, Codex |