.claude/skills/log-correction/SKILL.md
# Skill: Log Correction ## Purpose Record analyst mistakes and their fixes so future analyses learn from past errors. Manual counterpart to automatic feedback capture. ## When to Use - User says "log a correction", "that was wrong because...", or similar - Feedback-capture skill routes here for detailed correction entry - After discovering and fixing an error mid-analysis ## Instructions ### Step 1: Gather Details Extract from conversation context or ask the user: 1. **What was wrong?** —
npx skillsauth add ai-analyst-lab/ai-analyst .claude/skills/log-correctionInstall 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.
Record analyst mistakes and their fixes so future analyses learn from past errors. Manual counterpart to automatic feedback capture.
Extract from conversation context or ask the user:
critical (wrong numbers shared) | high (changes conclusions) | medium (directionally correct) | low (no impact)If any required field is unclear, ask the user. Do not guess severity.
Assign one category based on the error type:
| Category | Description |
|----------|-------------|
| sql | Wrong query — bad join, missing filter, incorrect aggregation |
| metric | Wrong metric definition — numerator/denominator error, wrong time window |
| schema | Wrong column or table reference — stale schema, misnamed field |
| logic | Flawed reasoning — Simpson's paradox missed, survivorship bias, wrong comparison |
| other | Anything that does not fit the above |
.knowledge/corrections/index.yaml using safe_read_yaml()last_correction_id is null, use CORR-001; otherwise
parse the numeric suffix, increment, and zero-pad to 3 digits.knowledge/corrections/log.template.yaml:- id: "CORR-{N}"
date: "{YYYY-MM-DD}"
severity: "{severity}"
category: "{category}"
dataset: "{dataset_name}"
tables: ["{table1}", "{table2}"]
description: "{what was wrong}"
fix: "{what the correct approach is}"
sql_before: "{original query, if applicable, else null}"
sql_after: "{corrected query, if applicable, else null}"
prevented_by: "{which validation layer should have caught this}"
.knowledge/corrections/log.yaml using safe_read_yaml()corrections listatomic_write_yaml().knowledge/corrections/index.yaml (already loaded in Step 3)total_correctionsby_severity.{severity} counterby_category.{category} (create the key if it does not exist)last_correction_id to the new IDlast_updated to today's dateatomic_write_yaml()Report to the user:
Correction logged: {id}
Severity: {severity} | Category: {category}
Description: {description}
Fix: {fix}
Future analyses will check for this pattern during validation.
log.yaml or index.yaml is missing or corrupt, create from scratch
with schema_version 1sql_before/sql_after should be trimmed to the relevant
clause, not the entire multi-hundred-line queryprevented_by should reference a specific validation layer: structural,
logical, business-rules, Simpson's check, or source tie-outsql_before and sql_after to nulldataset to "unknown" and note in descriptiontesting
# 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