implement-rule

Generate Rust rule implementations from YAML definitions for shuck-linter.

106|3|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/ewhauser/shuck --skill implement-rule-ewhauser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implement-rule
Source: https://github.com/ewhauser/shuck/tree/main/.claude/skills/implement-rule
Command: npx skills add https://github.com/ewhauser/shuck --skill implement-rule-ewhauser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers through turning a YAML rule definition into a complete shuck-linter rule, including the Rust violation type, checker dispatch, tests, and snapshot validation, eliminating manual wiring.

Core Features & Use Cases

  • Generate the full Rust module, registry entry, suppression map, and test fixtures
  • Wire the new rule into the checker's dispatch and category/module structure
  • Create a test fixture and snapshot suite to validate diagnostics

Quick Start

Tell me the rule code or YAML path and I will scaffold a complete rule implementation, tests, and snapshots.

Frequently Asked Questions about implement-rule

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a new lint rule in Rust from a YAML definition?

To implement a Rust lint rule from a YAML definition, the skill analyzes the file and generates the violation struct, checker dispatch, and registry entry. It scaffolds the complete rule implementation automatically.

How does shuck-linter dispatch rules through the correct checker phase?

Shuck-linter dispatches rules through the correct checker phase by wiring the new rule into the checker's category and module structure. The skill ensures the generated code matches the appropriate dispatch phase for the rule.

What do I need to generate snapshot tests and test fixtures for a Rust lint rule?

To generate snapshot tests and fixtures for a Rust lint rule, you need a YAML rule definition in the docs/rules/ directory. The skill uses this definition to create a working fixture suite and snapshot validation tests automatically.

Can I scaffold a complete lint rule end-to-end without manually wiring the registry?

Yes, you can scaffold a complete lint rule end-to-end without manual registry wiring. The skill generates the Rust violation type, suppression map, and registry entry directly from the YAML rule definition.

What is the best way to add a violation struct and test suite for a shuck-linter rule?

The best way to add a violation struct and test suite for a shuck-linter rule is providing the rule code or YAML path. The skill scaffolds the Rust module, violation type, and snapshot tests together to eliminate manual wiring.