Skills › Knowledge Work Plugins › data-context-extractor › skill-template.md
skill-template.md
148 lines · data/skills/data-context-extractor/references/skill-template.md at 2574e29
1# Generated Skill Template
3Use this template when generating a new data analysis skill. Replace all `[PLACEHOLDER]` values.
5---
7```markdown
8---
9name: [company]-data-analyst
10description: "[COMPANY] data analysis skill. Provides context for querying [WAREHOUSE_TYPE] including entity definitions, metric calculations, and common query patterns. Use when analyzing [COMPANY] data for: (1) [PRIMARY_USE_CASE_1], (2) [PRIMARY_USE_CASE_2], (3) [PRIMARY_USE_CASE_3], or any data questions requiring [COMPANY]-specific context."
11---
13# [COMPANY] Data Analysis
15## SQL Dialect: [WAREHOUSE_TYPE]
17[INSERT APPROPRIATE DIALECT SECTION FROM sql-dialects.md]
19---
21## Entity Disambiguation
23When users mention these terms, clarify which entity they mean:
25[EXAMPLE FORMAT - customize based on discovery:]
27**"User" can mean:**
28- **Account**: An individual login/profile ([PRIMARY_TABLE]: [ID_FIELD])
29- **Organization**: A billing entity that can have multiple accounts ([ORG_TABLE]: [ORG_ID])
30- **[OTHER_TYPE]**: [DEFINITION] ([TABLE]: [ID])
32**Relationships:**
33- [ENTITY_1] → [ENTITY_2]: [RELATIONSHIP_TYPE] (join on [JOIN_KEY])
35---
37## Business Terminology
39| Term | Definition | Notes |
40|------|------------|-------|
41| [TERM_1] | [DEFINITION] | [CONTEXT/GOTCHA] |
42| [TERM_2] | [DEFINITION] | [CONTEXT/GOTCHA] |
43| [ACRONYM] | [FULL_NAME] - [EXPLANATION] | |
45---
47## Standard Filters
49Always apply these filters unless explicitly told otherwise:
51```sql
52-- Exclude test/internal data
53WHERE [TEST_FLAG_COLUMN] = FALSE
54 AND [INTERNAL_FLAG_COLUMN] = FALSE
56-- Exclude invalid/fraud
57 AND [STATUS_COLUMN] != '[EXCLUDED_STATUS]'
59-- [OTHER STANDARD EXCLUSIONS]
60```
62**When to override:**
63- [SCENARIO_1]: Include [NORMALLY_EXCLUDED] when [CONDITION]
65---
67## Key Metrics
69### [METRIC_1_NAME]
70- **Definition**: [PLAIN_ENGLISH_EXPLANATION]
71- **Formula**: `[EXACT_CALCULATION]`
72- **Source**: `[TABLE_NAME].[COLUMN_NAME]`
73- **Time grain**: [DAILY/WEEKLY/MONTHLY]
74- **Caveats**: [EDGE_CASES_OR_GOTCHAS]
76### [METRIC_2_NAME]
77[REPEAT FORMAT]
79---
81## Data Freshness
83| Table | Update Frequency | Typical Lag |
84|-------|------------------|-------------|
85| [TABLE_1] | [FREQUENCY] | [LAG] |
86| [TABLE_2] | [FREQUENCY] | [LAG] |
88To check data freshness:
89```sql
90SELECT MAX([DATE_COLUMN]) as latest_data FROM [TABLE]
91```
93---
95## Knowledge Base Navigation
97Use these reference files for detailed table documentation:
99| Domain | Reference File | Use For |
100|--------|----------------|---------|
101| [DOMAIN_1] | `references/[domain1].md` | [BRIEF_DESCRIPTION] |
102| [DOMAIN_2] | `references/[domain2].md` | [BRIEF_DESCRIPTION] |
103| Entities | `references/entities.md` | Entity definitions and relationships |
104| Metrics | `references/metrics.md` | KPI calculations and formulas |
106---
108## Common Query Patterns
110### [PATTERN_1_NAME]
111```sql
112[SAMPLE_QUERY]
113```
115### [PATTERN_2_NAME]
116```sql
117[SAMPLE_QUERY]
118```
120---
122## Troubleshooting
124### Common Mistakes
125- **[MISTAKE_1]**: [EXPLANATION] → [CORRECT_APPROACH]
126- **[MISTAKE_2]**: [EXPLANATION] → [CORRECT_APPROACH]
128### Access Issues
129- If you encounter permission errors on `[TABLE]`: [WORKAROUND]
130- For PII-restricted columns: [ALTERNATIVE_APPROACH]
132### Performance Tips
133- Filter by `[PARTITION_COLUMN]` first to reduce data scanned
134- For large tables, use `LIMIT` during exploration
135- Prefer `[AGGREGATED_TABLE]` over `[RAW_TABLE]` when possible
136```
138---
Generated Skill Template
Use this template when generating a new data analysis skill. Replace all [PLACEHOLDER] values.
---
name: [company]-data-analyst
description: "[COMPANY] data analysis skill. Provides context for querying [WAREHOUSE_TYPE] including entity definitions, metric calculations, and common query patterns. Use when analyzing [COMPANY] data for: (1) [PRIMARY_USE_CASE_1], (2) [PRIMARY_USE_CASE_2], (3) [PRIMARY_USE_CASE_3], or any data questions requiring [COMPANY]-specific context."
---
# [COMPANY] Data Analysis
## SQL Dialect: [WAREHOUSE_TYPE]
[INSERT APPROPRIATE DIALECT SECTION FROM sql-dialects.md]
---
## Entity Disambiguation
When users mention these terms, clarify which entity they mean:
[EXAMPLE FORMAT - customize based on discovery:]
**"User" can mean:**
- **Account**: An individual login/profile ([PRIMARY_TABLE]: [ID_FIELD])
- **Organization**: A billing entity that can have multiple accounts ([ORG_TABLE]: [ORG_ID])
- **[OTHER_TYPE]**: [DEFINITION] ([TABLE]: [ID])
**Relationships:**
- [ENTITY_1] → [ENTITY_2]: [RELATIONSHIP_TYPE] (join on [JOIN_KEY])
---
## Business Terminology
| Term | Definition | Notes |
|------|------------|-------|
| [TERM_1] | [DEFINITION] | [CONTEXT/GOTCHA] |
| [TERM_2] | [DEFINITION] | [CONTEXT/GOTCHA] |
| [ACRONYM] | [FULL_NAME] - [EXPLANATION] | |
---
## Standard Filters
Always apply these filters unless explicitly told otherwise:
-- Exclude test/internal data WHERE [TEST_FLAG_COLUMN] = FALSE AND [INTERNAL_FLAG_COLUMN] = FALSE
-- Exclude invalid/fraud AND [STATUS_COLUMN] != '[EXCLUDED_STATUS]'
-- [OTHER STANDARD EXCLUSIONS]
**When to override:**
- [SCENARIO_1]: Include [NORMALLY_EXCLUDED] when [CONDITION]
---
## Key Metrics
### [METRIC_1_NAME]
- **Definition**: [PLAIN_ENGLISH_EXPLANATION]
- **Formula**: `[EXACT_CALCULATION]`
- **Source**: `[TABLE_NAME].[COLUMN_NAME]`
- **Time grain**: [DAILY/WEEKLY/MONTHLY]
- **Caveats**: [EDGE_CASES_OR_GOTCHAS]
### [METRIC_2_NAME]
[REPEAT FORMAT]
---
## Data Freshness
| Table | Update Frequency | Typical Lag |
|-------|------------------|-------------|
| [TABLE_1] | [FREQUENCY] | [LAG] |
| [TABLE_2] | [FREQUENCY] | [LAG] |
To check data freshness:SELECT MAX([DATE_COLUMN]) as latest_data FROM [TABLE]
---
## Knowledge Base Navigation
Use these reference files for detailed table documentation:
| Domain | Reference File | Use For |
|--------|----------------|---------|
| [DOMAIN_1] | `references/[domain1].md` | [BRIEF_DESCRIPTION] |
| [DOMAIN_2] | `references/[domain2].md` | [BRIEF_DESCRIPTION] |
| Entities | `references/entities.md` | Entity definitions and relationships |
| Metrics | `references/metrics.md` | KPI calculations and formulas |
---
## Common Query Patterns
### [PATTERN_1_NAME][SAMPLE_QUERY]
### [PATTERN_2_NAME][SAMPLE_QUERY]
---
## Troubleshooting
### Common Mistakes
- **[MISTAKE_1]**: [EXPLANATION] → [CORRECT_APPROACH]
- **[MISTAKE_2]**: [EXPLANATION] → [CORRECT_APPROACH]
### Access Issues
- If you encounter permission errors on `[TABLE]`: [WORKAROUND]
- For PII-restricted columns: [ALTERNATIVE_APPROACH]
### Performance Tips
- Filter by `[PARTITION_COLUMN]` first to reduce data scanned
- For large tables, use `LIMIT` during exploration
- Prefer `[AGGREGATED_TABLE]` over `[RAW_TABLE]` when possibleRaw lines 1 to 139
140## Customization Notes
142When generating a skill:
1441. **Fill all placeholders** - Don't leave any `[PLACEHOLDER]` text
1452. **Remove unused sections** - If they don't have dashboards, remove that section
1463. **Add specificity** - Generic advice is less useful than specific column names and values
1474. **Include real examples** - Sample queries should use actual table/column names
1485. **Keep it scannable** - Use tables and code blocks liberally
Customization Notes
When generating a skill:
- Fill all placeholders - Don't leave any
[PLACEHOLDER]text - Remove unused sections - If they don't have dashboards, remove that section
- Add specificity - Generic advice is less useful than specific column names and values
- Include real examples - Sample queries should use actual table/column names
- Keep it scannable - Use tables and code blocks liberally