coreindustries

lint

"Run code quality checks including linting, formatting, and type checking."

coreindustries 1 Updated 8mo ago
GitHub

Install

npx skillscat add coreindustries/core-ai-template/lint

Install via the SkillsCat registry.

SKILL.md

/lint

Run code quality checks including linting, formatting, and type checking.

Usage

/lint [target] [--fix] [--strict]

Arguments

  • target: Specific file or directory (default: src/ tests/)
  • --fix: Auto-fix issues where possible
  • --strict: Fail on warnings (for CI)

Instructions

When this skill is invoked:

Full Lint Pipeline

  1. Read prd/00_technology.md to find the correct commands

  2. Run all checks in sequence:

    # Linting (see prd/00_technology.md for specific command)
    {lint_check_command} src/ tests/
    
    # Formatting check
    {format_check_command} src/ tests/
    
    # Type checking
    {type_check_command} src/
  3. Report Results:

    ==================== Lint Results ====================
    
    ๐Ÿ“‹ Linting
    โœ… No issues found
    
    ๐Ÿ“ Formatting
    โš ๏ธ  2 files need formatting:
       - src/{project}/api/routes
       - tests/unit/test_config
    
    ๐Ÿ” Type Checking
    โœ… No type errors
    
    ==================== Summary ====================
    โœ… Linting: Passed
    โš ๏ธ  Formatting: 2 issues (run with --fix)
    โœ… Type Checking: Passed
    
    Run '/lint --fix' to auto-fix formatting issues.

With --fix Flag

# Fix linting issues
{lint_fix_command} src/ tests/

# Fix formatting
{format_fix_command} src/ tests/

Report what was fixed:

๐Ÿ”ง Auto-fixed issues:

Linting:
- src/{project}/api/routes: Removed unused import
- src/{project}/services/user: Sorted imports

Formatting:
- src/{project}/api/routes: Reformatted
- tests/unit/test_config: Reformatted

โœ… All issues fixed!

Specific Checks

Run individual checks (commands from prd/00_technology.md):

# Linting only
{lint_check_command} src/

# Formatting only
{format_check_command} src/

# Type checking only
{type_check_command} src/

# Security rules only (if supported)
{security_lint_command} src/

CI Mode (--strict)

For CI pipelines, use strict mode:

  • Returns non-zero exit code on any issue
  • Treats warnings as errors
  • Outputs machine-readable format if available

Quality Standards

From .claude/rules/code-quality.md:

  • โœ… All functions must have type annotations
  • โœ… All classes must have docstrings
  • โœ… No unused imports
  • โœ… Imports sorted
  • โœ… Line length within configured limit
  • โœ… No security issues

Example Output

$ /lint

๐Ÿ” Running code quality checks...

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
๐Ÿ“‹ Linting
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
โœ… All 15 files passed

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
๐Ÿ“ Formatting
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
โœ… All files formatted correctly

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
๐Ÿ” Type Checking
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Success: no issues found in 15 source files

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
โœ… All checks passed!
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”