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/sawrus/agent-guides/sql-optimizationnpx skills add sawrus/agent-guides --skill sql-optimizationgit clone --depth 1 https://github.com/sawrus/agent-guidesWhat 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 | $0.00000 | $0.00333 |
| Opus 5 | $0.00000 | $0.00167 |
| Sonnet 5 | $0.00000 | $0.00067 |
| Haiku 4.5 | $0.00000 | $0.00033 |
Grade A, and why
sql-optimization 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 yesterday.
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.
What it actually says
Skill: SQL Optimization
When to load
When writing complex queries, optimizing slow queries, designing indexes, or reviewing query performance.
Core Patterns
-- ✅ Column projection — never SELECT *
SELECT user_id, created_at, total_amount FROM orders WHERE created_at >= '2026-01-01';
-- ✅ Partition pruning — filter on partition column first
SELECT user_id, total_amount
FROM orders
WHERE order_date = '2026-01-15' -- partition filter first
AND status = 'completed';
-- ❌ Function on indexed column defeats index
WHERE DATE(created_at) = '2026-01-15'
-- ✅ Range comparison preserves index
WHERE created_at >= '2026-01-15' AND created_at < '2026-01-16'
Window Functions (prefer over self-joins)
SELECT
user_id, order_date, amount,
SUM(amount) OVER (
PARTITION BY user_id ORDER BY order_date
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
) AS cumulative_amount,
ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY order_date DESC) AS recency_rank
FROM orders;
Snowflake-Specific
-- Cluster keys on large tables (> 1 TB)
ALTER TABLE orders CLUSTER BY (order_date, status);
-- COPY INTO for bulk loads — never row-by-row INSERT
COPY INTO orders FROM @my_stage/orders/
FILE_FORMAT = (TYPE = PARQUET) MATCH_BY_COLUMN_NAME = CASE_INSENSITIVE;
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.
- yesterday First seen · 48 lines · 0 tokens per session scan A 5e1b97dd8255
sql-optimization is a skill published in the GitHub repository sawrus/agent-guides (17 stars, last pushed 11d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 333 tokens. 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
test-driven-development
Drives development with tests. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality.
documentation-and-adrs
Records decisions and documentation. Use when making architectural decisions, changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.
idea-refine
Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or…
peon-ping-toggle
Toggle peon-ping sound notifications on/off. Use when user wants to mute, unmute, pause, or resume peon sounds during a Claude Code session. Also handles config changes like volume, pack rotation, categories — any peon-ping setting.
excalidraw-architect
Choose and compose the right Excalidraw diagram - architecture, flowchart, sequence, state, ER, swimlane, process, timeline, quadrant, pyramid, venn, loop, gantt, bar, line, scatter, and more - using the excalidraw-architect-mcp server. Use whenever a reader would learn more from a picture than from prose, or when…
ponytail-lazy-senior-dev
Applies the "lazy senior developer" mindset. Use this skill whenever generating, modifying, reviewing code, or fixing bugs to prioritize code reuse, minimalism, YAGNI principles, and root-cause fixes. Also use whenever the user says "ponytail", "be lazy", "lazy mode", "simplest solution", "minimal solution", "yagni"…