agentleFS
dart-langdart-lang/ai/.agents/skills/add-dart-mcp-server-feature/SKILL.md

add-dart-mcp-server-feature

Skill292 starsChanged 26 days agoBSD-3-ClauseView on GitHub

Instructions for adding new features (tools, prompts, etc.) to the dart_mcp_server package.

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 2 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Follow these instructions when adding new tools, prompts, or other capabilities to the dart_mcp_server.

    line 11
  2. Very specific:

    All server features are implemented as mixins on the DartMCPServer at pkgs/dart_mcp_server/lib/src/server.dart.

    line 16
  3. Very specific:

    Check existing mixins: Look under pkgs/dart_mcp_server/lib/src/mixins/ to see if your feature fits into an existing category (e.g., …

    line 19
  4. Distinctive:

    Create a new mixin: If your feature is distinct, create a new file in that directory, following the patterns in existing mixins.

    line 22
  5. Very specific:

    Parameter Names: When adding new arguments to tools or prompts, always add a constant to the ParameterNames extension in …

    line 30
  6. Very specific:

    Analytics: Never send raw strings from the client to analytics.

    line 34
  7. Distinctive:

    Always add tests for any new features.

    line 45
  8. Very specific:

    Test Harness: Use the TestHarness class located in pkgs/dart_mcp_server/test/test_harness.dart.

    line 47
  9. Very specific:

    Existing Tests: Look at pkgs/dart_mcp_server/test/tools/ for examples of how to test specific tools.

    line 49
  10. Very specific:

    Enhance Harness: If the current TestHarness lacks functionality needed for your test, feel free to add it.

    line 51
  11. Very specific:

    Run the pkgs/dart_mcp_server/tool/update_readme.dart script to update the README.md file with any new features, it must be ran from the …

    line 62
  12. Very specific:

    Update the CHANGELOG.md file to include any user facing updates.

    line 66
  13. Very specific:

    Update this SKILL.md file if that would be helpful for future features.

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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

Adding Features to dart_mcp_server

Follow these instructions when adding new tools, prompts, or other capabilities to the dart_mcp_server.

1. Locate or Create a Mixin

All server features are implemented as mixins on the DartMCPServer at pkgs/dart_mcp_server/lib/src/server.dart.

  • Check existing mixins: Look under pkgs/dart_mcp_server/lib/src/mixins/ to see if your feature fits into an existing category (e.g., analyzer.dart, pub.dart).
  • Create a new mixin: If your feature is distinct, create a new file in that directory, following the patterns in existing mixins. Make sure to include a copyright header at the top of the file, with the current year.

2. Implementation Details

  • Registration: Tools, prompts, etc should be registered in the initialize method of the mixin, which is an override and must call super.initialize().
  • Parameter Names: When adding new arguments to tools or prompts, always add a constant to the ParameterNames extension in pkgs/dart_mcp_server/lib/src/utils/names.dart and use that constant instead of hardcoding string literals in your tool parsing and schema.
  • Analytics: Never send raw strings from the client to analytics. Tools with a command parameter must declare its values with an enum (for example EnumSchema.untitledSingleSelect), because only those values are included in the logged tool name. Similarly, new prompts must be added to the PromptNames enum, because only those prompt names are logged. Create analytics events with createDartMCPEvent from pkgs/dart_mcp_server/lib/src/utils/analytics.dart, which sanitizes the client info.

3. Testing

Always add tests for any new features.

  • Test Harness: Use the TestHarness class located in pkgs/dart_mcp_server/test/test_harness.dart.
  • Existing Tests: Look at pkgs/dart_mcp_server/test/tools/ for examples of how to test specific tools.
  • Enhance Harness: If the current TestHarness lacks functionality needed for your test, feel free to add it.

4. Verification

  • Run tests
  • Run analysis
  • Format the code

5. Documentation

  • Run the pkgs/dart_mcp_server/tool/update_readme.dart script to update the README.md file with any new features, it must be ran from the pkgs/dart_mcp_server directory.
  • Apply any other manual edits to the README.md file as needed.
  • Update the CHANGELOG.md file to include any user facing updates.

6. Update this skill

  • Update this SKILL.md file if that would be helpful for future features.

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.

Reviews can't be read right now.

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.