{
  "markdown": "# LintConfig\n\nAn AI skill that automatically interprets coding standards, configures static analysis and linting tools, executes lint checks, and assists with code quality improvement. The skill supports both configuration-only workflows (e.g., \"generate a linter config for a coding standard\") and end-to-end quality enforcement workflows (e.g., \"check this code against our coding standard and suggest fixes\").\n\n## Features\n\n- **Automatic Coding Standard Parsing**: Converts natural language coding standards into formalized coding rules using a structured grammar. \n- **Intelligent Linter Configuration**: Automatically maps coding rules to appropriate linter rules and generates validated configuration files.\n- **Multi-Linter Support**: Currently supports Checkstyle (Java) with extensible architecture for additional linters.\n- **Coverage Analysis**: Classifies configuration coverage (Exact Match, Over-Approximation, Under-Approximation) to help you understand how well the linter configuration aligns with your coding standards.\n- **End-to-End Workflow**: From coding standard → rules → configuration → linting → violation repair suggestions.\n- **Rule Knowledge Base**: Pre-built index and complete information for Linter Rules.\n\n## Why develop the tool: Mitigating AI Configuration Hallucinations\n\nAI-assisted configuration tools, while powerful, can sometimes misinterpret coding standards and generate **incorrect** or **incomplete** configurations.  \n\n**LintConfig** mitigates this by:\n\n1. **Compiling coding standards into structured, standardized coding rules**.  \n2. **Checking linter documentation to ensure valid configurations**.\n\n<img src=\"fig/example3.png\" width=\"60%\" />\n\n## Installation\n\n### Prerequisites\n\n- Python 3.x (for rule data preparation scripts, if needed)\n- Access to one of the supported AI coding assistants\n- Install **ripgrep** to enable search tool in Claude Code.  See [this issue](https://github.com/anthropics/claude-code/issues/6726) for details.\n\n### Recommended: forced-eval hook\nAdd hooks for claude code. ( Although Skills are designed to auto-activate in Claude Code, but in practice, activation is unreliable without explicit hooks. )\n```\npnpx claude-skills-cli add-hook\n```\n\n### Using Claude Marketplace (Claude Code)\n\nInstall directly in Claude Code with two commands:\n\n```\n/plugin marketplace add idiomaticrefactoring/LintConfig\n/plugin install LintConfig@LintConfig\n```\n\n### Manual Installation (Recommended Installation Way!)\n\n1. Clone or download this repository\n2. Copy the skill to the appropriate skills directory for your platform:\n\n**Example:**\n```bash\n# For Claude Code\ncp -r LintConfig/skills/LintConfig ~/.claude/skills/\n\n# For Cursor\ncp -r LintConfig/skills/LintConfig ~/.cursor/skills/\n```\n\n| Platform | Skills Directory | Activation |\n|----------|-----------------|------------|\n| Claude Code | `~/.claude/skills/` | Auto-activate |\n| Cursor | `~/.cursor/skills/` | Auto-activate |\n| Windsurf | `~/.windsurf/skills/` | Auto-activate |\n| GitHub Copilot | `~/.copilot/skills/` | Use `/lintconfig` command |\n| OpenCode | `~/.opencode/skills/` | Auto-activate |\n| Codex | `~/.codex/skills/` | Use `/lintconfig` command |\n| Gemini | `~/.gemini/skills/` | Auto-activate |\n\n\n## Usage\n\n### Skill Mode (Auto-activate)\n\n**Supported:** Claude Code, Cursor, Windsurf, OpenCode, Gemini\n\nThe skill activates automatically when you request linter configuration or code quality tasks. Just chat naturally:\n\n```\nGenerate Checkstyle configuration for \"Package declaration\nThe package declaration is not line-wrapped. The column limit (Section 4.4, Column limit: 100) does not apply to package declarations.\"\n```\n\n```\nConfigure Checkstyle for Google Java Style Guide\n```\n\n```\nCheck this code at LintConfig/code/ArrayCombination.java against our coding standard at LintConfig/test/test_cs/package_declaration.txt and suggest fixes\n```\n\n### Workflow Mode (Slash Command)\n\n**Supported:** GitHub Copilot, Codex\n\nUse the slash command to invoke the skill:\n\n```\n/lintconfig Generate a linter configuration that enforces:\nPackage declaration\nThe package declaration is not line-wrapped. The column limit (Section 4.4, Column limit: 100) does not apply to package declarations.\n```\n\n```\n/lintconfig Configure Checkstyle for Google Java Style Guide\n```\n\n### Workflow Modes\n\n#### 1. Configuration-Only Mode\n\nGenerate linter configuration files without executing lint checks:\n\n```\nGenerate a Checkstyle configuration for the following coding standard:\n[Your coding standard here]\n```\n\n#### 2. End-to-End Quality Enforcement Mode\n\nFull workflow from standard → configuration → linting → repair:\n\n```\nParse this coding standard, configure Checkstyle, lint my code, and suggest fixes:\n[Your coding standard or file path or url]\n[Your lintername]\n[Your code or file path]\n```\n\n### Supported Platforms\n\n| Platform | Installation | Activation | Status |\n|----------|-------------|------------|--------|\n| Claude Code | Marketplace / Manual | Auto-activate | ✅ Supported |\n| Cursor | Manual | Auto-activate | ✅ Supported |\n| Windsurf | Manual | Auto-activate | ✅ Supported |\n| GitHub Copilot | Manual | Slash command `/lintconfig` | ✅ Supported |\n| OpenCode | Manual | Auto-activate | ✅ Supported |\n| Codex | Manual | Slash command `/lintconfig` | ✅ Supported |\n| Gemini | Manual | Auto-activate | ✅ Supported |\n\n## How It Works\n\nThe skill follows a structured 5-step process:\n\n### Step 1: Extract Key Information\n- Identifies coding standard (from text, file, or URL)\n- Determines target linter (Checkstyle, ESLint, Ruff, etc.)\n- Extracts programming language and code context\n- Prepares linter rule knowledge base if needed\n\n### Step 2: Formalize Coding Standards\n- Parses natural language coding standards into atomic coding rules\n- Uses structured grammar to represent rules formally\n- Handles edge cases and clarifications as separate rules\n- Outputs a complete rule set for configuration mapping\n\n### Step 3: Configure Linter\n- Maps each coding rule to candidate linter rules\n- Retrieves complete rule documentation and options\n- Binds option values within valid ranges\n- Classifies coverage relationship (Exact Match, Over/Under-Approximation)\n- Filters invalid configurations\n- Generates validated configuration file\n\n### Step 4: Execute Linter\n- Runs the generated linter configuration against your code\n- Captures and saves linting results\n- Reports violations with context\n\n### Step 5: Suggest Repairs\n- Analyzes linting violations\n- Provides fix suggestions aligned with coding rules\n- Helps improve code quality systematically\n\n## Supported Linters\n\n| Linter | Language | Status | Rules Available |\n|--------|----------|--------|-----------------|\n| Checkstyle | Java | ✅ Active | 184+ rules |\n| ESLint | JavaScript/TypeScript | 🚧 Planned | - |\n| Ruff | Python | 🚧 Planned | - |\n| Pylint | Python | 🚧 Planned | - |\n| RuboCop | Ruby | 🚧 Planned | - |\n\n## Project Structure\n\n```\nLintConfig/\n├── data/                          # Linter rule knowledge base\n│   └── Checkstyle/\n│       ├── CheckstyleIndex.json   # Rule index (184 rules)\n│       ├── CheckstyleConfig.xml   # Example configuration\n│       └── rules/                 # Complete rule documentation\n│           └── [184 JSON files]   # Individual rule details\n├── prompt/                        # Prompt templates\n│   ├── Prompt_Parse_CodingStandard.md\n│   ├── Prompt_Configure_Linter.md\n│   ├── Prompt_Prepare_LinterRuleIndex.md\n│   └── Prompt_Prepare_LinterRuleCompleteInformation.md\n├── output/                        # Generated configurations\n│   ├── CheckstyleConfig.xml\n│   ├── CONFIGURATION_SUMMARY.txt\n│   └── RULE_MAPPING_TABLE.txt\n├── test/                          # Test cases\n│   ├── test_cs/                   # Checkstyle test files\n│   └── test_task_prompt/          # Prompt examples\n├── SKILL.md                       # Skill definition\n└── README.md                      # This file\n```\n\n## Example Output\n\n### Configuration Summary\n\n```\nCHECKSTYLE CONFIGURATION SUMMARY\n================================================================================\n\nPROJECT: Google Java Style Guide - Checkstyle Configuration\nTotal Coding Rules Analyzed: 47\nCheckstyle Rules Configured: 23\n\nCOVERAGE CLASSIFICATION\n- Exact Match:           32 rules (68%)\n- Over-Approximation:    5 rules (11%)\n- Under-Approximation:   3 rules (6%)\n- Not Covered:           7 rules (15%)\n\nRules Successfully Mapped: 40 out of 47 (85%)\n```\n\n### Generated Configuration\n\nThe skill generates validated XML/JSON/YAML configuration files ready to use:\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module name=\"Checker\">\n  <module name=\"LineLength\">\n    <property name=\"max\" value=\"100\"/>\n    <property name=\"ignorePattern\" value=\"^(package|import) .*\"/>\n  </module>\n  <module name=\"TreeWalker\">\n    <module name=\"NoLineWrap\">\n      <property name=\"tokens\" value=\"PACKAGE_DEF\"/>\n    </module>\n  </module>\n</module>\n```\n\n## Coverage Classification\n\nThe skill classifies how well each linter configuration aligns with your coding rules:\n\n- **Exact Match**: The linter configuration checks exactly the same violations as the coding rule\n- **Over-Approximation**: The linter flags more issues than the coding rule requires\n- **Under-Approximation**: The linter flags fewer issues than the coding rule requires\n- **Mismatches**: Non-aligned cases (filtered out)\n\nThis helps you understand the limitations and make informed decisions about your linting setup.\n\n## Contributing\n\nWe welcome contributions! Areas where help is needed:\n\n1. **Additional Linter Support**: Add support for ESLint, Ruff, Pylint, RuboCop, etc.\n2. **Rule Knowledge Base**: Expand rule documentation for existing and new linters\n3. **Language Support**: Add support for more programming languages\n4. **Testing**: Add test cases for various coding standards and edge cases\n5. **Documentation**: Improve prompts and examples\n\n### Development Setup\n\n1. Clone the repository\n2. Review the existing structure in `data/Checkstyle/` as a template\n3. For new linters:\n   - Create `data/<LinterName>/` directory\n   - Generate `<LinterName>Index.json` with rule index\n   - Create `rules/` directory with each rule complete documentation\n4. Test with various coding standards and code samples\n\n## Roadmap\n\n- [x] Multi-platform deployment (Claude Code, Cursor, Windsurf, GitHub Copilot, OpenCode, Codex, Gemini)\n- [ ] Support for 5+ major programming languages\n- [ ] Support for 3-5 popular linters per language\n- [ ] Enhanced prompt compatibility testing\n- [ ] Automated rule knowledge base generation\n- [ ] Integration with CI/CD pipelines\n- [ ] CLI installer for easy multi-platform setup\n\n## Acknowledgments\n\nInspired by the need for automated linting configuration in AI-assisted coding workflows. Built to bridge the gap between natural language coding standards and formal linter configurations.\n",
  "bytes": 10849,
  "sha": "a7eaa1f7e0560281c281292bf136d3fc76b4c0508fae91d883510c8081d2a97c",
  "repo_slug": "idiomaticrefactoring/lintconfig",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_idiomaticrefactoring_lintconfig_lintconf_002ca261/readme"
}