zuke-write-build
Skill49 starsChanged 4 months agoMITView on GitHub
Write or edit a Zuke build (build.ts) — the code-first, strongly-typed build system for TypeScript, on Node or Deno. Use when adding or changing targets, wiring dependencies, calling a tool wrapper (DenoTasks, NpmTasks, DockerTasks, ...), generating CI, or authoring/refactoring a build.ts build file. For first-time project scaffolding, use the zuke-setup skill instead.
- Installs packages
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- zuke-run-buildSkill
- zuke-setupSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 100
Before calling any task or settings method, confirm the real shape — but first confirm a wrapper exists at all: a package's docs need its …
- Very specific: line 126
Read the existing build.ts to learn the targets already declared and their order.
- Very specific: line 131
Add or edit the target field.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Write or edit a Zuke build
A build is a class that extends Build. Each target is a class field
created with target() and made runnable with await run(MyBuild) at the
bottom of build.ts (no import.meta.main guard — run no-ops on import). The
build runs on Node, the default for a new project, or on Deno: zuke.json's
"runtime" field says which ("node", or none for Deno). Builds on Deno are
supported until October 2027;
docs/moving-to-node.md
moves one.
<!-- check -->import { Build, run, target } from "@zuke/core";
import { NpmTasks } from "@zuke/npm";
class CI extends Build {
install = target()
.description("Clean-install dependencies")
.executes(async () => {
await NpmTasks.ci();
});
test = target()
.description("Run the test script")
.dependsOn(this.install)
.executes(async () => {
await NpmTasks.test();
});
// A field named `default` runs when no target is named on the CLI.
default = target().dependsOn(this.test).executes(() => {});
}
await run(CI);Non-negotiable rules
Import
@zuke/*by bare specifier, and declare it in the project's manifest. Writeimport { DockerTasks } from "@zuke/docker";the same way on both runtimes;zuke add dockerdeclares it, andzuke setupalready declared@zuke/core.- On Node,
package.jsondeclares it under its npm alias:"@zuke/docker": "npm:@zuke-build/docker@^1". The@zukescope on npm belongs to someone else, so never install an@zuke/*package from npm by that name. - On Deno, the
importsblock ofdeno.jsonmaps it:"@zuke/docker": "jsr:@zuke/docker@^1". Never an inlinejsr:@zuke/docker@^1in the import statement: Deno's default lint set (the one that applies whendeno.jsonconfigures nolint.rules, which is whatzuke setupscaffolds) rejects it underno-import-prefix, and Node cannot load one.
Either way the caret major is pinned in the manifest, so a future
@zukemajor cannot land unannounced.- On Node,
- Dependencies are
this.<field>references, never strings..dependsOn(this.lint), not.dependsOn("lint")— so renames and typos are compile-time errors. - A target may only depend on siblings declared above it. Class fields
initialise top-to-bottom; a forward reference is
undefinedand is reported as an error (TypeScript also flags it,TS2729). Order fields so dependencies come first. - Check the package catalogue before writing any command.
llms.txt's## Packagescatalogue (raw: https://raw.githubusercontent.com/zuke-build/zuke/master/llms.txt) and the package list inreferences/catalogue.mdare the only ways to answer "does a@zuke/<tool>wrapper exist for this CLI?" — a package's own docs only describe a package whose name you already know; they cannot tell you a wrapper exists. Whatever runs in an.executes(...)body drives an external tool through its namespaced*Tasksobject, configured with a settings lambda that mirrors the real CLI's flags —DenoTasks,NpmTasks,DockerTasks,GitTasks, and 30+ more — never a rawDeno.Command,node:child_processor shell string.@zuke/cmd(CmdTasks.exec) or the$shell from@zuke/core/shellis the last resort, reached for only once the catalogue confirms no typed wrapper exists — using it for a tool that has a@zuke/<tool>package is a bug, not a style choice: it discards typed flags, argv purity, and tool resolution. (If a build delegates its side effects to your own tested modules behind injected clients, the wrapper rule still governs whatever those modules run in the target body.) - A body is required, unless the target is one of the four forms that
replace it: a
service(), a.forEach()fan-out, a.waitsFor()gate, or a target declaring only.effect(...). Otherwise set.executes(...); it may be sync or async, and its return value is ignored —.executes(() => DenoTasks.lint())is fine as-is; never wrap a single wrapper call in anasyncblock just to discard its result. - Reach the runtime through
@zuke/core, never throughDeno.*. A build on Node has noDenoglobal.FileTasks(files),EnvTasks(the environment),RuntimeTasks(working directory, platform, arguments, exit) andProcessTasksor$(subprocesses) work on both runtimes.
Find the exact signature first
Before calling any task or settings method, confirm the real shape — but first
confirm a wrapper exists at all: a package's docs need its name, so they cannot
answer "does one exist for this tool?"; only the catalogue (llms.txt's ##
Packages list or references/catalogue.md) can.
- One package — prefer this in a consumer repo, once you know its name. It
shows the version the project actually has installed, so it cannot describe an
API that version lacks.
- On Node:
node_modules/@zuke/<package>/README.mdand its## APIsection, and the package's.d.tsfiles beside it, once./zukeornpm cihas installed the dependencies. - On Deno:
deno doc jsr:@zuke/<package>(e.g.deno doc jsr:@zuke/docker), orzuke doc <package>, which runs it.
- On Node:
- Whole surface:
llms-full.txt(index:llms.txt) — at the repo root in the Zuke repo itself. From a consumer repo, fetch https://raw.githubusercontent.com/zuke-build/zuke/master/llms-full.txt (index: https://raw.githubusercontent.com/zuke-build/zuke/master/llms.txt). Both trackmaster, so they can document symbols that are merged but not yet in any published release. Use them for breadth — which packages and tasks exist — and confirm a signature in the installed package before relying on it. - A quick map of the common methods and task objects is in the reference files listed below — read the one for the feature you are wiring, then verify specifics against the sources above.
Workflow for a change
- Read the existing
build.tsto learn the targets already declared and their order. - Identify the tool you need and look up its
*Tasksobject and settings methods (references/catalogue.md→ the installed package /llms-full.txt). - Add or edit the target field. Place it below every target it depends on.
Wire dependencies with
this.<field>. - Validate with the
zukecommand (it works from any directory inside the project; install it withnpm install -g @zuke-build/cliif it is missing, or run the project's./zukelauncher instead):zuke --listshows it;zuke <target> --dry-runpreviews the plan;zuke <target>runs it. To run, inspect or debug a build further, use thezuke-run-buildskill.
Reference files — read only the one you need
Each file opens with a short summary of its features, then the detail. Read the one that matches the change; none of them is needed to start.
| Read | When you are |
references/catalogue.md | Checking whether a @zuke/<tool> wrapper exists, before writing any command. |
references/targets.md | Writing targets: target() methods, group(), components, service(), the target context, caching, .forEach(), parameters. |
references/durable.md | Persisting run state, taking a cross-run lock, waiting on an external event, compensating with .onCancel(), .effect(). |
references/tools.md | Calling a tool wrapper (Node, git, GitHub, Deno, Flutter, Dart) or provisioning a tool hermetically. |
references/cloud.md | Deploying or signing: gcloud, AWS, Azure, Kubernetes, Apple, Google Play, SignPath. |
references/plugins.md | Adding AI review or self-healing, OpenTelemetry, Prometheus, a canary rollout, a Homebrew tap, a Chocolatey package, QR codes. |
references/ci.md | Generating CI with cicd(), or starting from a complete recipe build. |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

