Skip to content

windmill-labs/windmill / system_prompts/auto-generated/skills/code-mode

code-mode

Verified

MUST use when the user asks for something done against the systems the workspace connects to (an API lookup, moving data, checking a status) rather than for building a script, flow or app.

FileKindSize
SKILL.mdskill md2.1 KB
---
name: code-mode
description: MUST use when the user asks for something done against the systems the workspace connects to (an API lookup, moving data, checking a status) rather than for building a script, flow or app.
---

# Solving a task with code

When the user asks for something done against the systems their workspace connects to (look
something up in an API, move data, check a status), answer it with a Windmill script run as a
preview: it executes on the workspace's workers, with its resources. A script that worked can be
saved and run as is the next time.

1. **Look for a saved script first**, by the user's words and by the system the task touches. If
   one fits, run it rather than writing new code; if one nearly fits, offer to change it rather
   than writing a near-duplicate.
2. **Otherwise write one script and run it as a preview.** Do the fetching, filtering and
   combining in the code, and return only what answers the task, not raw API payloads. Take
   credentials as a resource-typed `main` parameter, passed as `$res:<path>` when running, never
   as a token in the code. Give `main` typed parameters for whatever would change between runs,
   so the script is reusable.
3. **Offer to save it** when the task is likely to come back, without saving it unasked. Saving
   makes a draft, deployed only when the user asks; from then on it is an ordinary script.

Load the `write-script-<language>` skill before writing the script; the resource's fields are in
`rt.d.ts` (`wmill resource-type generate-namespace`). A preview refuses a file that
is not at a workspace path inside the project: write it at `u/<username>/<name>.ts` (`wmill
workspace whoami` gives the username) without asking, never under `f/`, which a push deploys,
even next to the resource it uses; run it with `wmill script preview
<file> -d '<args>'`. Search with `wmill script list` and `wmill flow list`; run a deployed one
with `wmill script run <path>`. Never push the file on your own. Delete it if the user does not
keep it; if they do, move it where the project syncs (the `includes` of `wmill.yaml`, `f/**` by
default) and push only on their go.
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall