generate-rules

Generate Detekt custom lint rules from pattern documentation as Kotlin source files.

1|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/oscardlfr/AndroidCommonDoc --skill generate-rules-oscardlfr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-rules
Source: https://github.com/oscardlfr/AndroidCommonDoc/tree/main/skills/generate-rules
Command: npx skills add https://github.com/oscardlfr/AndroidCommonDoc --skill generate-rules-oscardlfr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires generate-detekt-rules, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the creation of Detekt custom rules from pattern doc frontmatter, streamlining the process of adding new lint rules based on documentation.

Core Features & Use Cases

  • Automated Rule Generation: Dynamically generates Detekt rules from pattern documentation.
  • Dry Run Option: Allows previewing potential rule changes without affecting the system.
  • Project Specific Generation: Generates rules from pattern docs within a specific consumer project's directory.
  • Use Case: When you need to update Detekt rules to match recent changes in your codebase, this Skill can quickly create the necessary rules for you.

Quick Start

Generate Detekt rules for your project by running the command: generate-rules --consumer path/to/project

Frequently Asked Questions about generate-rules

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

FAQPage Schema
How do I generate custom Detekt rules from pattern documentation?

You can automate Detekt custom rule generation by parsing pattern documentation frontmatter to produce Kotlin source files. This streamlines adding new lint rules based on project documentation.

Can I preview Detekt rule generation changes without modifying my project?

Yes, you can preview potential Detekt rule changes without affecting the system by using a dry run option. This allows you to verify the generated lint rules before applying them to your codebase.

How do I generate Detekt lint rules for a specific consumer project directory?

You can generate Detekt lint rules for a specific consumer project by running the command with the consumer flag pointing to your project path. This targets the pattern documentation within that specific directory.

What is the best way to keep Detekt custom rules updated with codebase changes?

The best way to keep Detekt custom rules updated is to automate their generation from pattern documentation. This quickly creates the necessary lint rules to match recent changes in your codebase.

Do I need the Detekt toolchain to generate custom lint rules from pattern docs?

Yes, you need access to the Detekt toolchain to generate custom lint rules from pattern docs. The generated Kotlin source files are designed to integrate directly with your Detekt code quality checks.