Dart Cli App Best Practices
Helps with Dart, best practices as part of agent workflows workflows.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add dart-cli-app-best-practices npx -- -y @trustedskills/dart-cli-app-best-practices
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"dart-cli-app-best-practices": {
"command": "npx",
"args": [
"-y",
"@trustedskills/dart-cli-app-best-practices"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill provides guidance and best practices for developing Dart command-line interface (CLI) applications. It focuses on structuring entrypoint files, defining executables in pubspec.yaml, using shebangs for Unix systems, and handling process termination with appropriate exit codes. The goal is to improve testability, maintainability, and portability of Dart CLI tools.
When to use it
- When creating a new Dart CLI application from scratch.
- During refactoring of an existing CLI entrypoint file (located in the
bin/directory). - To review existing CLI code for adherence to quality standards and best practices.
- When setting up executable scripts specifically for Linux or macOS environments.
Key capabilities
- Provides guidance on structuring Dart CLI application entrypoints (
bin/). - Explains how to define executables in the
pubspec.yamlfile for global activation and invocation viadart run. - Offers advice on using shebangs (
#!) for direct execution of scripts on Linux and macOS systems. - Details best practices for handling process termination, including setting exit codes.
Example prompts
- "How should I structure the entrypoint file for my new Dart CLI application?"
- "What's the recommended way to define executables in
pubspec.yaml?" - "Should I use a shebang in my Dart CLI scripts, and if so, how?"
Tips & gotchas
- Keep your entrypoint file (
bin/my_app.dart) minimal; avoid putting complex logic directly within it. - Remember to
chmod +x bin/my_script.dartafter adding a shebang to make the script executable on Unix-like systems. - Use standard exit codes for clear error reporting during process termination.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.