Skip to content

AI Coding with Skills

All m8ty Dart client packages ship with a SKILL.md file that enables AI-powered coding assistants to understand and correctly use each client library.

This is powered by the skills package.

Skills are structured metadata files (SKILL.md) that teach AI coding assistants (like GitHub Copilot, Cursor, Kiro, or similar) how to use a library correctly — including setup patterns, API surfaces, and usage examples.

Each m8ty client contains a skill at:

skills/<package_name>-usage/SKILL.md
dev_dependencies:
skills: ^0.1.0

Run the following command in your project directory:

Terminal window
dart run skills:install

This scans your pubspec.yaml dependencies, finds all packages that provide SKILL.md files, and installs them into your project’s .skills/ directory where AI assistants can discover them.

Once installed, your AI coding assistant will automatically pick up the skill files and understand:

  • How to instantiate and configure each client
  • Available API methods and when to use them
  • Authentication setup (OAuth, API key, Bearer)
  • Error handling patterns with DioException
  • Model construction with built_value builders

After running dart run skills:install in a project that depends on m8ty_client_ais, your AI assistant will know to write:

final client = M8tyClientAis();
client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getAccountsApi();
final response = await api.listAllAccounts();

Instead of guessing at method names or configuration patterns.

See the skills package on pub.dev for full documentation.