refactor-for-determinism

Separate deterministic steps into scripts and leave judgment calls in SKILL.md prose.

450|36|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/kasperjunge/agent-resources --skill refactor-for-determinism
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-for-determinism
Source: https://github.com/kasperjunge/agent-resources/tree/main/.opencode/skill/refactor-for-determinism
Command: npx skills add https://github.com/kasperjunge/agent-resources --skill refactor-for-determinism

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design or refactor skills by clearly separating deterministic steps from non-deterministic guidance, enabling repeatable automation.

Core Features & Use Cases

  • Identify deterministic steps and design small, single-purpose scripts under scripts/
  • Orchestrate the skill workflow in SKILL.md while keeping judgment tasks in prose
  • Improve reproducibility, testability, and maintainability of skills

Quick Start

Identify deterministic steps in your skill, move each into a small script under scripts/, and update SKILL.md to orchestrate those scripts while keeping non-deterministic decisions in prose.

Frequently Asked Questions about refactor-for-determinism

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I separate deterministic steps from non-deterministic guidance in skill workflows?

You can refactor skills for determinism by moving repeatable tasks into small scripts under scripts/ and orchestrating those scripts in SKILL.md while keeping non-deterministic judgment calls in prose.

What is the best way to automate repeatable tasks in SKILL.md workflows?

The best way to automate repeatable tasks in SKILL.md workflows is to identify deterministic steps and design small, single-purpose scripts for them. SKILL.md then orchestrates these scripts, leaving non-deterministic decisions as prose guidance.

How do I structure scripts and SKILL.md to improve skill reproducibility and maintainability?

Improve skill reproducibility and maintainability by structuring scripts/ to contain deterministic steps, using SKILL.md to orchestrate the workflow, and keeping non-deterministic decisions in prose with clear boundaries and error handling.

Can I refactor an existing skill to make its workflow more deterministic?

Yes, you can refactor an existing skill by applying this workflow during development or refactoring to formalize deterministic steps, moving them into scripts/ while leaving judgment tasks as prose in SKILL.md.

Does this refactoring approach require specific dependencies or components?

No, this refactoring approach requires no specific dependencies or components, applying to any Skill Unit containing a SKILL.md frontmatter with name and description and optional scripts/ references/ assets/ directories.