Skip to content

Commit 32c5822

Browse files
committed
Update CONTRIBUTING.md for current conventions
1 parent ecdf414 commit 32c5822

1 file changed

Lines changed: 33 additions & 72 deletions

File tree

CONTRIBUTING.md

Lines changed: 33 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Contributing to dbt CLI Skills
1+
# Contributing to dbt Agent Skills
22

3-
Thank you for your interest in contributing dbt CLI skills! This guide will help you create, improve, and submit skills that help AI agents work effectively with dbt.
3+
Thank you for your interest in contributing to dbt Agent Skills! This guide will help you create, improve, and submit skills that help AI agents work effectively with dbt.
44

55
## Table of Contents
66

@@ -17,7 +17,7 @@ Thank you for your interest in contributing dbt CLI skills! This guide will help
1717

1818
## About this Repository
1919

20-
This repository contains Agent Skills specifically for dbt CLI operations. Skills follow the [Agent Skills specification](https://agentskills.io/specification) and help AI agents execute dbt commands, understand workflows, and troubleshoot issues.
20+
This repository contains Agent Skills for working with dbt. Skills follow the [Agent Skills specification](https://agentskills.io/specification) and help AI agents build models, create semantic layers, troubleshoot platform issues, and more.
2121

2222
## How to Contribute
2323

@@ -105,10 +105,10 @@ deactivate
105105

106106
### 1. Create the Skill Folder
107107

108-
Create a new folder with a descriptive name using kebab-case:
108+
Create a new folder with a descriptive name using **gerund form** (verb + -ing):
109109

110110
```bash
111-
mkdir -p skills/run-incremental-models
111+
mkdir -p skills/running-incremental-models
112112
```
113113

114114
### 2. Create SKILL.md
@@ -117,29 +117,24 @@ Every skill must have a `SKILL.md` file following the Agent Skills specification
117117

118118
```markdown
119119
---
120-
name: run-incremental-models
121-
description: Execute dbt incremental models with proper refresh strategies
120+
name: running-incremental-models
121+
description: Use when running incremental dbt models or deciding between incremental and full refresh strategies
122+
user-invocable: false
123+
metadata:
124+
author: dbt-labs
122125
---
123126

124-
# Run Incremental Models
127+
# Running Incremental Models
125128

126129
This skill helps agents execute incremental dbt models effectively, understanding when to use full refresh and how to handle incremental logic.
127130

128131
## When to Use
129132

130-
Use this skill when:
131133
- Running specific incremental models
132134
- Forcing a full refresh of incremental models
133135
- Testing incremental logic after changes
134136
- Rebuilding corrupted incremental tables
135137

136-
## Prerequisites
137-
138-
- dbt Core or dbt Cloud CLI installed
139-
- Active dbt project with `dbt_project.yml`
140-
- Configured database connection in `profiles.yml`
141-
- At least one incremental model in the project
142-
143138
## Commands
144139

145140
### Run All Incremental Models
@@ -152,56 +147,20 @@ dbt run --select config.materialized:incremental
152147
dbt run --select config.materialized:incremental --full-refresh
153148
\`\`\`
154149

155-
### Run Specific Incremental Model
156-
\`\`\`bash
157-
dbt run --select model_name --full-refresh
158-
\`\`\`
159-
160-
## Examples
161-
162-
### Scenario 1: Daily Incremental Run
163-
\`\`\`bash
164-
# Run only incremental models for daily refresh
165-
dbt run --select config.materialized:incremental
166-
\`\`\`
167-
168-
### Scenario 2: Fix Corrupted Incremental Table
169-
\`\`\`bash
170-
# Full refresh a specific model to rebuild from scratch
171-
dbt run --select my_incremental_model --full-refresh
172-
\`\`\`
173-
174-
### Scenario 3: Test Incremental Logic
175-
\`\`\`bash
176-
# Run with full refresh on a subset
177-
dbt run --select my_incremental_model+ --full-refresh
178-
\`\`\`
179-
180-
## Common Issues
181-
182-
- **Incremental logic not working**: Use `--full-refresh` to rebuild
183-
- **Performance issues**: Check incremental predicates and unique keys
184-
- **Missing records**: Verify the incremental strategy matches your use case
185-
186-
## Related Commands
187-
188-
- `dbt build --select config.materialized:incremental` - Build with tests
189-
- `dbt run --select state:modified+ --state ./target` - Run changed incrementals
190-
- `dbt compile --select model_name` - Check compiled SQL
191-
192-
## Notes
150+
## Common Mistakes
193151

194-
- Full refresh can be expensive on large tables
195-
- Always test incremental logic in development first
196-
- Consider using `--full-refresh` when data quality issues are detected
152+
| Mistake | Fix |
153+
|---------|-----|
154+
| Running full refresh on large tables without need | Only use `--full-refresh` when data issues require it |
155+
| Not testing incremental logic in dev first | Always validate in development before production |
197156
```
198157

199158
### 3. Add Supporting Resources (Optional)
200159

201160
Include examples or helper content if needed:
202161

203162
```
204-
run-incremental-models/
163+
running-incremental-models/
205164
├── SKILL.md
206165
└── examples/
207166
├── incremental_model_example.sql
@@ -219,9 +178,9 @@ skills-ref validate skills/your-skill-name
219178

220179
### Naming Conventions
221180

222-
- **Folders**: Use kebab-case with dbt context (e.g., `dbt-run-models`, `dbt-test-selection`)
181+
- **Folders**: Use gerund form (verb + -ing) with kebab-case (e.g., `adding-dbt-unit-test`, `building-dbt-semantic-layer`)
223182
- **Files**: `SKILL.md` (uppercase), supporting files lowercase
224-
- **Skill names**: Must match folder name exactly - lowercase with hyphens (e.g., `run-models-with-selectors`)
183+
- **Skill names**: Must match folder name exactly - lowercase with hyphens
225184

226185
### Command Examples
227186

@@ -260,16 +219,22 @@ Required frontmatter in `SKILL.md`:
260219

261220
```yaml
262221
---
263-
name: skill-name-in-lowercase-with-hyphens
264-
description: One-sentence summary of functionality
222+
name: adding-something-useful
223+
description: Use when [specific trigger or use case]
224+
user-invocable: false
225+
metadata:
226+
author: dbt-labs
265227
---
266228
```
267229

268230
**Important**:
269231

270232
- The `name` field must be lowercase and use only letters, digits, and hyphens
271233
- The `name` must match the directory name exactly
272-
- Only these fields are allowed: `name`, `description`, `allowed-tools`, `compatibility`, `license`, `metadata`
234+
- Use gerund form for names (e.g., `adding-`, `building-`, `configuring-`)
235+
- Start descriptions with "Use when..." to help agents know when to trigger the skill
236+
- Set `user-invocable: false` unless the skill should appear as a slash command
237+
- Only these fields are allowed: `name`, `description`, `user-invocable`, `allowed-tools`, `compatibility`, `license`, `metadata`
273238

274239
## Troubleshooting
275240

@@ -286,15 +251,11 @@ source .venv/bin/activate
286251

287252
Need inspiration? Consider creating skills for:
288253

289-
- **Commands**: run, test, build, seed, snapshot, compile, parse, docs, source
290-
- **Selectors**: tag:, config:, source:, exposure:, path:, package:
291-
- **Graph operators**: +model, model+, +model+, @model
292-
- **State comparison**: state:modified, state:new
293-
- **Testing strategies**: schema tests, data tests, unit tests
294-
- **Debugging**: Compilation errors, adapter issues, macro problems
295-
- **Performance**: Optimization, profiling, troubleshooting slow models
296-
- **CI/CD**: Slim CI patterns, deployment workflows
297-
- **dbt Cloud**: CLI-specific commands and features
254+
- **Adapters**: Warehouse-specific patterns for Snowflake, BigQuery, Databricks, Redshift
255+
- **CI/CD**: Slim CI patterns, deployment workflows, PR automation
256+
- **Performance**: Query optimization, profiling slow models, warehouse cost management
257+
- **Packages**: Working with popular dbt packages (dbt-utils, dbt-expectations, etc.)
258+
- **Advanced patterns**: Incremental models, snapshots, custom materializations
298259

299260
## Resources
300261

0 commit comments

Comments
 (0)