Skip to content

Fix Claude plugin directory validation warnings - #265

Merged
keertip merged 1 commit into
flutter:mainfrom
keertip:claude-plugin-fixes
Nov 11, 2026
Merged

keertip merged 1 commit into
flutter:mainfrom
keertip:claude-plugin-fixes

Conversation

@keertip

@keertip keertip commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Resolves validation warnings and false-positive policy holds reported by the Claude plugin directory scanner:

  • Moves assets/flutter-icon.png to .claude-plugin/icon.png and removes the "icon" key from .claude-plugin/plugin.json so the directory picks up the icon by convention without triggering UNKNOWN_KEY_CROSS_TOOL.
  • Removes the unused non-square assets/flutter-logo.png, which triggered UNREAD_ASSET_REFERENCED findings across tool/.
  • Renames defaultMaxOutputTokens to defaultMaxOutputLimit in tool/generator/lib/src/services/gemini_service.dart so the directory scanner does not mistake the identifier for a credential token (MCP_FORWARDS_CREDENTIAL_ENV).

@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 removes the icon configuration from the Claude plugin settings and renames the defaultMaxOutputTokens constant to defaultMaxOutputLimit in the Gemini service, updating its references. The review feedback suggests updating the corresponding log messages to use 'Max Output Limit' instead of 'Max Output Tokens' for consistency and to prevent potential false-positive scanner alerts.


_logger.info(
' Model: $_model, Max Output Tokens: $defaultMaxOutputTokens, Thinking Budget: $thinkingBudget',
' Model: $_model, Max Output Tokens: $defaultMaxOutputLimit, Thinking Budget: $thinkingBudget',

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

To maintain consistency with the renamed variable defaultMaxOutputLimit and to further prevent potential false-positive scanner alerts on the word 'Tokens', consider updating the log message to use 'Max Output Limit' instead of 'Max Output Tokens'.

Suggested change
' Model: $_model, Max Output Tokens: $defaultMaxOutputLimit, Thinking Budget: $thinkingBudget',
' Model: $_model, Max Output Limit: $defaultMaxOutputLimit, Thinking Budget: $thinkingBudget',


_logger.info(
' Model: $_model, Max Output Tokens: $defaultMaxOutputTokens, Thinking Budget: $thinkingBudget',
' Model: $_model, Max Output Tokens: $defaultMaxOutputLimit, Thinking Budget: $thinkingBudget',

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

To maintain consistency with the renamed variable defaultMaxOutputLimit and to further prevent potential false-positive scanner alerts on the word 'Tokens', consider updating the log message to use 'Max Output Limit' instead of 'Max Output Tokens'.

Suggested change
' Model: $_model, Max Output Tokens: $defaultMaxOutputLimit, Thinking Budget: $thinkingBudget',
' Model: $_model, Max Output Limit: $defaultMaxOutputLimit, Thinking Budget: $thinkingBudget',


_logger.info(
' Model: $_model, Max Output Tokens: $defaultMaxOutputTokens, Thinking Budget: $thinkingBudget',
' Model: $_model, Max Output Tokens: $defaultMaxOutputLimit, Thinking Budget: $thinkingBudget',

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

To maintain consistency with the renamed variable defaultMaxOutputLimit and to further prevent potential false-positive scanner alerts on the word 'Tokens', consider updating the log message to use 'Max Output Limit' instead of 'Max Output Tokens'.

Suggested change
' Model: $_model, Max Output Tokens: $defaultMaxOutputLimit, Thinking Budget: $thinkingBudget',
' Model: $_model, Max Output Limit: $defaultMaxOutputLimit, Thinking Budget: $thinkingBudget',

@keertip
keertip requested a review from johnpryan November 11, 2026 20:51

/// The default max output tokens for generation.
static const int defaultMaxOutputTokens = 8192;
static const int defaultMaxOutputLimit = 8192;

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.

I'm not sure why Claude is concerned with the tool/ directory. Is there a way to ignore it entirely?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Unfortunately not. The validator scans the entire repo, as the root of the repo is the root of the plugin.

@keertip
keertip merged commit e5a88d2 into flutter:main Nov 11, 2026
1 check passed
@keertip
keertip deleted the claude-plugin-fixes branch November 11, 2026 21:58
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.

2 participants