dart-package-management

Installation
SKILL.md

Managing Dart Packages

Contents

Package Layout Conventions

Structure Dart packages using standardized directories to ensure tooling compatibility and clear API boundaries.

  • lib/: Place public libraries and assets here. Export only the public API surface.
  • lib/src/: Place internal implementation files here. Never import from another package's lib/src/. Use relative imports within your own package when importing from lib/src/ to lib/.
  • bin/: Place public command-line executables here.
  • tool/: Place internal scripts and tools (e.g., code generation, documentation scripts) here.
  • test/: Place unit tests here, suffixed with _test.dart.
  • integration_test/: Place slow, integration-level tests here.
  • example/: Place standalone example programs demonstrating package usage. Use package: imports to reference the parent package.
Related skills
Installs
65
GitHub Stars
214
First Seen
Mar 17, 2026