Skip to content

Add configutation files for Claude Code plugin definition#172

Merged
keertip merged 9 commits into
flutter:mainfrom
keertip:test-sync-workflow
Jul 14, 2026
Merged

Add configutation files for Claude Code plugin definition#172
keertip merged 9 commits into
flutter:mainfrom
keertip:test-sync-workflow

Conversation

@keertip

@keertip keertip commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

This PR adds

  • .claude-plugin : plugin.json and marketplace.json config files (copy from dart-lang/ai)
  • .mcp.json : config file for MCP server (copy from dart-lang/ai)
  • tool/sync_skills.dart : script for syncing the dart skills for dart-lang/skills and bumping plugin version
  • sync_skills.yaml - workflow for syncing the dart skills, configured to run daily, also trigger on changes to dart-repo. TBD: add trigger workflow dart-lang/skills.

Tested by manually running the workflow to sync in dart-lang/skills.

@keertip keertip requested review from johnpryan and mariamhas July 13, 2026 12:46

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds Claude Code plugins, MCP server configurations, and a comprehensive set of Dart and Flutter skill guides, along with a synchronization script tool/sync_skills.dart. The code review identified several critical issues in the synchronization script, including cross-platform path separator mismatches on Windows, missing exit code checks and rename handling in git diff commands, silent failures when full synchronization fails, and a lack of defensive checks for the existence of the source directory. Additionally, a minor syntax typo (unmatched double quote) was flagged in the dart-migrate-to-checks-package skill documentation.

Comment thread tool/sync_skills.dart

await for (final entity in sourceSkillsDir.list(recursive: true)) {
if (entity is File) {
final relPath = entity.path.replaceFirst('$srcDir/skills/', '');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

On Windows, entity.path uses backslashes (\\) as path separators, whereas $srcDir/skills/ uses forward slashes (/). This mismatch causes replaceFirst to fail to match, leading to incorrect destination paths during a full sync.

Normalize the path separators to forward slashes before performing the replacement to ensure cross-platform compatibility.

Suggested change
final relPath = entity.path.replaceFirst('$srcDir/skills/', '');
final relPath = entity.path.replaceAll('\\', '/').replaceFirst('${srcDir.replaceAll('\\', '/')}/skills/', '');

Comment thread tool/sync_skills.dart
Comment thread tool/sync_skills.dart
Comment thread tool/sync_skills.dart
..has((e) => e.message, 'message').equals('invalid input');

// NO (Passing a callback to sync throws will cause a compiler error!)
check(() => triggerSync").throws<ArgumentError>((it) => ...); // ERROR!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is an unmatched double quote in the code example (triggerSync"). It should be triggerSyncError() to match the context of the example.

Suggested change
check(() => triggerSync").throws<ArgumentError>((it) => ...); // ERROR!
check(() => triggerSyncError()).throws<ArgumentError>((it) => ...); // ERROR!

@keertip keertip requested a review from kenzieschmoll July 13, 2026 16:01
Comment thread README.md

@johnpryan johnpryan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread .github/workflows/sync_skills.yaml
Comment thread tool/sync_skills.dart Outdated
@keertip keertip merged commit fbb6bbc into flutter:main Jul 14, 2026
14 checks passed
@keertip keertip deleted the test-sync-workflow branch July 14, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants