agnostic-skills

deterministic-scripts

deterministic-scripts

Moves repeatable steps out of model tokens into scripts, and keeps personal values and secrets out of prompts and commits.

Quick start

  1. Copy the folder into your project or skills folder: install a skill.

  2. Run the self-test (<scripts> is the kit's scripts/ folder):

    python3 <scripts>/test_scripting.py
  3. Find commands you keep repeating:

    python3 <scripts>/repeat_scan.py <transcript or history>

What's inside

Script / fileWhat it does
SKILL.mdThe rules as a skill
prompt-deterministic-scripts.mdThe same rules as one paste-ready block, for harnesses without skills
references/script-contract.mdThe script contract and what the linter checks
references/config-convention.mdHome config file: location, format, key naming, extra scan patterns
scripts/homecfg.pyReads the home config (get, keys, path, check, where); python import too
scripts/new_script.pyScaffolds a script that already meets the contract and indexes it
scripts/check_scripts.pyLints scripts against the contract
scripts/repeat_scan.pyFinds repeated commands in a transcript or shell history
scripts/scan_sensitive.py, scrub_sensitive.pyFind and fix personal values and secrets
scripts/install_hooks.py, scripts/hooks/pre-commitThe commit guard
scripts/test_scripting.pySelf-test

How it works

Before each task the agent spots steps with a fixed answer and runs or writes a script for them. New scripts start from a scaffold that meets the contract. Values a script needs come from your home config at run time.

The script contract
  • Stdlib python3 (3.9+); shell only with a stated portability-exception.

  • Header doc, --help, --json.

  • Exit 0 ok, 1 failed, 2 bad input.

  • Read-only unless --write.

  • Indexed in the nearest README.md ## Index.

  • Full list: references/script-contract.md.

Home config
  • Default file: ~/.config/deterministic-scripts/config.env (%APPDATA%\deterministic-scripts on Windows).

  • Override with DETERMINISTIC_SCRIPTS_CONFIG (a file) or DETERMINISTIC_SCRIPTS_HOME (a folder).

  • Read a key with python3 <scripts>/homecfg.py get <key> or homecfg.get("<key>").

  • Extra scan patterns: patterns.txt, pattern_* keys, or DETERMINISTIC_SCRIPTS_PATTERNS / DETERMINISTIC_SCRIPTS_LITERALS.

  • Details: references/config-convention.md.

The commit guard
  • hooks/pre-commit scans every line a commit adds: home paths, emails, private keys, tokens, password=/secret= assignments, and every value in your config.

  • A hit stops the commit. Fix it with scrub_sensitive.py <dir> --write or move the value to the config.

  • Install per clone with install_hooks.py <repo> --write. It reports first and changes nothing without --write.

  • It refuses (exit 2) if the repo already has other hooks.

  • .sensitive-allow takes public or fake values only.

Safety and uninstall
  • Scripts never echo a secret; scan hits print redacted.

  • Pushed history is not rewritten: rotate any secret that leaked.

  • Uninstall: install_hooks.py <repo> --uninstall --write in each repo, then delete the kit folder, the harness link and the pasted block.

  • The home config is yours; nothing else is written.

Harness support
  • Claude Code: link the folder as a skill and @-import the prompt block.

  • opencode / Codex CLI: name the prompt block in AGENTS.md.

  • Cursor / IDE agents: an always-apply rule pointing at the prompt block.

  • Raw API: put the block in the orchestrator system prompt.

Files

Part of agnostic-skills · MIT