agentleFS
gjbexgjbex/scientific-computing-skills/skills/scientific-cli-design/SKILL.md

scientific-cli-design

Skill1 starsChanged 6 months agoApache-2.0View on GitHub

Design and review command-line interfaces for scientific-computing

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈29

    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:

    Use this skill when editing or reviewing a scientific, numerical, or parallel program's command-line interface and run semantics, …

    line 10
  2. Distinctive:

    Use this skill when:

    line 28
  3. Distinctive:

    Do not use this skill to replace GUI design or domain-specific workflow engines.

    line 36
  4. Distinctive:

    When this skill applies:

    line 40
  5. Distinctive:

    Read the repository AGENTS.md first, if present.

    line 42
  6. Distinctive:

    Keep CLI behavior compatible with scripting, CI, and batch schedulers.

    line 46
  7. Distinctive:

    Prefer extending the repository's existing CLI style rather than inventing a new interface shape unless the current one is clearly a …

    line 49
  8. Distinctive:

    Prefer descriptive option names over cryptic abbreviations.

    line 54
  9. Distinctive:

    Use positional arguments only for a small number of obvious required inputs.

    line 55
  10. Distinctive:

    Keep performance tuning options separate from scientific model parameters when possible.

    line 56
  11. Distinctive:

    Document defaults and avoid hidden behavior changes triggered by unrelated flags.

    line 58
  12. Distinctive:

    Prefer explicit units in option names or help text when ambiguity is likely.

    line 60
  13. Distinctive:

    Prefer printing or recording the resolved configuration for each run.

    line 69
  14. Distinctive:

    Avoid silently ignoring unknown config keys or malformed values.

    line 70
  15. Distinctive:

    Keep config formats human-editable unless the repository already requires another convention.

    line 71
  16. Distinctive:

    Check file existence, writable output locations, and numeric ranges early.

    line 80
  17. Distinctive:

    Avoid silently clamping or correcting scientific parameters unless that behavior is documented and justified.

    line 83
  18. Distinctive:

    Prefer stable filenames or structured run directories for generated artifacts.

    line 93
  19. Distinctive:

    Avoid mandatory interactivity for normal runs.

    line 103
  20. Distinctive:

    Avoid progress output patterns that flood logs or break parsers at scale.

    line 108
  21. Distinctive:

    Prefer deterministic exit behavior suitable for shell scripts and CI.

    line 109
  22. Distinctive:

    Prefer printing version, config, seed, and major runtime settings when useful.

    line 116
  23. Distinctive:

    Keep benchmark-relevant options explicit rather than hidden in source edits.

    line 117
  24. Distinctive:

    Avoid changing output formats or default parameter semantics without calling that out clearly.

    line 118
  25. Distinctive:

    Run help output and at least one representative command when practical.

    line 135
  26. Distinctive:

    Test invalid arguments and confirm the error messages are useful.

    line 136
  27. Distinctive:

    Verify output locations, exit codes, and logging behavior for changed paths.

    line 137
  28. Distinctive:

    Check that documented examples still match the implemented CLI.

    line 138
  29. Distinctive:

    When using this skill, briefly note:

    line 143

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

Scientific CLI Design

Use this skill when editing or reviewing a scientific, numerical, or parallel program's command-line interface and run semantics, especially when the CLI is part of a reproducible workflow or batch pipeline.

Repository AGENTS.md instructions take precedence over this skill.

Purpose

Apply a pragmatic default for:

  • clear CLI arguments and subcommands;
  • robust parameter validation and error messages;
  • config-file and command-line override behavior;
  • predictable output, logging, and exit conventions;
  • batch-friendly and reproducible scientific runs.

When To Use

Use this skill when:

  • the user asks to add or improve a CLI for a scientific code;
  • parameter names, defaults, or validation rules are unclear;
  • outputs, logs, or checkpoint paths need predictable conventions;
  • both interactive runs and batch/scheduler runs must work cleanly;
  • command lines should be easy to document, rerun, and benchmark.

Do not use this skill to replace GUI design or domain-specific workflow engines.

Working Approach

When this skill applies:

  1. Read the repository AGENTS.md first, if present.
  2. Identify the primary run modes and the smallest useful default command.
  3. Make required inputs, optional tuning knobs, and output destinations explicit.
  4. Validate arguments early and fail with actionable messages.
  5. Keep CLI behavior compatible with scripting, CI, and batch schedulers.
  6. State what command syntax, defaults, and output behavior changed.

Prefer extending the repository's existing CLI style rather than inventing a new interface shape unless the current one is clearly a maintenance problem.

Argument Design

  • Prefer descriptive option names over cryptic abbreviations.
  • Use positional arguments only for a small number of obvious required inputs.
  • Keep performance tuning options separate from scientific model parameters when possible.
  • Document defaults and avoid hidden behavior changes triggered by unrelated flags.
  • Prefer explicit units in option names or help text when ambiguity is likely.

For booleans, use clear positive flags and avoid flag pairs that can contradict each other.

Config Files and Overrides

  • Support config files when many parameters must be reproducible or rerun often.
  • Make precedence between config values, CLI overrides, and defaults explicit.
  • Prefer printing or recording the resolved configuration for each run.
  • Avoid silently ignoring unknown config keys or malformed values.
  • Keep config formats human-editable unless the repository already requires another convention.

CLI and config handling should make reruns easier, not create two subtly different configuration paths.

Validation and Error Handling

  • Reject invalid parameter combinations before expensive computation starts.
  • Check file existence, writable output locations, and numeric ranges early.
  • Fail with nonzero exit codes and concise, actionable messages.
  • Distinguish user-input errors from internal failures when practical.
  • Avoid silently clamping or correcting scientific parameters unless that behavior is documented and justified.

For long batch runs, early validation is usually cheaper than discovering a bad setting after scheduling and startup overhead.

Output and Logging Conventions

  • Make output paths explicit and avoid surprising writes to the current working directory unless that is the project convention.
  • Prefer stable filenames or structured run directories for generated artifacts.
  • Separate human-readable logs from machine-readable outputs when practical.
  • Include enough metadata in logs or manifests to identify the run configuration.
  • Support controllable verbosity without hiding important warnings.

For parallel runs, include rank or thread context in logs when it aids debugging without creating unmanageable noise.

Batch and HPC Friendliness

  • Avoid mandatory interactivity for normal runs.
  • Respect environment variables and scheduler-provided paths only when that behavior is explicit and documented.
  • Make thread counts, rank counts, and affinity-relevant settings easy to pass or record.
  • Avoid progress output patterns that flood logs or break parsers at scale.
  • Prefer deterministic exit behavior suitable for shell scripts and CI.

Batch users should be able to rerun a job from one command and a saved config.

Reproducibility and Benchmarking

  • Make command lines self-describing enough to reproduce reported runs.
  • Prefer printing version, config, seed, and major runtime settings when useful.
  • Keep benchmark-relevant options explicit rather than hidden in source edits.
  • Avoid changing output formats or default parameter semantics without calling that out clearly.

A good scientific CLI should be easy to paste into documentation, tests, and benchmark scripts.

Anti-Patterns

  • dozens of undocumented flags with unclear precedence;
  • silent fallback to defaults after parsing errors;
  • hidden writes, hidden randomness, or hidden environment-dependent behavior;
  • output filenames that overwrite prior runs by accident;
  • progress output that becomes unusable under MPI or many threads;
  • one CLI path for local use and a different undocumented path for batch jobs.

Validation Defaults

  • Run help output and at least one representative command when practical.
  • Test invalid arguments and confirm the error messages are useful.
  • Verify output locations, exit codes, and logging behavior for changed paths.
  • Check that documented examples still match the implemented CLI.
  • State explicitly which command forms were validated and which were not.

Output Expectations

When using this skill, briefly note:

  • which CLI arguments, defaults, or config rules were added or changed;
  • how invalid inputs and output paths are handled;
  • whether logging, metadata, or batch behavior was improved;
  • which CLI commands or help paths were tested;
  • which usability or reproducibility concerns remain.

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.