shell-discipline
Skill5 starsChanged 7 months agoMITView on GitHub
Shell discipline — one command per call, no inline env vars, gh auth login.
In this repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- committing-changesSkill
- creating-block-issuesSkill
- designing-architectureSkill
- engineering-philosophySkill
- go-conventionsSkill
- implementing-blocksSkill
- python-conventionsSkill
- reviewing-changesSkill
- running-tdd-cyclesSkill
- solidity-conventionsSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Use gh auth login / gh auth switch to switch GitHub accounts — never prefix with GH_TOKEN=....
- Distinctive: line 29
Shell aliases that hide what runs: Avoid invoking aliases in agent procedures.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Shell Commands
- One command per call — keep commands small, readable, and atomic. Don't chain with
&&,;, orcd dir && command. Use separate calls — firstcd, then the command. - No inline env vars — don't use
VAR=value command. Set env separately or use proper auth tools.
Git Auth
- Use
gh auth login/gh auth switchto switch GitHub accounts — never prefix withGH_TOKEN=....
Why
Each chained command is one opaque action to the permission layer; splitting them gives one auditable tool call per intent. Inline env vars hide configuration in the command line and leak secrets into shell history; explicit auth tools (gh auth login) keep credentials in the keyring where they belong.
Prerequisites
- A POSIX shell (bash or zsh).
- For the Git Auth rule:
ghCLI installed and authenticated.
Failure modes
gh auth loginfails or token expired. Re-rungh auth login -h github.cominteractively, thengh auth statusto verify. Don't paste the token into a shell command.- Account switch needed.
gh auth switch -u <user>. If that user's token is invalid, re-auth that account before switching. - Command needs elevated privileges. Set up the privilege out-of-band (sudoers entry, group membership) rather than prefixing the command with
sudoinline; an unattended agent shouldn't be entering passwords. - Shell aliases that hide what runs. Avoid invoking aliases in agent procedures; spell out the real command so it's auditable.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

