# Labali Deterministic Script Writer

> Convert a user task into a deterministic no-reasoning script specification that can be executed directly without repeated runtime reasoning. Use when you want to freeze a repeated task into a fixed, replayable script spec — for automation templates, workflow blueprints, or any task where you want deterministic execution without AI re-reasoning on each run.

- Skill: `kingson4wu/labali-deterministic-script-writer` (Agent Skill, multi-file: 9 files)
- Install (CLI): `npx skillmds@latest add kingson4wu/labali-deterministic-script-writer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kingson4wu/labali-deterministic-script-writer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- License: MIT
- Author: Kingson4Wu (https://skillmd.com/u/kingson4wu)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kingson4wu/labali-deterministic-script-writer

---


# labali-deterministic-script-writer

Use this skill when the user says things like:
- "Freeze my task into a script."
- "Make this executable directly next time."
- "No repeated reasoning, just run."

This is a prompt-and-spec skill. It defines deterministic script specs clearly and simply.

## Runtime Inputs

- `intent`: required task goal from user request.
- `environment`: optional runtime context (OS, toolchain, auth state, paths).
- `constraints`: optional hard limits (timeouts, no-network, safety restrictions).

## Execution Contract

### Phase 1 — Inversion (clarify before generating)

DO NOT proceed to Phase 2 until all required inputs are confirmed.

If `environment` or `constraints` are missing and cannot be inferred:
- Ask the user for the target OS/toolchain and any hard limits.
- If the user provides only one sentence, treat it as `intent` and represent missing details as explicit required placeholders in the output — do not block on asking.

### Phase 2 — Generator (produce the spec)

Execute in fixed order:

1. Load `templates/script-spec.md` — use it as the canonical output scaffold.
2. Fill all 6 required sections from the template:
   - `Preconditions`
   - `Parameters`
   - `Deterministic Steps`
   - `Step Assertions`
   - `Fail-Fast Rules`
   - `Script Skeleton` (runnable shape with `status/data/error`)
3. Make all required parameters explicit (or mark as required placeholders).
4. Ensure deterministic steps are executable in fixed order with no runtime reasoning loops.
5. Make assertions and fail-fast conditions concrete and testable.
6. Output the complete spec.

## Success Criteria

A response is complete only when:

1. All required parameters are explicit (or marked required placeholders).
2. Deterministic steps are executable in fixed order.
3. Assertions and fail-fast conditions are concrete and testable.
4. Script skeleton can run without requiring additional reasoning loops.

## NEVER

- Never make model calls, semantic lookups, or candidate retries during execution — runtime reasoning is forbidden.
- Never enter guesswork loops — if required state is missing, fail immediately with an explicit error code.
- Never use non-deterministic ordering or implicit branch conditions — steps must run in fixed order with explicit checks only.
- Never output abstract theory without an accompanying runnable script skeleton.

## Resources

- Working style and design boundaries: `references/architecture.md`
- Copy-ready prompt for this skill: `references/prompt-template.md`

