implement-fix

Convert existing shuck-linter rules into fixable diagnostics with Edit and Fix primitives.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Implement an autofix workflow for an existing shuck-rs lint rule by attaching a Fix to diagnostics and configuring FixAvailability so users get automated code rewrites instead of manual edits.

Core Features & Use Cases

  • Converts fix-eligible rules into fixable diagnostics by wiring Fixes and test scaffolding.
  • Guides adding YAML metadata (new_code, safe_fix, fix_description), creating Edit/Fix primitives, and updating tests, snapshots, and fixtures to ensure parity.
  • Supports safe and unsafe fix paths with proper classification and test coverage, enabling end-to-end rule evolution from rule to repair.

Quick Start

Explain how to turn an existing shuck-linter rule into a fixable rule by wiring a Fix to each diagnostic and updating tests and fixtures.

Frequently Asked Questions about implement-fix

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

FAQPage Schema
How do I add an autofix to an existing Rust lint rule?

Wiring a Fix to an existing lint rule involves creating Edit primitives for the correction, updating the Violation, and adding YAML fields like safe_fix and fix_description to classify and document the automated rewrite.

What YAML metadata is required to make a shuck diagnostic fixable?

Making a shuck diagnostic fixable requires the YAML fields new_code, safe_fix, and fix_description. These fields classify the fix safety, show the corrected code, and explain the automated rewrite to the user.

How do I test a lint autofix to ensure it matches the conformance corpus?

To test a lint autofix against the conformance corpus, you add test cases and fixtures using the testing framework. This verifies that the Edit and Fix primitives produce the expected code rewrites and preserve snapshot parity.

When do I need to extend facts when implementing a fix for a lint rule?

You need to extend facts when the existing lint rule metadata lacks the information required to identify the correct edit spans for the Fix. Extending facts allows the diagnostic to locate and apply the automated code rewrite accurately.

Does this autofix workflow support both safe and unsafe Rust lint fixes?

Yes, the autofix workflow supports both safe and unsafe Rust lint fixes. It uses the safe_fix YAML field to classify the fix path properly and requires dedicated test coverage for each scenario to ensure rule evolution parity.

What is the best way to turn a linter rule into an automated code rewrite?

The best way to turn a linter rule into an automated code rewrite is to map the diagnostic to specific edit spans, attach an Edit and Fix primitive, and update the rule's YAML metadata and test fixtures to validate the correction.