Skip to content

Add Static analysis tool written in dart that checks for skill compliance with the open skills specification. - #57

Merged
reidbaker merged 21 commits into
flutter:mainfrom
reidbaker:r-linter-for-skills
Apr 6, 2026
Merged

reidbaker merged 21 commits into
flutter:mainfrom
reidbaker:r-linter-for-skills

Conversation

@reidbaker

@reidbaker reidbaker commented Apr 1, 2026 •

Copy link
Copy Markdown
Contributor

Design doc (googler only) go/flutter-dart-skills-lint-publish-plan
Fixes: #59

Review overview:

  • .agent/skills/
    • add-dart-lint-validation-rule is a custom skill for working on the linter.
    • The rest were installed with npx. I could use a second opinion about what should be checked in from hosted skills.
  • feature_design_docs/ are ai artifacts of unimplemented features. I don't think the contents need review but I am open to opinions about if this kind of thing is something we are ok with checking in.
  • knowledge/ is for docs about the structure of the lint codebase. Also ai artifacts. You are welcome to review contents but it is a lower priority.
  • lib/src/models
    • These are "just" simple dart models but that means the bar for quality is high. Would appreciate review on on both the structure and documentation/understandability of all of the model objects.
  • lib/src
    • This is the bulk of the actual code
    • Would appreciate review on patterns that are bad/wrong and for structural feedback (e.g better method organization)
  • tests
    • Most important: Missing classes of tests or areas you think that are easy to regress
    • Patterns that are bad across all the test.
  • README.md
    • Any documentation you see that is incorrect
    • Questions you would have as a consumer that are not answered.

Finally any advice you have to make this code more maintainable moving forward. How to integrate it into your cicd etc. I think ci changes should go into a second pr but it may still be valuable to talk about it here.

Features that need to be added.
Ignores for -d so that .dart_tool and other directories can be ignored.

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read the [Flutter Style Guide] recently, and have followed its advice.
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@reidbaker
reidbaker requested review from johnpryan and jwren April 1, 2026 20:00
@reidbaker
reidbaker marked this pull request as draft April 1, 2026 20:00
@reidbaker

Copy link
Copy Markdown
Contributor Author

/gemini review

@reidbaker
reidbaker marked this pull request as ready for review April 3, 2026 14:08
Comment thread tool/dart-skills-lint/lib/src/rules.dart Outdated
Comment thread tool/dart-skills-lint/lib/src/validator.dart Outdated
Comment thread tool/dart-skills-lint/lib/src/validator.dart
@reidbaker

Copy link
Copy Markdown
Contributor Author

/gemini review

@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 introduces a static analysis linter for Agent Skills, including the core validation engine, CLI entry point, and configuration parsing logic. The review feedback highlights concerns regarding the mutation of global state within the CheckType objects during configuration parsing and rule resolution, suggesting a shift toward immutable configuration objects. Additionally, there is a recommendation to improve the robustness of the YAML frontmatter parsing by moving away from reliance on a single global regular expression.

Comment thread tool/dart-skills-lint/lib/src/config_parser.dart Outdated
Comment thread tool/dart-skills-lint/lib/src/entry_point.dart Outdated
@visibleForTesting
static const maxCompatibilityLength = 500;

static final _skillStartRegex = RegExp(r'^---\s*\n(.*?)\n---\s*\n', dotAll: true);

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

Using a single global regex for parsing YAML frontmatter might fail if the file content is large or if the frontmatter format varies slightly. Consider using a more robust YAML parser that can handle the full file content or a dedicated frontmatter parsing library.

@reidbaker

Copy link
Copy Markdown
Contributor Author

Confirmed in chat that johnpryan says not to wait for the second review.

@reidbaker
reidbaker merged commit 12ff65d into flutter:main Apr 6, 2026
2 checks passed
@reidbaker
reidbaker deleted the r-linter-for-skills branch April 6, 2026 19:32
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.

Build a linter for skills that does not use tokens/agents for evaluation

2 participants