Major restructure of the compounding-engineering plugin: ## Agents (24 total, now categorized) - review/ (10): architecture-strategist, code-simplicity-reviewer, data-integrity-guardian, dhh-rails-reviewer, kieran-rails-reviewer, kieran-python-reviewer, kieran-typescript-reviewer, pattern-recognition-specialist, performance-oracle, security-sentinel - research/ (4): best-practices-researcher, framework-docs-researcher, git-history-analyzer, repo-research-analyst - design/ (3): design-implementation-reviewer, design-iterator, figma-design-sync - workflow/ (6): bug-reproduction-validator, every-style-editor, feedback-codifier, lint, pr-comment-resolver, spec-flow-analyzer - docs/ (1): ankane-readme-writer ## Commands (15 total) - Moved workflow commands to commands/workflows/ subdirectory - Added: changelog, create-agent-skill, heal-skill, plan_review, prime, reproduce-bug, resolve_parallel, resolve_pr_parallel ## Skills (11 total) - Added: andrew-kane-gem-writer, codify-docs, create-agent-skills, dhh-ruby-style, dspy-ruby, every-style-editor, file-todos, frontend-design, git-worktree, skill-creator - Kept: gemini-imagegen 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
94 lines
2.1 KiB
Markdown
94 lines
2.1 KiB
Markdown
# Workflow: Add a Script to a Skill
|
|
|
|
<required_reading>
|
|
**Read these reference files NOW:**
|
|
1. references/using-scripts.md
|
|
</required_reading>
|
|
|
|
<process>
|
|
## Step 1: Identify the Skill
|
|
|
|
Ask (if not already provided):
|
|
- Which skill needs a script?
|
|
- What operation should the script perform?
|
|
|
|
## Step 2: Analyze Script Need
|
|
|
|
Confirm this is a good script candidate:
|
|
- [ ] Same code runs across multiple invocations
|
|
- [ ] Operation is error-prone when rewritten
|
|
- [ ] Consistency matters more than flexibility
|
|
|
|
If not a good fit, suggest alternatives (inline code in workflow, reference examples).
|
|
|
|
## Step 3: Create Scripts Directory
|
|
|
|
```bash
|
|
mkdir -p ~/.claude/skills/{skill-name}/scripts
|
|
```
|
|
|
|
## Step 4: Design Script
|
|
|
|
Gather requirements:
|
|
- What inputs does the script need?
|
|
- What should it output or accomplish?
|
|
- What errors might occur?
|
|
- Should it be idempotent?
|
|
|
|
Choose language:
|
|
- **bash** - Shell operations, file manipulation, CLI tools
|
|
- **python** - Data processing, API calls, complex logic
|
|
- **node/ts** - JavaScript ecosystem, async operations
|
|
|
|
## Step 5: Write Script File
|
|
|
|
Create `scripts/{script-name}.{ext}` with:
|
|
- Purpose comment at top
|
|
- Usage instructions
|
|
- Input validation
|
|
- Error handling
|
|
- Clear output/feedback
|
|
|
|
For bash scripts:
|
|
```bash
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
```
|
|
|
|
## Step 6: Make Executable (if bash)
|
|
|
|
```bash
|
|
chmod +x ~/.claude/skills/{skill-name}/scripts/{script-name}.sh
|
|
```
|
|
|
|
## Step 7: Update Workflow to Use Script
|
|
|
|
Find the workflow that needs this operation. Add:
|
|
```xml
|
|
<process>
|
|
...
|
|
N. Run `scripts/{script-name}.sh [arguments]`
|
|
N+1. Verify operation succeeded
|
|
...
|
|
</process>
|
|
```
|
|
|
|
## Step 8: Test
|
|
|
|
Invoke the skill workflow and verify:
|
|
- Script runs at the right step
|
|
- Inputs are passed correctly
|
|
- Errors are handled gracefully
|
|
- Output matches expectations
|
|
</process>
|
|
|
|
<success_criteria>
|
|
Script is complete when:
|
|
- [ ] scripts/ directory exists
|
|
- [ ] Script file has proper structure (comments, validation, error handling)
|
|
- [ ] Script is executable (if bash)
|
|
- [ ] At least one workflow references the script
|
|
- [ ] No hardcoded secrets or credentials
|
|
- [ ] Tested with real invocation
|
|
</success_criteria>
|