wishtohear/bucket-water-oms/add-dart-lint-validation-rule
Claude Code and agent skill by wishtohear/bucket-water-oms
- community
Checking that the SKILL.md file is still in the repository.
Instructions for adding a new validation rule and CLI flag to dart_skills_lint.
Install
npx vskill@latest install wishtohear/bucket-water-oms/add-dart-lint-validation-ruleSKILL.md
Add a New Validation Rule and Flag
Use this skill when you need to add a new validation rule to the dart_skills_lint package, expose it as a toggleable CLI flag, and verify its behavior.
๐ ๏ธ Step-by-Step Implementation
1. Create the Rule Class
Create a new file in lib/src/rules/ extending SkillRule.
2. Register the Rule in lib/src/rule_registry.dart
Add a new CheckType instance to RuleRegistry.allChecks list. This automatically exposes it as a CLI flag.
Then, add a case to RuleRegistry.createRule to instantiate your rule:
3. Handle Disabled by Default Rules (If applicable)
If the rule is disabled by default (defaultSeverity: AnalysisSeverity.disabled), passing the flag --check-my-new-rule will automatically enable it with AnalysisSeverity.error severity (handled in entry_point.dart).
๐งช Testing the New Rule
You must write automated tests verifying your rule triggers when it should and skips when it shouldn't.
Preferred Approach: In-Memory Unit Tests
Instead of writing files to disk, test the rule directly using a mock SkillContext. This is faster and avoids I/O dependencies.
Integration Tests
If the rule interacts with CLI flags or configuration files, add a test in test/cli_integration_test.dart using TestProcess.
[!IMPORTANT]When writing integration tests that use config files andTestProcess, ensure that paths in the config file and paths passed to the CLI match in style (both relative or both absolute) to avoid issues with path matching inentry_point.dart.
๐ Documentation Updates
When a new rule is introduced, verify that you synchronize sibling markdown files!
- `README.md`:
- Add your flag under the Usage and Flags sections so users know it exists.
- `documentation/knowledge/SPECIFICATION.md`:
- Document the formal constraint in the specification if it defines a standard for skill files.
๐ฆ Checklist Before Submitting PR
- [ ] Rule class created in
lib/src/rules/. - [ ] Rule registered in
lib/src/rule_registry.dart. - [ ] Unit tests added in
test/using in-memorySkillContext. - [ ] Usage listed in
README.md. - [ ] Schema documented in
documentation/knowledge/SPECIFICATION.md(if applicable). - [ ] Run
dart format .to format code. - [ ] Run
dart analyze --fatal-infosto ensure no issues. - [ ] Run
dart testto ensure tests passing.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingbucket-water-oms-admin-mobile/tool/dart_skills_lint/.agents/skills/add-dart-lint-validation-rule/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/wishtohear/bucket-water-oms/add-dart-lint-validation-rule)