@fro.bot/systematic 1.23.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +75 -61
  2. package/agents/research/best-practices-researcher.md +2 -3
  3. package/agents/research/issue-intelligence-analyst.md +2 -3
  4. package/package.json +2 -3
  5. package/skills/ce-brainstorm/SKILL.md +10 -11
  6. package/skills/ce-compound/SKILL.md +11 -11
  7. package/skills/ce-compound-refresh/SKILL.md +2 -2
  8. package/skills/ce-ideate/SKILL.md +3 -4
  9. package/skills/ce-plan/SKILL.md +8 -8
  10. package/skills/ce-plan-beta/SKILL.md +9 -10
  11. package/skills/ce-review/SKILL.md +7 -7
  12. package/skills/ce-work/SKILL.md +4 -4
  13. package/skills/ce-work-beta/SKILL.md +556 -0
  14. package/skills/claude-permissions-optimizer/SKILL.md +161 -0
  15. package/skills/claude-permissions-optimizer/scripts/extract-commands.mjs +805 -0
  16. package/skills/deepen-plan/SKILL.md +15 -15
  17. package/skills/deepen-plan-beta/SKILL.md +3 -3
  18. package/skills/deploy-docs/SKILL.md +8 -8
  19. package/skills/file-todos/SKILL.md +2 -1
  20. package/skills/generate_command/SKILL.md +1 -1
  21. package/skills/{report-bug → report-bug-ce}/SKILL.md +38 -33
  22. package/skills/resolve-todo-parallel/SKILL.md +65 -0
  23. package/skills/setup/SKILL.md +3 -3
  24. package/skills/test-browser/SKILL.md +3 -4
  25. package/commands/.gitkeep +0 -0
  26. package/skills/create-agent-skill/SKILL.md +0 -10
  27. package/skills/create-agent-skills/SKILL.md +0 -265
  28. package/skills/create-agent-skills/references/api-security.md +0 -226
  29. package/skills/create-agent-skills/references/be-clear-and-direct.md +0 -531
  30. package/skills/create-agent-skills/references/best-practices.md +0 -404
  31. package/skills/create-agent-skills/references/common-patterns.md +0 -595
  32. package/skills/create-agent-skills/references/core-principles.md +0 -437
  33. package/skills/create-agent-skills/references/executable-code.md +0 -175
  34. package/skills/create-agent-skills/references/iteration-and-testing.md +0 -474
  35. package/skills/create-agent-skills/references/official-spec.md +0 -134
  36. package/skills/create-agent-skills/references/recommended-structure.md +0 -168
  37. package/skills/create-agent-skills/references/skill-structure.md +0 -152
  38. package/skills/create-agent-skills/references/using-scripts.md +0 -113
  39. package/skills/create-agent-skills/references/using-templates.md +0 -112
  40. package/skills/create-agent-skills/references/workflows-and-validation.md +0 -510
  41. package/skills/create-agent-skills/templates/router-skill.md +0 -73
  42. package/skills/create-agent-skills/templates/simple-skill.md +0 -33
  43. package/skills/create-agent-skills/workflows/add-reference.md +0 -96
  44. package/skills/create-agent-skills/workflows/add-script.md +0 -93
  45. package/skills/create-agent-skills/workflows/add-template.md +0 -74
  46. package/skills/create-agent-skills/workflows/add-workflow.md +0 -126
  47. package/skills/create-agent-skills/workflows/audit-skill.md +0 -138
  48. package/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +0 -605
  49. package/skills/create-agent-skills/workflows/create-new-skill.md +0 -197
  50. package/skills/create-agent-skills/workflows/get-guidance.md +0 -121
  51. package/skills/create-agent-skills/workflows/upgrade-to-router.md +0 -161
  52. package/skills/create-agent-skills/workflows/verify-skill.md +0 -204
  53. package/skills/heal-skill/SKILL.md +0 -148
  54. package/skills/resolve_parallel/SKILL.md +0 -36
  55. package/skills/resolve_todo_parallel/SKILL.md +0 -38
@@ -1,265 +0,0 @@
1
- ---
2
- name: create-agent-skills
3
- description: Expert guidance for creating OpenCode skills and slash commands. Use when working with SKILL.md files, authoring new skills, improving existing skills, creating slash commands, or understanding skill structure and best practices.
4
- ---
5
-
6
- # Creating Skills & Commands
7
-
8
- This skill teaches how to create effective OpenCode skills following the official specification from [code.claude.com/docs/en/skills](https://code.claude.com/docs/en/skills).
9
-
10
- ## Commands and Skills Are Now The Same Thing
11
-
12
- Custom slash commands have been merged into skills. A file at `.opencode/commands/review.md` and a skill at `.opencode/skills/review/SKILL.md` both create `/review` and work the same way. Existing `.opencode/commands/` files keep working. Skills add optional features: a directory for supporting files, frontmatter to control invocation, and automatic context loading.
13
-
14
- **If a skill and a command share the same name, the skill takes precedence.**
15
-
16
- ## When To Create What
17
-
18
- **Use a command file** (`commands/name.md`) when:
19
- - Simple, single-file workflow
20
- - No supporting files needed
21
- - Task-oriented action (deploy, commit, triage)
22
-
23
- **Use a skill directory** (`skills/name/SKILL.md`) when:
24
- - Need supporting reference files, scripts, or templates
25
- - Background knowledge OpenCode should auto-load
26
- - Complex enough to benefit from progressive disclosure
27
-
28
- Both use identical YAML frontmatter and markdown content format.
29
-
30
- ## Standard Markdown Format
31
-
32
- Use YAML frontmatter + markdown body with **standard markdown headings**. Keep it clean and direct.
33
-
34
- ```markdown
35
- ---
36
- name: my-skill-name
37
- description: What it does and when to use it
38
- ---
39
-
40
- # My Skill Name
41
-
42
- ## Quick Start
43
- Immediate actionable guidance...
44
-
45
- ## Instructions
46
- Step-by-step procedures...
47
-
48
- ## Examples
49
- Concrete usage examples...
50
- ```
51
-
52
- ## Frontmatter Reference
53
-
54
- All fields are optional. Only `description` is recommended.
55
-
56
- | Field | Required | Description |
57
- |-------|----------|-------------|
58
- | `name` | No | Display name. Lowercase letters, numbers, hyphens (max 64 chars). Defaults to directory name. |
59
- | `description` | Recommended | What it does AND when to use it. OpenCode uses this for auto-discovery. Max 1024 chars. |
60
- | `argument-hint` | No | Hint shown during autocomplete. Example: `[issue-number]` |
61
- | `disable-model-invocation` | No | Set `true` to prevent OpenCode auto-loading. Use for manual workflows like `/deploy`, `/commit`. Default: `false`. |
62
- | `user-invocable` | No | Set `false` to hide from `/` menu. Use for background knowledge. Default: `true`. |
63
- | `allowed-tools` | No | Tools OpenCode can use without permission prompts. Example: `Read, Bash(git *)` |
64
- | `model` | No | Model to use. Options: `haiku`, `sonnet`, `opus`. |
65
- | `context` | No | Set `fork` to run in isolated subagent context. |
66
- | `agent` | No | Subagent type when `context: fork`. Options: `Explore`, `Plan`, `general-purpose`, or custom agent name. |
67
-
68
- ### Invocation Control
69
-
70
- | Frontmatter | User can invoke | OpenCode can invoke | When loaded |
71
- |-------------|----------------|-------------------|-------------|
72
- | (default) | Yes | Yes | Description always in context, full content loads when invoked |
73
- | `disable-model-invocation: true` | Yes | No | Description not in context, loads only when user invokes |
74
- | `user-invocable: false` | No | Yes | Description always in context, loads when relevant |
75
-
76
- **Use `disable-model-invocation: true`** for workflows with side effects: `/deploy`, `/commit`, `/triage-prs`, `/send-slack-message`. You don't want Claude deciding to deploy because your code looks ready.
77
-
78
- **Use `user-invocable: false`** for background knowledge that isn't a meaningful user action: coding conventions, domain context, legacy system docs.
79
-
80
- ## Dynamic Features
81
-
82
- ### Arguments
83
-
84
- Use `$ARGUMENTS` placeholder for user input. If not present in content, arguments are appended automatically.
85
-
86
- ```yaml
87
- ---
88
- name: fix-issue
89
- description: Fix a GitHub issue
90
- disable-model-invocation: true
91
- ---
92
-
93
- Fix GitHub issue $ARGUMENTS following our coding standards.
94
- ```
95
-
96
- Access individual args: `$ARGUMENTS[0]` or shorthand `$0`, `$1`, `$2`.
97
-
98
- ### Dynamic Context Injection
99
-
100
- Skills support dynamic context injection: prefix a backtick-wrapped shell command with an exclamation mark, and the preprocessor executes it at load time, replacing the directive with stdout. Write an exclamation mark immediately before the opening backtick of the command you want executed (for example, to inject the current git branch, write the exclamation mark followed by `git branch --show-current` wrapped in backticks).
101
-
102
- **Important:** The preprocessor scans the entire SKILL.md as plain text — it does not parse markdown. Directives inside fenced code blocks or inline code spans are still executed. If a skill documents this syntax with literal examples, the preprocessor will attempt to run them, causing load failures. To safely document this feature, describe it in prose (as done here) or place examples in a reference file, which is loaded on-demand by Claude and not preprocessed.
103
-
104
- For a concrete example of dynamic context injection in a skill, see [official-spec.md](references/official-spec.md) § "Dynamic Context Injection".
105
-
106
- ### Running in a Subagent
107
-
108
- Add `context: fork` to run in isolation. The skill content becomes the subagent's prompt. It won't have conversation history.
109
-
110
- ```yaml
111
- ---
112
- name: deep-research
113
- description: Research a topic thoroughly
114
- context: fork
115
- agent: Explore
116
- ---
117
-
118
- Research $ARGUMENTS thoroughly:
119
- 1. Find relevant files
120
- 2. Analyze the code
121
- 3. Summarize findings
122
- ```
123
-
124
- ## Progressive Disclosure
125
-
126
- Keep SKILL.md under 500 lines. Split detailed content into reference files:
127
-
128
- ```
129
- my-skill/
130
- ├── SKILL.md # Entry point (required, overview + navigation)
131
- ├── reference.md # Detailed docs (loaded when needed)
132
- ├── examples.md # Usage examples (loaded when needed)
133
- └── scripts/
134
- └── helper.py # Utility script (executed, not loaded)
135
- ```
136
-
137
- Link from SKILL.md: `For API details, see [reference.md](reference.md).`
138
-
139
- Keep references **one level deep** from SKILL.md. Avoid nested chains.
140
-
141
- ## Effective Descriptions
142
-
143
- The description enables skill discovery. Include both **what** it does and **when** to use it.
144
-
145
- **Good:**
146
- ```yaml
147
- description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
148
- ```
149
-
150
- **Bad:**
151
- ```yaml
152
- description: Helps with documents
153
- ```
154
-
155
- ## What Would You Like To Do?
156
-
157
- 1. **Create new skill** - Build from scratch
158
- 2. **Create new command** - Build a slash command
159
- 3. **Audit existing skill** - Check against best practices
160
- 4. **Add component** - Add workflow/reference/example
161
- 5. **Get guidance** - Understand skill design
162
-
163
- ## Creating a New Skill or Command
164
-
165
- ### Step 1: Choose Type
166
-
167
- Ask: Is this a manual workflow (deploy, commit, triage) or background knowledge (conventions, patterns)?
168
-
169
- - **Manual workflow** → command with `disable-model-invocation: true`
170
- - **Background knowledge** → skill without `disable-model-invocation`
171
- - **Complex with supporting files** → skill directory
172
-
173
- ### Step 2: Create the File
174
-
175
- **Command:**
176
- ```markdown
177
- ---
178
- name: my-command
179
- description: What this command does
180
- argument-hint: [expected arguments]
181
- disable-model-invocation: true
182
- allowed-tools: Bash(gh *), Read
183
- ---
184
-
185
- # Command Title
186
-
187
- ## Workflow
188
-
189
- ### Step 1: Gather Context
190
- ...
191
-
192
- ### Step 2: Execute
193
- ...
194
-
195
- ## Success Criteria
196
- - [ ] Expected outcome 1
197
- - [ ] Expected outcome 2
198
- ```
199
-
200
- **Skill:**
201
- ```markdown
202
- ---
203
- name: my-skill
204
- description: What it does. Use when [trigger conditions].
205
- ---
206
-
207
- # Skill Title
208
-
209
- ## Quick Start
210
- [Immediate actionable example]
211
-
212
- ## Instructions
213
- [Core guidance]
214
-
215
- ## Examples
216
- [Concrete input/output pairs]
217
- ```
218
-
219
- ### Step 3: Add Reference Files (If Needed)
220
-
221
- Link from SKILL.md to detailed content:
222
- ```markdown
223
- For API reference, see [reference.md](reference.md).
224
- For form filling guide, see [forms.md](forms.md).
225
- ```
226
-
227
- ### Step 4: Test With Real Usage
228
-
229
- 1. Test with actual tasks, not test scenarios
230
- 2. Invoke directly with `/skill-name` to verify
231
- 3. Check auto-triggering by asking something that matches the description
232
- 4. Refine based on real behavior
233
-
234
- ## Audit Checklist
235
-
236
- - [ ] Valid YAML frontmatter (name + description)
237
- - [ ] Description includes trigger keywords and is specific
238
- - [ ] Uses standard markdown headings (not XML tags)
239
- - [ ] SKILL.md under 500 lines
240
- - [ ] `disable-model-invocation: true` if it has side effects
241
- - [ ] `allowed-tools` set if specific tools needed
242
- - [ ] References one level deep, properly linked
243
- - [ ] Examples are concrete, not abstract
244
- - [ ] Tested with real usage
245
-
246
- ## Anti-Patterns to Avoid
247
-
248
- - **XML tags in body** - Use standard markdown headings
249
- - **Vague descriptions** - Be specific with trigger keywords
250
- - **Deep nesting** - Keep references one level from SKILL.md
251
- - **Missing invocation control** - Side-effect workflows need `disable-model-invocation: true`
252
- - **Too many options** - Provide a default with escape hatch
253
- - **Punting to Claude** - Scripts should handle errors explicitly
254
-
255
- ## Reference Files
256
-
257
- For detailed guidance, see:
258
- - [official-spec.md](references/official-spec.md) - Official skill specification
259
- - [best-practices.md](references/best-practices.md) - Skill authoring best practices
260
-
261
- ## Sources
262
-
263
- - [Extend Claude with skills - Official Docs](https://code.claude.com/docs/en/skills)
264
- - [GitHub - anthropics/skills](https://github.com/anthropics/skills)
265
-
@@ -1,226 +0,0 @@
1
- <overview>
2
- When building skills that make API calls requiring credentials (API keys, tokens, secrets), follow this protocol to prevent credentials from appearing in chat.
3
- </overview>
4
-
5
- <the_problem>
6
- Raw curl commands with environment variables expose credentials:
7
-
8
- ```bash
9
- # ❌ BAD - API key visible in chat
10
- curl -H "Authorization: Bearer $API_KEY" https://api.example.com/data
11
- ```
12
-
13
- When Claude executes this, the full command with expanded `$API_KEY` appears in the conversation.
14
- </the_problem>
15
-
16
- <the_solution>
17
- Use `~/.config/opencode/scripts/secure-api.sh` - a wrapper that loads credentials internally.
18
-
19
- <for_supported_services>
20
- ```bash
21
- # ✅ GOOD - No credentials visible
22
- ~/.config/opencode/scripts/secure-api.sh <service> <operation> [args]
23
-
24
- # Examples:
25
- ~/.config/opencode/scripts/secure-api.sh facebook list-campaigns
26
- ~/.config/opencode/scripts/secure-api.sh ghl search-contact "email@example.com"
27
- ```
28
- </for_supported_services>
29
-
30
- <adding_new_services>
31
- When building a new skill that requires API calls:
32
-
33
- 1. **Add operations to the wrapper** (`~/.config/opencode/scripts/secure-api.sh`):
34
-
35
- ```bash
36
- case "$SERVICE" in
37
- yourservice)
38
- case "$OPERATION" in
39
- list-items)
40
- curl -s -G \
41
- -H "Authorization: Bearer $YOUR_API_KEY" \
42
- "https://api.yourservice.com/items"
43
- ;;
44
- get-item)
45
- ITEM_ID=$1
46
- curl -s -G \
47
- -H "Authorization: Bearer $YOUR_API_KEY" \
48
- "https://api.yourservice.com/items/$ITEM_ID"
49
- ;;
50
- *)
51
- echo "Unknown operation: $OPERATION" >&2
52
- exit 1
53
- ;;
54
- esac
55
- ;;
56
- esac
57
- ```
58
-
59
- 2. **Add profile support to the wrapper** (if service needs multiple accounts):
60
-
61
- ```bash
62
- # In secure-api.sh, add to profile remapping section:
63
- yourservice)
64
- SERVICE_UPPER="YOURSERVICE"
65
- YOURSERVICE_API_KEY=$(eval echo \$${SERVICE_UPPER}_${PROFILE_UPPER}_API_KEY)
66
- YOURSERVICE_ACCOUNT_ID=$(eval echo \$${SERVICE_UPPER}_${PROFILE_UPPER}_ACCOUNT_ID)
67
- ;;
68
- ```
69
-
70
- 3. **Add credential placeholders to `~/.config/opencode/.env`** using profile naming:
71
-
72
- ```bash
73
- # Check if entries already exist
74
- grep -q "YOURSERVICE_MAIN_API_KEY=" ~/.config/opencode/.env 2>/dev/null || \
75
- echo -e "\n# Your Service - Main profile\nYOURSERVICE_MAIN_API_KEY=\nYOURSERVICE_MAIN_ACCOUNT_ID=" >> ~/.config/opencode/.env
76
-
77
- echo "Added credential placeholders to ~/.config/opencode/.env - user needs to fill them in"
78
- ```
79
-
80
- 4. **Document profile workflow in your SKILL.md**:
81
-
82
- ```markdown
83
- ## Profile Selection Workflow
84
-
85
- **CRITICAL:** Always use profile selection to prevent using wrong account credentials.
86
-
87
- ### When user requests YourService operation:
88
-
89
- 1. **Check for saved profile:**
90
- ```bash
91
- ~/.config/opencode/scripts/profile-state get yourservice
92
- ```
93
-
94
- 2. **If no profile saved, discover available profiles:**
95
- ```bash
96
- ~/.config/opencode/scripts/list-profiles yourservice
97
- ```
98
-
99
- 3. **If only ONE profile:** Use it automatically and announce:
100
- ```
101
- "Using YourService profile 'main' to list items..."
102
- ```
103
-
104
- 4. **If MULTIPLE profiles:** Ask user which one:
105
- ```
106
- "Which YourService profile: main, clienta, or clientb?"
107
- ```
108
-
109
- 5. **Save user's selection:**
110
- ```bash
111
- ~/.config/opencode/scripts/profile-state set yourservice <selected_profile>
112
- ```
113
-
114
- 6. **Always announce which profile before calling API:**
115
- ```
116
- "Using YourService profile 'main' to list items..."
117
- ```
118
-
119
- 7. **Make API call with profile:**
120
- ```bash
121
- ~/.config/opencode/scripts/secure-api.sh yourservice:<profile> list-items
122
- ```
123
-
124
- ## Secure API Calls
125
-
126
- All API calls use profile syntax:
127
-
128
- ```bash
129
- ~/.config/opencode/scripts/secure-api.sh yourservice:<profile> <operation> [args]
130
-
131
- # Examples:
132
- ~/.config/opencode/scripts/secure-api.sh yourservice:main list-items
133
- ~/.config/opencode/scripts/secure-api.sh yourservice:main get-item <ITEM_ID>
134
- ```
135
-
136
- **Profile persists for session:** Once selected, use same profile for subsequent operations unless user explicitly changes it.
137
- ```
138
- </adding_new_services>
139
- </the_solution>
140
-
141
- <pattern_guidelines>
142
- <simple_get_requests>
143
- ```bash
144
- curl -s -G \
145
- -H "Authorization: Bearer $API_KEY" \
146
- "https://api.example.com/endpoint"
147
- ```
148
- </simple_get_requests>
149
-
150
- <post_with_json_body>
151
- ```bash
152
- ITEM_ID=$1
153
- curl -s -X POST \
154
- -H "Authorization: Bearer $API_KEY" \
155
- -H "Content-Type: application/json" \
156
- -d @- \
157
- "https://api.example.com/items/$ITEM_ID"
158
- ```
159
-
160
- Usage:
161
- ```bash
162
- echo '{"name":"value"}' | ~/.config/opencode/scripts/secure-api.sh service create-item
163
- ```
164
- </post_with_json_body>
165
-
166
- <post_with_form_data>
167
- ```bash
168
- curl -s -X POST \
169
- -F "field1=value1" \
170
- -F "field2=value2" \
171
- -F "access_token=$API_TOKEN" \
172
- "https://api.example.com/endpoint"
173
- ```
174
- </post_with_form_data>
175
- </pattern_guidelines>
176
-
177
- <credential_storage>
178
- **Location:** `~/.config/opencode/.env` (global for all skills, accessible from any directory)
179
-
180
- **Format:**
181
- ```bash
182
- # Service credentials
183
- SERVICE_API_KEY=your-key-here
184
- SERVICE_ACCOUNT_ID=account-id-here
185
-
186
- # Another service
187
- OTHER_API_TOKEN=token-here
188
- OTHER_BASE_URL=https://api.other.com
189
- ```
190
-
191
- **Loading in script:**
192
- ```bash
193
- set -a
194
- source ~/.config/opencode/.env 2>/dev/null || { echo "Error: ~/.config/opencode/.env not found" >&2; exit 1; }
195
- set +a
196
- ```
197
- </credential_storage>
198
-
199
- <best_practices>
200
- 1. **Never use raw curl with `$VARIABLE` in skill examples** - always use the wrapper
201
- 2. **Add all operations to the wrapper** - don't make users figure out curl syntax
202
- 3. **Auto-create credential placeholders** - add empty fields to `~/.config/opencode/.env` immediately when creating the skill
203
- 4. **Keep credentials in `~/.config/opencode/.env`** - one central location, works everywhere
204
- 5. **Document each operation** - show examples in SKILL.md
205
- 6. **Handle errors gracefully** - check for missing env vars, show helpful error messages
206
- </best_practices>
207
-
208
- <testing>
209
- Test the wrapper without exposing credentials:
210
-
211
- ```bash
212
- # This command appears in chat
213
- ~/.config/opencode/scripts/secure-api.sh facebook list-campaigns
214
-
215
- # But API keys never appear - they're loaded inside the script
216
- ```
217
-
218
- Verify credentials are loaded:
219
- ```bash
220
- # Check .env exists
221
- ls -la ~/.config/opencode/.env
222
-
223
- # Check specific variables (without showing values)
224
- grep -q "YOUR_API_KEY=" ~/.config/opencode/.env && echo "API key configured" || echo "API key missing"
225
- ```
226
- </testing>