Skip to content

Commit 2f4023a

Browse files
committed
Align all skills to best practices: ⚠️ stopping points, Output sections, updated templates
- Update CONTRIBUTING.md with skill best practices section covering required sections, stopping point format, Phase 0 consent pattern, line budget, and automation pipeline steps - Rewrite both TEMPLATE/SKILL.md files with best-practices structure - Add ⚠️ MANDATORY STOPPING POINT markers to all 17 action skills (replacing informal **STOP** and > **STOP.** variants) - Add ## Output section to 8 skills that were missing it - Add ## Stopping Points section to docker-dev-setup, drizzle-orm-setup - Sync all agent rules (cursor, claude, windsurf, gemini)
1 parent 975c24b commit 2f4023a

68 files changed

Lines changed: 827 additions & 238 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/rules/cortex-agents.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Present the following briefing to the user:
7575
>
7676
> Ready to proceed?
7777
78-
**STOP** — Wait for user approval before continuing.
78+
**⚠️ MANDATORY STOPPING POINT**: Wait for user approval before continuing.
7979
8080
---
8181
@@ -344,6 +344,12 @@ GRANT USAGE ON AGENT {{DATABASE}}.{{SCHEMA}}.{{AGENT_NAME}} TO ROLE {{CONSUMER_R
344344
GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO ROLE {{ROLE}};
345345
```
346346

347+
## Output
348+
349+
- A Cortex Agent object that routes natural language questions to the appropriate tool (Analyst, Search, or custom UDFs)
350+
- Supporting prerequisites: a semantic view for structured data and a Cortex Search Service for unstructured data
351+
- Tested agent responses demonstrating multi-tool orchestration across the user's data sources
352+
347353
## Agent Lifecycle
348354

349355
```sql

.claude/rules/cortex-ai-pipeline.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Present the following briefing to the user:
7070
>
7171
> Ready to proceed?
7272
73-
**STOP** Wait for user approval before continuing.
73+
**⚠️ MANDATORY STOPPING POINT**: Wait for user approval before continuing.
7474

7575
---
7676

@@ -87,7 +87,7 @@ Where should I set up the AI pipeline?
8787
- Use demo data or your own table?
8888
```
8989

90-
**STOP** Wait for response.
90+
**⚠️ MANDATORY STOPPING POINT**: Wait for response.
9191

9292
If user has their own table, ask which text column(s) to enrich and skip the demo data setup in Step 2.
9393

@@ -244,6 +244,12 @@ LIMIT 10;
244244

245245
The newer `AI_*` functions (AI_CLASSIFY, AI_SENTIMENT, etc.) are the recommended namespace. The legacy `SNOWFLAKE.CORTEX.*` functions (COMPLETE, SENTIMENT, SUMMARIZE, TRANSLATE, EXTRACT_ANSWER) still work but the `AI_*` versions have more features including image and multi-label support.
246246

247+
## Output
248+
249+
- An `ENRICHED_TICKETS` table (or enriched version of the user's table) with AI-generated columns: category, sentiment score, summary, and extracted fields
250+
- Cross-row aggregated insights via AI_AGG summarizing themes and recurring patterns
251+
- Optional custom AI_COMPLETE analysis and translations for multilingual data
252+
247253
## Access Control
248254

249255
All Cortex AI Functions require the `SNOWFLAKE.CORTEX_USER` database role. Grant it with:

.claude/rules/cortex-mcp-server.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Present the following briefing to the user:
7777
>
7878
> Ready to proceed?
7979
80-
**STOP** — Wait for user approval before continuing.
80+
**⚠️ MANDATORY STOPPING POINT**: Wait for user approval before continuing.
8181
8282
---
8383
@@ -102,7 +102,7 @@ Also:
102102
- MCP Server name: (e.g., MY_MCP_SERVER)
103103
```
104104
105-
**STOP** — Wait for response.
105+
**⚠️ MANDATORY STOPPING POINT**: Wait for response.
106106
107107
---
108108
@@ -171,7 +171,7 @@ CREATE OR REPLACE MCP SERVER {{DATABASE}}.{{SCHEMA}}.{{MCP_SERVER_NAME}}
171171
$$;
172172
```
173173

174-
**STOP** Show spec to user. Ask: "MCP server spec looks good?"
174+
**⚠️ MANDATORY STOPPING POINT**: Show spec to user. Ask: "MCP server spec looks good?"
175175

176176
---
177177

@@ -249,7 +249,7 @@ Add to `claude_desktop_config.json`:
249249
}
250250
```
251251

252-
**STOP** Help user connect their MCP client and test tool discovery.
252+
**⚠️ MANDATORY STOPPING POINT**: Help user connect their MCP client and test tool discovery.
253253

254254
---
255255

@@ -323,3 +323,9 @@ DESCRIBE MCP SERVER {{DATABASE}}.{{SCHEMA}}.{{MCP_SERVER_NAME}};
323323
-- Drop server
324324
DROP MCP SERVER IF EXISTS {{DATABASE}}.{{SCHEMA}}.{{MCP_SERVER_NAME}};
325325
```
326+
327+
## Output
328+
329+
- A Snowflake-managed MCP SERVER object exposing the user's chosen tools (Analyst, Search, Agent, SQL, custom UDFs)
330+
- RBAC grants configured for both server-level and tool-level access control
331+
- Client connection instructions with authentication setup (OAuth or PAT) ready for use in any MCP-compatible AI client

.claude/rules/cortex-search-rag.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Present the following briefing to the user:
7474
>
7575
> Ready to proceed?
7676
77-
**STOP** — Wait for user approval before continuing.
77+
**⚠️ MANDATORY STOPPING POINT**: Wait for user approval before continuing.
7878
7979
---
8080
@@ -92,7 +92,7 @@ Where should I set up the RAG pipeline?
9292
- If your own table: which column contains the searchable text?
9393
```
9494
95-
**STOP** — Wait for response.
95+
**⚠️ MANDATORY STOPPING POINT**: Wait for response.
9696
9797
If user has their own table, adapt the search service to use their text column. They must have change tracking enabled on the table (`ALTER TABLE ... SET CHANGE_TRACKING = TRUE`).
9898
@@ -159,7 +159,7 @@ SELECT PARSE_JSON(
159159
)['results'] AS search_results;
160160
```
161161

162-
**STOP** Show search results to user. Ask: "Search looks good? Ready to build the RAG pipeline?"
162+
**⚠️ MANDATORY STOPPING POINT**: Show search results to user. Ask: "Search looks good? Ready to build the RAG pipeline?"
163163

164164
---
165165

@@ -228,7 +228,7 @@ Test with several questions to check quality:
228228
-- 3. "What shipping options are available?"
229229
```
230230

231-
**STOP** Show results. Ask if the user wants to:
231+
**⚠️ MANDATORY STOPPING POINT**: Show results. Ask if the user wants to:
232232
1. Adjust the number of retrieved documents (limit)
233233
2. Add attribute filtering (e.g., only search specific categories)
234234
3. Try a different LLM model
@@ -314,3 +314,9 @@ SHOW CORTEX SEARCH SERVICES IN SCHEMA {{DATABASE}}.{{SCHEMA}};
314314
-- Manually refresh (usually not needed — auto-refresh handles it)
315315
ALTER CORTEX SEARCH SERVICE {{DATABASE}}.{{SCHEMA}}.KB_SEARCH_SERVICE RESUME;
316316
```
317+
318+
## Output
319+
320+
- A Cortex Search Service with hybrid keyword + vector search over the user's data
321+
- A tested RAG query template that retrieves relevant documents and generates grounded answers via AI_COMPLETE
322+
- Working SQL patterns for filtered search, attribute-based narrowing, and Python API integration

.claude/rules/data-product-sharing.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ FROM raw_table
9999
WHERE is_public = TRUE; -- row-level filtering
100100
```
101101

102-
**STOP**: Confirm which objects to share before proceeding.
102+
**⚠️ MANDATORY STOPPING POINT**: Confirm which objects to share before proceeding.
103103

104104
### Step 3: Create Share or Listing
105105

@@ -199,6 +199,12 @@ When sharing with accounts in different regions, Snowflake automatically replica
199199

200200
---
201201

202+
## Output
203+
204+
- A configured Snowflake share or listing granting consumers live, read-only access to the specified tables/views
205+
- Consumer-side SQL to mount the shared database and verify data access
206+
- End-to-end verification confirming provider and consumer can query shared objects
207+
202208
## Stopping Points
203209

204210
- **Step 2**: Confirm which objects to share

.claude/rules/docker-dev-setup.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ docker-dev-setup/
4343
└── devcontainer.json # VS Code Dev Container config
4444
```
4545

46+
## Stopping Points
47+
48+
- Phase 1: User confirms stack, entry point, and services before Dockerfile creation
49+
- Phase 2: User reviews Dockerfile and verifies it builds
50+
- Phase 3: User confirms Compose setup and verifies it starts
51+
- Phase 4: User confirms Dev Container config and tests it
52+
4653
## Workflow
4754

4855
Follow these phases in order. **Stop after each phase** to confirm with the user before continuing.
@@ -78,7 +85,7 @@ Follow these phases in order. **Stop after each phase** to confirm with the user
7885
- Go → `Dockerfile.go`
7986
- Other → Use `references/dockerfile-patterns.md` to build from scratch
8087

81-
> **STOP.** Confirm the stack, entry point, and which services the user needs.
88+
**⚠️ MANDATORY STOPPING POINT**: Confirm the stack, entry point, and which services the user needs.
8289

8390
---
8491

@@ -106,7 +113,7 @@ Follow these phases in order. **Stop after each phase** to confirm with the user
106113
- Use `npm ci` not `npm install` in Docker builds
107114
- For Go: `CGO_ENABLED=0` for static binaries that run on `scratch`
108115

109-
> **STOP.** Review the Dockerfile with the user. Verify it builds: `docker build -t app .`
116+
**⚠️ MANDATORY STOPPING POINT**: Review the Dockerfile with the user. Verify it builds: `docker build -t app .`
110117

111118
---
112119

@@ -153,7 +160,7 @@ Follow these phases in order. **Stop after each phase** to confirm with the user
153160
- Set environment variables via `environment:` block, not `.env` files in the image
154161
- Use `restart: unless-stopped` for infrastructure services
155162

156-
> **STOP.** Confirm the Compose setup. Verify it starts: `docker compose up`
163+
**⚠️ MANDATORY STOPPING POINT**: Confirm the Compose setup. Verify it starts: `docker compose up`
157164

158165
---
159166

@@ -182,7 +189,7 @@ Follow these phases in order. **Stop after each phase** to confirm with the user
182189
}
183190
```
184191

185-
> **STOP.** Confirm the Dev Container config. Test by reopening in container.
192+
**⚠️ MANDATORY STOPPING POINT**: Confirm the Dev Container config. Test by reopening in container.
186193

187194
---
188195

.claude/rules/drizzle-orm-setup.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ drizzle-orm-setup/
4040
└── db.ts # Database client setup
4141
```
4242

43+
## Stopping Points
44+
45+
- Phase 1: User confirms dialect, driver, and schema organization
46+
- Phase 2: User reviews schema structure, column types, and relations
47+
- Phase 3: User confirms client setup and DATABASE_URL configuration
48+
- Phase 4: User confirms migrations ran successfully
49+
4350
## Workflow
4451

4552
Follow these four phases in order. **Stop after each phase** to confirm with the user before continuing.
@@ -72,7 +79,7 @@ Follow these four phases in order. **Stop after each phase** to confirm with the
7279
- Single `schema.ts` file (small projects)
7380
- `schema/` directory with one file per table (recommended for >3 tables)
7481

75-
> **STOP.** Confirm dialect, driver, and schema organization with the user.
82+
**⚠️ MANDATORY STOPPING POINT**: Confirm dialect, driver, and schema organization with the user.
7683

7784
---
7885

@@ -110,7 +117,7 @@ Follow these four phases in order. **Stop after each phase** to confirm with the
110117
- Always define BOTH sides of a relation (e.g., `users → many(posts)` AND `posts → one(users)`).
111118
- Use `$onUpdateFn(() => new Date())` for `updatedAt` columns, NOT database-level triggers.
112119

113-
> **STOP.** Review the schema with the user. Confirm table structure, column types, and relations.
120+
**⚠️ MANDATORY STOPPING POINT**: Review the schema with the user. Confirm table structure, column types, and relations.
114121

115122
---
116123

@@ -172,7 +179,7 @@ Follow these four phases in order. **Stop after each phase** to confirm with the
172179
}
173180
```
174181

175-
> **STOP.** Confirm the client setup and config. Verify the DATABASE_URL is available (env var, .env file, etc.).
182+
**⚠️ MANDATORY STOPPING POINT**: Confirm the client setup and config. Verify the DATABASE_URL is available (env var, .env file, etc.).
176183

177184
---
178185

@@ -214,7 +221,7 @@ Follow these four phases in order. **Stop after each phase** to confirm with the
214221
- Migration files are append-only. Don't edit generated SQL files.
215222
- The `./drizzle/meta/` directory tracks migration state. Commit it to version control.
216223

217-
> **STOP.** Confirm migrations ran successfully. Check for any errors.
224+
**⚠️ MANDATORY STOPPING POINT**: Confirm migrations ran successfully. Check for any errors.
218225

219226
---
220227

.claude/rules/dynamic-tables-pipeline.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Present the following briefing to the user:
6969
7070
Ask the user: **"Shall I proceed with Step 1 (Gather Target Details)?"**
7171

72-
Do NOT proceed until the user confirms.
72+
**⚠️ MANDATORY STOPPING POINT**: Do NOT proceed until the user confirms.
7373

7474
---
7575

@@ -86,7 +86,7 @@ Propose defaults and let the user override:
8686
| **Warehouse** | `COMPUTE_WH` | Any X-Small is fine |
8787
| **Role** | `ACCOUNTADMIN` | Must have CREATE DYNAMIC TABLE privilege |
8888

89-
Confirm with the user before proceeding.
89+
**⚠️ MANDATORY STOPPING POINT**: Confirm with the user before proceeding.
9090

9191
---
9292

.claude/rules/iceberg-tables.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Present the following briefing to the user:
7474
7575
Ask the user: **"Shall I proceed with Step 1 (Choose Catalog Type)?"**
7676

77-
Do NOT proceed until the user confirms.
77+
**⚠️ MANDATORY STOPPING POINT**: Do NOT proceed until the user confirms.
7878

7979
---
8080

@@ -92,7 +92,7 @@ Ask the user which approach to use:
9292

9393
Default recommendation: **Snowflake-managed** unless the user has a specific external catalog requirement.
9494

95-
Confirm the user's choice before proceeding.
95+
**⚠️ MANDATORY STOPPING POINT**: Confirm the user's choice before proceeding.
9696

9797
---
9898

@@ -114,7 +114,7 @@ The user must update their IAM role trust policy with the values from:
114114
- `STORAGE_AWS_IAM_USER_ARN`
115115
- `STORAGE_AWS_EXTERNAL_ID`
116116

117-
Do NOT proceed until the user confirms the trust policy is updated.
117+
**⚠️ MANDATORY STOPPING POINT**: Do NOT proceed until the user confirms the trust policy is updated.
118118

119119
**Alternative for demo/testing:** If the user just wants to try Iceberg tables and already has an external volume set at the account or database level, skip this step.
120120

@@ -163,7 +163,7 @@ Verify:
163163
SHOW ICEBERG TABLES IN SCHEMA {{DATABASE}}.{{SCHEMA}};
164164
```
165165

166-
Confirm with the user that the table was created.
166+
**⚠️ MANDATORY STOPPING POINT**: Confirm with the user that the table was created.
167167

168168
---
169169

.claude/rules/ml-model-registry.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Present the following briefing to the user:
7373
>
7474
> Ready to proceed?
7575
76-
**STOP** — Wait for user approval before continuing.
76+
**⚠️ MANDATORY STOPPING POINT**: Wait for user approval before continuing.
7777
7878
---
7979
@@ -92,7 +92,7 @@ Let me set up the ML pipeline. A few questions:
9292
- Use demo data or your own dataset?
9393
```
9494
95-
**STOP** — Wait for response.
95+
**⚠️ MANDATORY STOPPING POINT**: Wait for response.
9696
9797
If the user has their own data, ask about:
9898
- Target column (what to predict)
@@ -156,7 +156,7 @@ mv = reg.log_model(
156156
predictions = mv.run(X_test)
157157
```
158158

159-
**STOP** Show model metrics to user. Ask if they're satisfied or want to retrain with different parameters.
159+
**⚠️ MANDATORY STOPPING POINT**: Show model metrics to user. Ask if they're satisfied or want to retrain with different parameters.
160160

161161
---
162162

@@ -205,7 +205,7 @@ Your model is registered. How would you like to run inference?
205205
3. Both — Register for warehouse now, deploy service later
206206
```
207207

208-
**STOP** Wait for response.
208+
**⚠️ MANDATORY STOPPING POINT**: Wait for response.
209209

210210
### Warehouse Inference
211211

@@ -240,6 +240,12 @@ mv.create_service(
240240

241241
---
242242

243+
## Output
244+
245+
- A trained ML model registered in Snowflake Model Registry with version tracking and logged metrics
246+
- Warehouse-based SQL inference or an SPCS REST endpoint for real-time predictions
247+
- Access control grants so analysts can run inference without managing model artifacts
248+
243249
## Supported Frameworks
244250

245251
| Framework | log_model() Support | Notes |

0 commit comments

Comments
 (0)