skill-creator: add secrets handling guidance
Add explicit rule that skills must never hardcode secrets automatically. Include config → env → error lookup pattern for scripts.
This commit is contained in:
parent
4583f88626
commit
1faf9d2020
@ -98,6 +98,16 @@ Files not intended to be loaded into context, but rather used within the output
|
|||||||
- **Use cases**: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified
|
- **Use cases**: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified
|
||||||
- **Benefits**: Separates output resources from documentation, enables Codex to use files without loading them into context
|
- **Benefits**: Separates output resources from documentation, enables Codex to use files without loading them into context
|
||||||
|
|
||||||
|
#### Secrets & Credentials
|
||||||
|
|
||||||
|
**NEVER hardcode secrets automatically**—only if user explicitly requests it. Scripts must look up secrets dynamically: config → env → error.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
VALUE=$(jq -r '.skills.entries["skill-name"].apiKey // empty' ~/.clawdbot/clawdbot.json)
|
||||||
|
VALUE="${VALUE:-$SKILL_NAME_API_KEY}"
|
||||||
|
[[ -z "$VALUE" ]] && echo "Error: Set skills.entries.skill-name.apiKey in config or SKILL_NAME_API_KEY env var" && exit 1
|
||||||
|
```
|
||||||
|
|
||||||
#### What to Not Include in a Skill
|
#### What to Not Include in a Skill
|
||||||
|
|
||||||
A skill should only contain essential files that directly support its functionality. Do NOT create extraneous documentation or auxiliary files, including:
|
A skill should only contain essential files that directly support its functionality. Do NOT create extraneous documentation or auxiliary files, including:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user