Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add gspencergoog/skills --skill dart-cli-app-best-practicesgit clone --depth 1 https://github.com/gspencergoog/skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/gspencergoog/skills/dart-cli-app-best-practices)<a href="https://agentmods.dev/skills/gspencergoog/skills/dart-cli-app-best-practices"><img src="https://agentmods.dev/badge/skills/gspencergoog/skills/dart-cli-app-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/gspencergoog/skills/dart-cli-app-best-practices"><img src="https://agentmods.dev/badge/skills/gspencergoog/skills/dart-cli-app-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00092 | $0.00967 |
| Opus 5.5 | $0.00037 | $0.00387 |
| Sonnet 5.5 | $0.00018 | $0.00193 |
| Haiku 4.5 | $0.00009 | $0.00097 |
Grade A, and why
dart-cli-app-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dart CLI Application Best Practices
1. Best Practices
Entrypoint Structure (bin/)
Keep the contents of your entrypoint file (e.g., bin/my_app.dart) minimal. This improves testability by decoupling logic from the process runner.
DO:
// bin/my_app.dart
import 'package:my_app/src/entry_point.dart';
Future<void> main(List<String> arguments) async {
await runApp(arguments);
}
DON'T:
- Put complex logic directly in
bin/my_app.dart. - Define classes or heavy functions in the entrypoint.
Executable Scripts
For CLI tools intended to be run directly on Linux and Mac, add a shebang and ensure the file is executable.
DO:
- Add
#!/usr/bin/env dartto the first line. - Run
chmod +x bin/my_script.dartto make it executable.
#!/usr/bin/env dart
void main() => print('Ready to run!');
Process Termination (exitCode)
Properly handle process termination to allow for debugging and correct status reporting.
DO:
- Use the
exitCodesetter to report failure. - Allow
mainto complete naturally. - Use standard exit codes (sysexits) for clarity (e.g.,
64for bad usage,78for configuration errors).- See
package:ioExitCodeclass or FreeBSD sysexits man page.
- See
import 'dart:io';
void main() {
if (someFailure) {
exitCode = 64; // DO!
return;
}
}
AVOID:
- Calling
exit(code)directly, as it terminates the VM immediately, preventing "pause on exit" debugging andfinallyblocks from running.
Exception Handling
Uncaught exceptions automatically set a non-zero exit code, but you should handle expected errors gracefully.
[!IMPORTANT] Always write error messages, crash reports, and stack traces to
stderr(usingstderr.writeln()) rather thanstdout(usingprint()). Writing errors tostdoutis a CLI anti-pattern that pollutes shell pipes, making it difficult for users to chain commands and filter successful output.
Example:
import 'dart:io';
Future<void> main(List<String> arguments) async {
try {
await runApp(arguments);
} catch (e, stack) {
stderr.writeln('App crashed!');
stderr.writeln(e);
stderr.writeln(stack);
exitCode = 1; // Explicitly fail
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago Changed · +6 lines · +18 tokens per session d658416dc4e4
- 1mo ago Changed · +9 lines b3d9455ce695
- 2mo ago First seen · 107 lines · 74 tokens per session scan A a8f937538c01
dart-cli-app-best-practices is a skill published in the GitHub repository gspencergoog/skills (2 stars, last pushed today), licensed Apache-2.0. It adds 92 tokens to every session and 967 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
omh-rust
This is an OMH rust workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).
erlang-otp-behaviors
Use when oTP behaviors including genserver for stateful processes, genstatem for state machines, supervisors for fault tolerance, genevent for event handling, and building robust, production-ready Erlang applications with proven patterns.
axiom-concurrency
Use when writing ANY async code, actors, or threads in an Apple-platform app, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races, async/await patterns.
haskell-pro
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
splitting-oversized-modules
Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior. Use on a request to split / break up / decompose a god module or move functions out of one, once a human has agreed to…
migrate-better-result-3
Migrate a TypeScript codebase from better-result 2.x to 3.0. Use when upgrading better-result across the TaggedError syntax, removed Result serialization helpers, recovery inference, matching, or retry APIs.