agentleFS
ForgeyClapForgeyClap/Forge-Core/.claude/skills/forge-cli/SKILL.md

forge-cli

Skill2 starsChanged 5 days agoMITView on GitHub

Playbook for CLIs and dev tools: flags, exit codes (gebruik bij een CLI-tool).

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are 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.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use for: command-line tools: arg parsing, exit codes, stdio/pipe behaviour, safe defaults, cross-platform.

    line 11
  2. Very specific:

    Real arg parser + --help + --version: Use the stack's established parser (argparse/click, commander/yargs, clap, cobra) — not …

    line 17
  3. Very specific:

    Cross-platform: Use the platform path API (no hardcoded / or \), tolerate CRLF/LF, don't assume a POSIX-only shell or GNU-only flags, and …

    line 22
  4. Very specific:

    No destructive default: dry-run/confirm/force present and tested.

    line 41

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

Forge playbook — Command-line tool / CLI

When to use

  • Use for: command-line tools: arg parsing, exit codes, stdio/pipe behaviour, safe defaults, cross-platform.
  • Domain framing, team roles and honesty rule: references/overview.md.

Do not duplicate ECC skills — defer to: the language reviewer skills (python-reviewer, typescript-reviewer, go-review, rust-review, etc. by stack) for idiomatic code, and /test-coverage for the test gate. This file is orchestration only.

Hard rules (non-negotiable)

  • Real arg parser + --help + --version. Use the stack's established parser (argparse/click, commander/yargs, clap, cobra) — not hand-rolled argv slicing.
  • Correct exit codes. 0 = success only; distinct non-zero codes for distinct failure classes (usage error, not-found, permission, runtime).
  • Pipe / stdio discipline. Machine output → stdout; diagnostics, logs, prompts, progress → stderr (so cmd | other stays clean).
  • No destructive default.
  • Testable — I/O separated from logic. Core behavior lives in pure functions callable without spawning a process; the thin CLI layer wires args → core → streams.
  • Cross-platform. Use the platform path API (no hardcoded / or \), tolerate CRLF/LF, don't assume a POSIX-only shell or GNU-only flags, and handle Ctrl-C (SIGINT) cleanly.

Full text of every rule: references/hard-rules.md.

Team (conditional)

Lead: architect for a multi-subcommand tool, else build-boss directly. Full roster: references/team-and-tools.md.

Skills / commands / MCP

Skills, commands, MCP and opt-in dependencies: references/team-and-tools.md.

Fan-out & flow

L1 for a single-purpose tool; L2 for a multi-subcommand CLI. Serial: arg contract (flags + --help + exit-code table) → core logic (I/O-separated, pure) → stdio/pipe behavior → destructive-action guards → tests. Parallel (independent once the arg contract + shared core lib are fixed): individual subcommands ∥ the help/usage docs ∥ the test suite.

Domain gates

  • --help and --version work and exit 0; unknown flags fail cleanly with usage.
  • Exit codes are distinct and correct; no path exits 0 on error (proven by a failing-input test).
  • Machine output on stdout, diagnostics on stderr; reads stdin when piped; a pipeline producer | tool | consumer round-trips without leaking logs into the data stream.
  • No destructive default: dry-run/confirm/force present and tested; a bare run is non-destructive.
  • Cross-platform path + line-ending handling; no unguarded POSIX-only/GNU-only assumption; clean SIGINT.
  • Tests cover exit codes + stdout + stderr + pipe; core logic is unit-testable without a subprocess.

Ship-readiness (unique)

Evidence checklist before handoff: references/ship-readiness.md.

Safety, approval and honesty

  • Approval / safety: no destructive default: irreversible actions need an explicit flag or confirmation, with --dry-run.
  • Approval / safety: secrets/tokens come from env or a config file, never echoed or baked into the binary; add security-boss when the tool shells out, handles secrets or takes untrusted paths.
  • Honest failure: never claim "cross-platform" for an OS you did not actually run on; other-OS results are inferred until a CI matrix run proves them.
  • Shared gates for every playbook (honesty, owner approval, secrets, reviews): .claude/docs/forge-reference/playbook-template.md.

References

  • references/overview.md — domain framing paragraph(s) from under the title.
  • references/hard-rules.md — full text of every hard rule.
  • references/team-and-tools.md — full team roster, skills, commands, MCP and opt-in runtimes.
  • references/ship-readiness.md — full ship-readiness evidence checklist.

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.