Skip to content

Commit 0df36f6

Browse files
committed
improvement(skills): add final validation steps to add-tools, add-block, and add-integration skills
1 parent 0fe1cdd commit 0df36f6

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

.claude/commands/add-block.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,3 +801,16 @@ All tool IDs referenced in `tools.access` and returned by `tools.config.tool` MU
801801
- [ ] If triggers exist: `triggers` config set, trigger subBlocks spread
802802
- [ ] Optional/rarely-used fields set to `mode: 'advanced'`
803803
- [ ] Timestamps and complex inputs have `wandConfig` enabled
804+
805+
## Final Validation (Required)
806+
807+
After creating the block, you MUST validate it against every tool it references:
808+
809+
1. **Read every tool definition** that appears in `tools.access` — do not skip any
810+
2. **For each tool, verify the block has correct:**
811+
- SubBlock inputs that cover all required tool params (with correct `condition` to show for that operation)
812+
- SubBlock input types that match the tool param types (e.g., dropdown for enums, short-input for strings)
813+
- `tools.config.params` correctly maps subBlock IDs to tool param names (if they differ)
814+
- Type coercions in `tools.config.params` for any params that need conversion (Number(), Boolean(), JSON.parse())
815+
3. **Verify block outputs** cover the key fields returned by all tools
816+
4. **Verify conditions** — each subBlock should only show for the operations that actually use it

.claude/commands/add-integration.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,12 @@ If creating V2 versions (API-aligned outputs):
437437
- [ ] Ran `bun run scripts/generate-docs.ts`
438438
- [ ] Verified docs file created
439439

440+
### Final Validation (Required)
441+
- [ ] Read every tool file and cross-referenced inputs/outputs against the API docs
442+
- [ ] Verified block subBlocks cover all required tool params with correct conditions
443+
- [ ] Verified block outputs match what the tools actually return
444+
- [ ] Verified `tools.config.params` correctly maps and coerces all param types
445+
440446
## Example Command
441447

442448
When the user asks to add an integration:

.claude/commands/add-tools.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,3 +300,22 @@ All tool IDs MUST use `snake_case`: `{service}_{action}` (e.g., `x_create_tweet`
300300
- [ ] No raw JSON dumps in outputs
301301
- [ ] Types file has all interfaces
302302
- [ ] Index.ts exports all tools
303+
304+
## Final Validation (Required)
305+
306+
After creating all tools, you MUST validate every tool before finishing:
307+
308+
1. **Read every tool file** you created — do not skip any
309+
2. **Cross-reference with the API docs** to verify:
310+
- All required params are marked `required: true`
311+
- All optional params are marked `required: false`
312+
- Param types match the API (string, number, boolean, json)
313+
- Request URL, method, headers, and body match the API spec
314+
- `transformResponse` extracts the correct fields from the API response
315+
- All output fields match what the API actually returns
316+
- No fields are missing from outputs that the API provides
317+
- No extra fields are defined in outputs that the API doesn't return
318+
3. **Verify consistency** across tools:
319+
- Shared types in `types.ts` match all tools that use them
320+
- Tool IDs in the barrel export match the tool file definitions
321+
- Error handling is consistent (logger imports, error checks)

0 commit comments

Comments
 (0)