Skip to content

Skill · Operate and improve

mistake-to-constraint

Use when a mistake repeats. Encode it as the strongest guard — type or runtime, lint, test, directory convention, then a rules line — and log it in CONSTRAINTS.md.

Written by

Install this skill

Installs only mistake-to-constraint, globally, as a copy

DISABLE_TELEMETRY=1 npx skills add KunanonJ/superstacks -g -s mistake-to-constraint --copy -y

Third-party installer; DISABLE_TELEMETRY=1 turns its telemetry off.

How it runs

You invoke it.

Its frontmatter sets disable-model-invocation: true, so the agent never loads it on its own. Ask for it by name.

Origin

Original

Written for Superstacks

Written for Superstacks; sources.lock.json credits no upstream. Released under MIT with the rest of the pack.

License
MIT
Release
v6.1.1 · 2026-10-06

SKILL.md

View on GitHub
---
name: mistake-to-constraint
description: Use when a mistake repeats. Encode it as the strongest guard — type or runtime, lint, test, directory convention, then a rules line — and log it in CONSTRAINTS.md.
license: MIT
disable-model-invocation: true
---

# Mistake to constraint

A repeated mistake is an environment bug. Do not add another prompt paragraph first.

## Order (strongest first)

1. **Type narrowing or runtime guard** — make the illegal state unrepresentable. See `templates/runtime-guard.py`.
2. **Lint rule** — copy `templates/eslint-rule.cjs` or `templates/semgrep-rule.yml`. Prefer an existing ruff selector from `templates/ruff-snippet.toml` before a new plugin.