You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/scripts.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,7 @@ Scripts run in the workspace directory with full access to project secrets and e
37
37
**Crucial**: The `# Description:` line is what the AI reads to understand the tool. Be descriptive about what the script does and what arguments it accepts.
38
38
39
39
3.**Make it executable**:
40
+
40
41
```bash
41
42
chmod +x .cmux/scripts/deploy
42
43
```
@@ -54,9 +55,11 @@ Every executable script in `.cmux/scripts/` is automatically registered as a too
54
55
To make your scripts effective AI tools:
55
56
56
57
1.**Clear Descriptions**: Explicitly state what the script does and what arguments it expects.
58
+
57
59
```bash
58
60
# Description: Fetch logs. Requires one argument: the environment name (dev|prod).
59
61
```
62
+
60
63
2.**Robustness**: Use `set -euo pipefail` to ensure the script fails loudly if something goes wrong, allowing the AI to catch the error.
61
64
3.**Feedback**: Use `MUX_PROMPT` to guide the AI on what to do next if the script succeeds or fails (see below).
0 commit comments