ai-toolkit-rules
Mandatory engineering, security, testing, git, performance, quality, and response rules. Claude MUST load this skill for every…
Change files with the edit and write tools, never by rewriting them through bash (sed, awk, tee, heredoc, redirection), and show `git diff` before reporting a file-changing task as done. Triggers: edit, write, modify, refactor, patch, fix, diff, review changes.
Claude Code
$ npx -y skills add softspark/ai-toolkit --skill edit-discipline --agent claude-code
Codex
$ npx skills add softspark/ai-toolkit --skill edit-discipline -a codex -y
Cursor
$ npx skills add softspark/ai-toolkit --skill edit-discipline -a cursor -y
Gemini CLI
$ npx skills add softspark/ai-toolkit --skill edit-discipline -a gemini-cli -y
GitHub Copilot
$ npx skills add softspark/ai-toolkit --skill edit-discipline -a github-copilot -y
OpenCode
$ npx skills add softspark/ai-toolkit --skill edit-discipline -a opencode -y
Windsurf
$ npx skills add softspark/ai-toolkit --skill edit-discipline -a windsurf -y
name: edit-discipline description: "Change files with the edit and write tools, never by rewriting them through bash (sed, awk, tee, heredoc, redirection), and show `git diff` before reporting a file-changing task as done. Triggers: edit, write, modify, refactor, patch, fix, diff, review changes." effort: low user-invocable: false allowed-tools: Read
This rule comes from `app/rules/edit-discipline.md` in ai-toolkit. It applies to every task in this workspace, not only when it is loaded.
Use the `edit` and `write` tools to change a file. Do not rewrite tracked files through `bash` with `sed`, `awk`, `tee`, a heredoc, or `>` redirection.
This is not a style preference. A shell rewrite is opaque to the host: the session records a command, not a change. An `edit` call records which file changed and how, so the interface can render it, a reviewer can read it, and a later turn can cite it. A `sed` line records none of that, and the only way to find out what happened is to read the file again.
The shell remains correct for what it is for: running builds, tests, linters, git, package managers, and generators that own their own output.
Before reporting a file-changing task as finished, show what changed:
git diff -- <paths> # tracked files git status --short # what is new or removed
Paste the diff into the reply, or state precisely why it is too large and summarise it by file with the counts. A task that reports success without showing the change asks the reader to take the result on trust, and the reader is the one who has to decide whether to commit it.
For an untracked file, show the content you wrote, not a description of it.
Editing through the tools makes a change *recordable*; showing the diff makes it *reviewed*. Either alone leaves the person deciding whether to ship blind to something they are accountable for.
AI coding toolkit with machine-enforced safety, 116 skills, 44 agents, lifecycle hooks, persona presets, opt-in plugin packs, and benchmark tooling.
Mandatory engineering, security, testing, git, performance, quality, and response rules. Claude MUST load this skill for every…
Searches past coding sessions for observations, decisions, context. Triggers: mem-search, recall session, past work, prior…
Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. Triggers: a11y, accessibility, WCAG, EAA, ARIA, contrast, keyboard, screen…
Creates new specialized agents with frontmatter, tools, delegation. Triggers: new agent, create agent, agent scaffold,…
Analyzes code quality, complexity, patterns across codebase. Triggers: quality report, hotspot scan, code analysis, architecture…
API design: naming, versioning, pagination, idempotency, OpenAPI, error contracts and safe retries. Triggers: API design, REST,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.