⚡ Productivity

Raycast Script Commands and Snippets Builder for a Mac IT Helpdesk: Scripts with @raycast Metadata, Output Modes, Typed Arguments, Confirmation for Risky Actions, Keychain Secrets, Snippet Placeholders, Quicklinks, and a Shared Repo

Turn the repetitive work of a small Mac support or IT team into Raycast tools: sort each task into a script command, a snippet, a quicklink, or a job for your MDM, then write ready to save Bash or Python script commands with correct @raycast metadata, the right output mode, typed arguments, confirmation on risky actions, tokens read from the macOS Keychain, snippet keywords with dynamic placeholders, and a shared repo with a test checklist.

0.0
0Reviews
P
October 7, 2026

Prompt

Act as a Mac IT support lead who builds Raycast Script Commands, snippets, and quicklinks for a small helpdesk, and has cleaned up scripts that leaked API tokens into a shared repo or ran a destructive command on one stray keystroke.

Inputs:
- Team size, who uses the tools, and the tasks repeated every day: [TeamAndTasks]
- Systems the scripts may touch, with base URLs and what needs admin rights: [ToolsAndAPIs]
- Allowed script languages and installed command line tools (for example bash, python3, jq): [ScriptLanguage]
- Where secrets live and what may never be committed: [SecretsPolicy]
- Canned replies and text the team retypes: [SnippetLibrary]
- Output format: [Format]

Generate:
1. A triage table for TeamAndTasks: each task becomes a script command, a snippet, a quicklink, or "not a Raycast job" when it needs admin rights or belongs in MDM or Self Service per ToolsAndAPIs. One line of reason each.
2. For each script command, a complete file: kebab case filename, shebang, then the metadata comment block with @raycast.schemaVersion 1, @raycast.title (verb first), @raycast.mode, @raycast.packageName to group commands, @raycast.icon, and @raycast.description.
3. Pick the mode on purpose: silent for fire and forget, compact when one result line is enough, fullOutput for multi line results, inline only for a status line and only with @raycast.refreshTime. State the reason in a comment.
4. Arguments: at most three @raycast.argument lines with JSON type text, password, or dropdown, a placeholder, and optional when it truly is. Read them as $1 or sys.argv, validate, and on bad input print one plain line and exit 1 so Raycast shows the failure.
5. Risky actions (cancel, delete, restart, post to a system): add @raycast.needsConfirmation true and print exactly what will change before doing it.
6. Secrets per SecretsPolicy: never hard code a token. Read it with security find-generic-password -s name -w, and give each teammate the one line setup with security add-generic-password. If the item is missing, exit 1 with the setup hint.
7. Output discipline: last line is the human message in compact and silent modes, results that agents paste go to pbcopy, and no sudo inside any script.
8. Snippets from SnippetLibrary: a keyword scheme with a prefix such as ;; so words never expand by accident, then each snippet with dynamic placeholders like {cursor}, {clipboard}, or a date with an offset. Note that date offsets count calendar days.
9. Quicklinks for lookups by ID, using an argument placeholder in the URL.
10. Shared repo setup: folder layout, chmod +x, adding the folder with Add Script Directory in Raycast settings, a README line per command, and a test checklist (empty argument, bad argument, offline, missing Keychain item).

Constraints:
- Only call systems listed in ToolsAndAPIs. Mark any endpoint you did not get as "confirm in the API docs".
- Placeholder and metadata syntax can change between Raycast versions; mark anything uncertain "check the current Raycast manual". No em dashes.

Instructions

Replace every [bracket] with your details before running. Works on ChatGPT, Claude, and Gemini.

Generated Output

This image was generated using the prompt above.

Raycast Script Commands and Snippets Builder for a Mac IT Helpdesk: Scripts with @raycast Metadata, Output Modes, Typed Arguments, Confirmation for Risky Actions, Keychain Secrets, Snippet Placeholders, Quicklinks, and a Shared Repo - Result

Examples

Example Input

TeamAndTasks: 5 person IT helpdesk at a 120 person architecture firm, everyone on Macs. Daily repeats: look up a laptop by serial in Snipe-IT, grab diagnostics from a user's Mac during a call, clear a user's stuck jobs on the plotter queue, resume a paused print queue, open a Freshdesk ticket by number, retype the same replies
ToolsAndAPIs: Snipe-IT REST API at https://assets.example-firm.com/api/v1, Freshdesk at example-firm.freshdesk.com, CUPS on each Mac (queue name Plotter_T830), Jamf Self Service for anything needing admin
ScriptLanguage: bash and python3, jq installed by Jamf
SecretsPolicy: no tokens in the Git repo; each tech stores a personal Snipe-IT API token in their login Keychain
SnippetLibrary: "we got your request", "restart and update steps", "plotter queue cleared", a follow up promise 3 days out
Format: files ready to save, then README checklist

Example Output

1) TRIAGE
| Task | Becomes | Reason |
| Laptop lookup by serial | Script command | API call, one line answer |
| Mac diagnostics | Script command | Runs locally, result to clipboard |
| Clear user's plotter jobs | Script command | Users may cancel their own jobs |
| Resume paused queue | Not a Raycast job | Needs admin, publish in Jamf Self Service |
| Open ticket by number | Quicklink | Just a URL |
| Canned replies | Snippets | Pure text |

2) asset-by-serial.sh
#!/bin/bash
# @raycast.schemaVersion 1
# @raycast.title Look Up Asset by Serial
# @raycast.mode compact
# @raycast.packageName Helpdesk
# @raycast.icon 💻
# @raycast.argument1 { "type": "text", "placeholder": "Serial" }
# @raycast.description Snipe-IT owner and model for a serial
# compact: one answer line is enough
serial="$1"
[[ "$serial" =~ ^[A-Z0-9]{8,14}$ ]] || { echo "Serial looks wrong: $serial"; exit 1; }
token=$(security find-generic-password -s snipeit-token -w 2>/dev/null) || {
  echo "No Keychain item. Run: security add-generic-password -s snipeit-token -a \"$USER\" -w"; exit 1; }
json=$(curl -sf -H "Authorization: Bearer $token" -H "Accept: application/json" \
  "https://assets.example-firm.com/api/v1/hardware/byserial/$serial") || { echo "Snipe-IT unreachable"; exit 1; }
echo "$json" | jq -r '.rows[0] | "\(.asset_tag) \(.model.name) assigned to \(.assigned_to.name // "nobody")"'
Confirm the byserial endpoint in the Snipe-IT API docs.

3) mac-diagnostics.sh (compact)
# @raycast.title Copy Mac Diagnostics
# @raycast.mode compact
{ sw_vers -productVersion; ioreg -l | awk -F'"' '/IOPlatformSerialNumber/ {print $4}'; uptime; df -h / | tail -1; } | pbcopy
echo "Diagnostics copied, paste into the ticket"

4) clear-my-plotter-jobs.sh
# @raycast.title Clear My Plotter Jobs
# @raycast.mode compact
# @raycast.needsConfirmation true
echo "Cancelling jobs owned by $USER on Plotter_T830:"; lpstat -o Plotter_T830 | grep "$USER"
cancel -u "$USER" Plotter_T830 && echo "Your plotter jobs were cancelled"
Resuming the queue stays in Jamf Self Service. No sudo here.

5) SNIPPETS (prefix ;;)
- ;;got : Thanks, we have your request and will reply by {date offset="+1d"}. {cursor}
- ;;upd : Please save your work, choose Apple menu, System Settings, General, Software Update, install, then restart.
- ;;plot : Your stuck plotter jobs are cleared. Please send the file again.
- ;;fu : I will follow up by {date offset="+3d"}. Offsets count calendar days, so check before Fridays.
Check the current Raycast manual for date format options.

6) QUICKLINK
Name: Freshdesk Ticket
URL: https://example-firm.freshdesk.com/a/tickets/{argument name="Ticket"}

7) REPO AND TESTS
helpdesk-raycast/
  scripts/ asset-by-serial.sh mac-diagnostics.sh clear-my-plotter-jobs.sh
  snippets.md  README.md
Setup: chmod +x scripts/*.sh, then Raycast Settings, Extensions, Script Commands, Add Script Directory, pick scripts/.
Test every command: empty argument, bad serial, Wi-Fi off, Keychain item missing, plotter with no jobs.

Reviews (0)

Please login to leave a review.
Loading reviews...