.claude/skills/archaeology/SKILL.md
# Skill: Query Archaeology Retrieval ## Purpose Retrieve proven SQL patterns, table cheatsheets, and join patterns from the query archaeology store so agents reuse validated work instead of writing SQL from scratch. ## When to Use - **Automatically** before any analysis agent writes SQL (pre-flight step) - **Manually** when the user asks about known patterns for a table or join ## Instructions ### Step 1: Check the Index Read `.knowledge/query-archaeology/curated/index.yaml`. Parse counters
npx skillsauth add ai-analyst-lab/ai-analyst .claude/skills/archaeologyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Retrieve proven SQL patterns, table cheatsheets, and join patterns from the query archaeology store so agents reuse validated work instead of writing SQL from scratch.
Read .knowledge/query-archaeology/curated/index.yaml. Parse counters:
cookbook_entries, table_cheatsheets, join_patterns.
If all three are zero (or the file is missing), stop here. Return nothing and do not mention archaeology to the user.
From the current analysis context, extract:
orders, events)funnel, retention, revenue, cohort)Search each store that has entries (per index counts). Match using
case-insensitive substring -- order matches orders, order_items.
curated/cookbook/*.yaml)For each file, check:
tables array -- any element contains a search table name as substring?tags array -- any element matches a query intent tag?Extract on match: title, sql, tables, tags, and any caveats/notes.
curated/tables/*.yaml)For each file, check:
table_name contains a search table name as substring?Extract on match: table_name, grain, primary_key, common_filters,
gotchas, common_joins.
curated/joins/*.yaml)For each file, check:
tables array -- at least two elements match search table names?tables contains it as substring.Extract on match: tables, join_sql, cardinality, notes, validated.
Return matched entries as a fenced context block. Omit sections with no matches.
--- QUERY ARCHAEOLOGY CONTEXT ---
## Cookbook Patterns
### {title}
Tables: {tables} | Tags: {tags}
```sql
{sql}
Caveats: {caveats or "none"}
Cardinality: {cardinality} | Validated: {validated}
{join_sql}
Notes: {notes}
--- END ARCHAEOLOGY CONTEXT ---
### Step 5: Agent Handoff
Pass the formatted block as additional context to the analysis agent. The
agent should prefer archaeology SQL over writing from scratch, respect any
gotchas listed, and note in working files when an archaeology pattern was used.
## Anti-Patterns
1. **Never mention archaeology when the store is empty** -- silent skip
2. **Never require exact matches** -- always substring so `order` finds `orders`
3. **Never load all files eagerly** -- check index counts first, skip zero stores
4. **Never modify archaeology files** -- this skill is read-only
5. **Never block analysis if retrieval fails** -- archaeology is additive, not a gate
testing
# Skill: {{BLANK_1_SKILL_NAME}} ## Purpose {{BLANK_2_WHEN_TO_FIRE}} ## When to Use Fires automatically when the user asks Claude to do something that matches the trigger condition above. ## Instructions 1. Detect the trigger condition 2. Execute your guardrail check 3. If the check matters, print a clear, visible warning with "{{BLANK_3_SIGNATURE_PHRASE}}" as the first line 4. Continue with the analysis, incorporating the warning into the output ## Anti-Patterns - Do not fire when the condit
development
# Skill: Visualization Patterns ## Purpose Ensure every chart Claude Code produces follows high-quality design standards with named themes, consistent styling, and clear data communication. ## When to Use Apply this skill whenever generating a chart, graph, or data visualization. Always apply the active theme unless the user specifies otherwise. Default theme: `minimal`. ## Instructions ### Pre-flight: Load Learnings Before executing, check `.knowledge/learnings/index.md` for relevant entrie
development
# Skill: Triangulation / Sanity Check ## Purpose Cross-reference analytical findings against multiple data sources, external benchmarks, and common sense to catch errors before they become bad decisions. ## When to Use Apply this skill after every analysis, before presenting findings to stakeholders, and whenever a result seems surprising. If a finding would change a decision, it MUST be triangulated first. ## Instructions ### Triangulation Framework Every finding gets checked through four
data-ai
# Skill: Tracking Gap Identification ## Purpose Assess whether the data needed for an analysis actually exists, identify what's missing, and produce prioritized instrumentation requests for engineering when gaps are found. ## When to Use Apply this skill after the Data Explorer agent inventories available data, when an analysis requires data that might not exist, or when initial query results suggest incomplete tracking. Run before committing to an analysis approach. ## Instructions ### Gap