48 lines
1.1 KiB
Cheetah
48 lines
1.1 KiB
Cheetah
|
|
# Workflow: Config
|
||
|
|
|
||
|
|
Read, validate, and update `{{plugin_name}}`'s configuration.
|
||
|
|
|
||
|
|
## When to use
|
||
|
|
|
||
|
|
- User wants to view or change `{{plugin_name}}` settings
|
||
|
|
- Another workflow needs a config value at runtime
|
||
|
|
|
||
|
|
## Inputs required
|
||
|
|
|
||
|
|
- **operation** - `get` | `set` | `list`
|
||
|
|
- **key** - Config key (dot-notation for nested values), required for `get`/`set`
|
||
|
|
- **value** - New value, required for `set`
|
||
|
|
|
||
|
|
## Config location
|
||
|
|
|
||
|
|
`.claude/plugin-data/{{plugin_name}}/config.json`
|
||
|
|
|
||
|
|
## Subtasks
|
||
|
|
|
||
|
|
### 1. Load config
|
||
|
|
|
||
|
|
Subagent: Haiku.
|
||
|
|
|
||
|
|
- Read `.claude/plugin-data/{{plugin_name}}/config.json`
|
||
|
|
- If missing, create with `{}` and note it was initialized
|
||
|
|
|
||
|
|
### 2. Apply operation
|
||
|
|
|
||
|
|
Subagent: Haiku.
|
||
|
|
|
||
|
|
- `list`: print all keys/values
|
||
|
|
- `get`: print the value at `key`, or "not set" if absent
|
||
|
|
- `set`: write `value` at `key`, preserving other keys, then re-read to confirm the write
|
||
|
|
|
||
|
|
### 3. Report
|
||
|
|
|
||
|
|
Subagent: Main.
|
||
|
|
|
||
|
|
- Confirm the operation and resulting value
|
||
|
|
- Note the config file path for manual edits if needed
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
Customize this workflow for `{{plugin_name}}`'s specific settings (API keys,
|
||
|
|
file paths, feature toggles, output formats).
|