agentleFS
Wsh7AshWsh7Ash/skillmcp/skills/deterministic-command-choices/SKILL.md

deterministic-command-choices

Skill0 starsChanged 14 days agoMITView on GitHub

Prefer commands whose output does not depend on locale, globbing or shell state. Use when an agent constructs commands that a shell will interpret before the tool sees them

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Avoid locale-sensitive sorting by specifying the collation or sorting explicitly

    line 23
  2. Distinctive:

    no path in the command is unquoted

    line 30
  3. Distinctive:

    no shell expansion affects which files or values are used

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Deterministic Command Choices

Prefer commands whose output does not depend on locale, globbing or shell state

Use when: an agent constructs commands that a shell will interpret before the tool sees them

Avoid when: the command is a fixed literal with no interpolation

Procedure

  1. Identify every part of the command that the shell expands
  2. Replace globs with explicit file lists where the set matters
  3. Quote every path and value that could contain a space
  4. Avoid locale-sensitive sorting by specifying the collation or sorting explicitly
  5. Pin time formats to a fixed zone and format
  6. Re-run the command and confirm identical output

Signals

  • two runs produce byte-identical output
  • no path in the command is unquoted
  • the file set passed to the tool is explicit
  • timestamps carry a zone and a fixed format

Patterns

1. Explicit list

cmd a.txt b.txt instead of cmd *.txt

2. Quoted path

"results/my file.json"

3. Fixed time

--date 2026-10-29T00:00:00Z

Pitfalls

  • Relying on glob expansion order which differs by filesystem and locale
  • Leaving a date unformatted so the output changes every run
  • Passing an unquoted path that breaks silently on a space

Done when

  • the command produces identical output on a rerun
  • no shell expansion affects which files or values are used

References

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.