Teach
Purpose
Learn a reusable pattern from an example file. The user shows you a well-written artifact (model, query, config), and you extract the patterns worth following.
Workflow
Identify the file: The user provides a file reference (e.g., @models/staging/stg_orders.sql). Read the file.
Analyze patterns: Extract the structural patterns, NOT the specific content. Focus on:
- File structure and organization (sections, ordering)
- Naming conventions (prefixes, suffixes, casing)
- SQL patterns (CTE vs subquery, join style, column ordering)
- dbt conventions (materialization, tests, config blocks)
- Common boilerplate (headers, comments, imports)
- Data type choices
- Error handling patterns
Present findings: Show the user what you learned in a structured list. Be specific:
- Good: "Column order: keys first, then dimensions, then measures, then timestamps"
- Bad: "Good column ordering"
Ask for confirmation: Let the user confirm, modify, or reject your findings before saving.
Save via training_save: Use the training_save tool with:
kind: "pattern"
name: A descriptive slug (e.g., "staging-model", "incremental-config")
content: The extracted patterns as a concise, actionable checklist
scope: "project" (default — shared with team via git)
source: The file path you learned from
citations: Reference to the source file
Important Guidelines
- Extract PATTERNS, not content. "Use
{{ source() }} macro" is a pattern. "Query the orders table" is content.
- Keep it concise — max 10 bullet points per pattern. If more are needed, split into multiple patterns.
- Use the file's actual conventions, don't impose your own preferences.
- If the file doesn't have clear patterns worth learning, say so honestly.
- Do NOT make any LLM calls beyond the normal conversation flow — pattern extraction happens in your analysis, not via separate API calls.
Usage Examples
/teach @models/staging/stg_orders.sql
/teach staging-model @models/staging/stg_customers.sql
/teach @dbt_project.yml
If the user provides a name (first argument before the @file), use that as the pattern name. Otherwise, infer a name from the file type and purpose.
1---2name: teach3description: Teach your AI teammate a pattern by showing it an example file from your codebase4metadata:5 source: https://skillmd.com/skills/altimateai-altimate-code/teach6---78# Teach910## Purpose11Learn a reusable pattern from an example file. The user shows you a well-written artifact (model, query, config), and you extract the patterns worth following.1213## Workflow14151. **Identify the file**: The user provides a file reference (e.g., `@models/staging/stg_orders.sql`). Read the file.16172. **Analyze patterns**: Extract the structural patterns, NOT the specific content. Focus on:18 - File structure and organization (sections, ordering)19 - Naming conventions (prefixes, suffixes, casing)20 - SQL patterns (CTE vs subquery, join style, column ordering)21 - dbt conventions (materialization, tests, config blocks)22 - Common boilerplate (headers, comments, imports)23 - Data type choices24 - Error handling patterns25263. **Present findings**: Show the user what you learned in a structured list. Be specific:27 - Good: "Column order: keys first, then dimensions, then measures, then timestamps"28 - Bad: "Good column ordering"29304. **Ask for confirmation**: Let the user confirm, modify, or reject your findings before saving.31325. **Save via training_save**: Use the `training_save` tool with:33 - `kind`: "pattern"34 - `name`: A descriptive slug (e.g., "staging-model", "incremental-config")35 - `content`: The extracted patterns as a concise, actionable checklist36 - `scope`: "project" (default — shared with team via git)37 - `source`: The file path you learned from38 - `citations`: Reference to the source file3940## Important Guidelines4142- Extract PATTERNS, not content. "Use `{{ source() }}` macro" is a pattern. "Query the orders table" is content.43- Keep it concise — max 10 bullet points per pattern. If more are needed, split into multiple patterns.44- Use the file's actual conventions, don't impose your own preferences.45- If the file doesn't have clear patterns worth learning, say so honestly.46- Do NOT make any LLM calls beyond the normal conversation flow — pattern extraction happens in your analysis, not via separate API calls.4748## Usage Examples4950```51/teach @models/staging/stg_orders.sql52/teach staging-model @models/staging/stg_customers.sql53/teach @dbt_project.yml54```5556If the user provides a name (first argument before the @file), use that as the pattern name. Otherwise, infer a name from the file type and purpose.