agentleFS
swell-agentsswell-agents/coding-skills/skills/shell-discipline/SKILL.md

shell-discipline

Skill5 starsChanged 7 months agoMITView on GitHub

Shell discipline — one command per call, no inline env vars, gh auth login.

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
  1. Very specific:

    Use gh auth login / gh auth switch to switch GitHub accounts — never prefix with GH_TOKEN=....

    line 13
  2. Distinctive:

    Shell aliases that hide what runs: Avoid invoking aliases in agent procedures.

    line 29

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Shell Commands

  • One command per call — keep commands small, readable, and atomic. Don't chain with &&, ;, or cd dir && command. Use separate calls — first cd, 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 switch to switch GitHub accounts — never prefix with GH_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: gh CLI installed and authenticated.

Failure modes

  • gh auth login fails or token expired. Re-run gh auth login -h github.com interactively, then gh auth status to 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 sudo inline; 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.