Agent skill
verify-rule
Validate that a rule has all required files (analyzer, descriptor, test cases, docs) and passes tests. Use after implementing or modifying a rule to confirm completeness.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/verify-rule
SKILL.md
Verify a Rule is Complete
Rule ID: $ARGUMENTS
Run each check below and report pass/fail for each.
1. Analyzer file exists
- Glob for
src/Spire.Analyzers/Rules/$ARGUMENTS*Analyzer.cs - Verify it has
[DiagnosticAnalyzer(LanguageNames.CSharp)] - Verify it references a descriptor from
Descriptors.cs
2. Descriptor registered
- Grep
src/Spire.Analyzers/Descriptors.csforid: "$ARGUMENTS"
3. Test structure exists
- Verify test folder exists:
tests/Spire.Analyzers.Tests/$ARGUMENTS/ - Verify test runner exists:
tests/Spire.Analyzers.Tests/$ARGUMENTS/${ARGUMENTS}Tests.cs - Verify test runner inherits
AnalyzerTestBase<...>and overridesRuleId - Verify case folder exists:
tests/Spire.Analyzers.Tests/$ARGUMENTS/cases/ - Verify shared preamble exists:
tests/Spire.Analyzers.Tests/$ARGUMENTS/cases/_shared.cs - Count
should_failcase files (need >= 3): files starting with//@ should_fail - Count
should_passcase files (need >= 3): files starting with//@ should_pass - Verify all case files have proper headers (
//@ should_failor//@ should_passon line 1) - Verify all
should_failfiles have at least one//~ ERRORor//~^ ERRORmarker
4. Documentation exists
- Look for
docs/rules/$ARGUMENTS.md - Verify it has all 5 required sections per
.claude/rules/documentation-conventions.md: Title, Property table, Description, Examples, When to Suppress
5. Tests pass
dotnet test --filter "FullyQualifiedName~$ARGUMENTS"
6. Summary
Print a pass/fail checklist with counts.
Constraints
- Do NOT create missing files — only report what's missing
- Do NOT modify existing code or documentation
- This is a read-only verification — if checks fail, report them and stop
- Do NOT lower the thresholds (3 detection, 3 false-positive test cases minimum)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?