edit-discipline

edit-discipline is a skill for Claude Code from softspark/ai-toolkit. It costs 68 tokens per session (496 once invoked), scanned A, original, Apache-2.0.

A set of rules for making file changes through reviewable editing tools and checking the resulting diff. A diff is a precise view of what changed in a project.

In plain words
What is it for?
Editing, refactoring, patching, or reviewing code changes while showing the affected files before completion.
Why use it?
It makes edits easier to inspect and helps prevent opaque or accidental file rewrites.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the ai-toolkit plugin — 115 skills, 44 agents, 14 hooks shipped together

Good fit Editing, refactoring, patching, or reviewing code changes while showing the affected files before completion.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/softspark/ai-toolkit/edit-discipline
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add softspark/ai-toolkit --skill edit-discipline
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 115 skills, 44 agents, 14 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for edit-discipline

README.md
[![agentmods](https://agentmods.dev/badge/skills/softspark/ai-toolkit/edit-discipline/github.svg)](https://agentmods.dev/skills/softspark/ai-toolkit/edit-discipline)
Your own site
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/edit-discipline"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/edit-discipline/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for edit-discipline

Your own site · 80×15
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/edit-discipline"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/edit-discipline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 496 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.00496
Opus 5 $0.00034 $0.00248
Sonnet 5 $0.00014 $0.00099
Haiku 4.5 $0.00007 $0.00050

Measured 6d ago against content hash d6de4f13ff12, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

edit-discipline scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

app/skills/edit-discipline/SKILL.md · 51 lines

What it actually says

Edit Discipline

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.

Edit Discipline & Reviewable Changes

Edit files with the editing tools, not the shell

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.

Show the change before calling the work done

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.

Why both halves matter together

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.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 51 lines · 68 tokens per session scan A d6de4f13ff12

Subscribe to this mod's changes

edit-discipline is a skill published in the GitHub repository softspark/ai-toolkit (170 stars, last pushed yesterday), licensed Apache-2.0. It adds 68 tokens to every session and 496 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

create-pr

Create evidence-backed pull requests to the GitHub main branch with strict preflight, quality, and security gates. Use when users ask to create/submit/open/update a PR to main (including private repos), decide draft vs ready state, and provide reviewer-ready context for team review.

johnqtcg/awesome-skills · 59 tokens

git-commit

Safely create a git commit by validating repository state, staging intended changes, scanning for secrets/conflicts, generating a Conventional Commits message (repository convention first, else an English Angular default) from the staged diff, and committing without amend.

johnqtcg/awesome-skills · 52 tokens

conflict-resolver

Résolution de conflits entre agents ou sous-agents quand les résultats sont contradictoires, avec workflow de détection, arbitrage, merge et feedback loop. Se déclenche avec "conflit agent", "agent conflict", "résultats contradictoires", "agent disagreement", "contradiction agents", "arbitrage agent", "résoudre…

khalilbenaz/claude-skills-collection · 99 tokens

result-aggregator

Agrégation et synthèse des résultats de multiples sous-agents en un résultat cohérent. Se déclenche avec "agréger résultats", "fusionner résultats", "combiner outputs", "agent aggregator", "merge results", "synthèse multi-agent", "consolider résultats agents". Also triggers on "merge agent results", "aggregate…

khalilbenaz/claude-skills-collection · 85 tokens

git-workflow-helper

Guide pour les opérations Git complexes, résolution de conflits et bonnes pratiques de workflow. À utiliser quand l'utilisateur est bloqué avec Git ou veut mettre en place un workflow. Se déclenche aussi avec "git merge conflict", "comment revert", "git rebase", "branching strategy", "j'ai cassé mon git", ou toute…

khalilbenaz/claude-skills-collection · 96 tokens

surface-after-care

Regelmäßiger Pflegedurchlauf für ein bereits veröffentlichtes GitHub-Repository (Stufe 1, günstig und oft wiederholbar): zuerst alle Distributionsflächen des Projekts ermitteln (npm, PyPI, Registries, Marketplaces, Stores, Website) und Änderungen später dorthin spiegeln, dann Topics setzen, Privacy-Gate, Dokumente auf…

ellmos-ai/skills · 283 tokens