Allow Commands
Instructions
- Check whether
builder.config.json exists in the project root.
- If it does not exist, tell the user that no change was made. Do not create it.
- If it exists, ask which commands to allow with
AskUserQuestion. Use multi-select and offer these presets:
- Mobile Development: Gradle, Android Debug Bridge, Apple/Xcode, Maestro, and related mobile build tooling.
- Angular: Angular CLI commands.
- Unzip:
unzip archive extraction.
The question UI includes an implicit custom-answer option; accept custom commands from it when provided.
- Read and parse
builder.config.json. Merge requested entries into allowedCommands, preserving all existing entries and removing duplicates.
- Write the updated valid JSON only after the user makes their selection. Preserve the file's established indentation when practical.
- Report the entries that were added. If every requested entry was already present, state that no configuration change was needed.
Presets
Mobile Development
[
"gradle *",
"gradle",
"./gradlew *",
"./gradlew",
"adb *",
"adb",
"xcrun *",
"xcodebuild *",
"xcode-select *",
"xed *",
"agvtool *",
"maestro *",
"maestro"
]
Angular
[
"ng *",
"ng"
]
Unzip
[
"unzip *",
"unzip"
]
Gotchas
- Never replace or remove existing
allowedCommands entries.
- Do not add duplicate command strings.
- Treat custom commands as security-sensitive: ask for clarification when the user's input is ambiguous rather than broadening it.
- Do not allow shell metacharacters or command chains in custom entries, including
;, &&, ||, |, backticks, $(, or newlines. A command name and an optional trailing * are acceptable.
1---2name: allow-commands3description: Adds safe command allowlist entries to an existing builder.config.json. Use when a user asks to allow commands, permit a CLI tool, configure allowedCommands, enable mobile development tooling, or allow unzip commands, even if they do not mention this skill.4---56# Allow Commands78## Instructions9101. Check whether `builder.config.json` exists in the project root.112. If it does not exist, tell the user that no change was made. Do not create it.123. If it exists, ask which commands to allow with `AskUserQuestion`. Use multi-select and offer these presets:13 - **Mobile Development**: Gradle, Android Debug Bridge, Apple/Xcode, Maestro, and related mobile build tooling.14 - **Angular**: Angular CLI commands.15 - **Unzip**: `unzip` archive extraction.16 The question UI includes an implicit custom-answer option; accept custom commands from it when provided.174. Read and parse `builder.config.json`. Merge requested entries into `allowedCommands`, preserving all existing entries and removing duplicates.185. Write the updated valid JSON only after the user makes their selection. Preserve the file's established indentation when practical.196. Report the entries that were added. If every requested entry was already present, state that no configuration change was needed.2021## Presets2223### Mobile Development2425```json26[27 "gradle *",28 "gradle",29 "./gradlew *",30 "./gradlew",31 "adb *",32 "adb",33 "xcrun *",34 "xcodebuild *",35 "xcode-select *",36 "xed *",37 "agvtool *",38 "maestro *",39 "maestro"40]41```4243### Angular4445```json46[47 "ng *",48 "ng"49]50```5152### Unzip5354```json55[56 "unzip *",57 "unzip"58]59```6061## Gotchas6263- Never replace or remove existing `allowedCommands` entries.64- Do not add duplicate command strings.65- Treat custom commands as security-sensitive: ask for clarification when the user's input is ambiguous rather than broadening it.66- Do not allow shell metacharacters or command chains in custom entries, including `;`, `&&`, `||`, `|`, backticks, `$(`, or newlines. A command name and an optional trailing ` *` are acceptable.