Back to list
manuelmauro

add-lint-rule

by manuelmauro

Agentic AI skills management, linting, and formatting

0🍴 0📅 Jan 23, 2026

SKILL.md


name: add-lint-rule description: Add a new lint rule to the validator license: MIT OR Apache-2.0

Add Lint Rule

Guide for adding a new lint rule to skilo.

Steps

  1. Choose a diagnostic code (E0XX for errors, W0XX for warnings)
  2. Add the code to DiagnosticCode enum
  3. Create the rule implementation
  4. Register the rule in the Validator
  5. Add configuration option if needed
  6. Add tests
  7. Update documentation

File Locations

FilePurpose
src/skill/validator.rsDiagnosticCode enum, Validator struct
src/skill/rules/mod.rsRule trait, module exports
src/skill/rules/*.rsIndividual rule implementations
src/config.rsConfiguration options

Rule Trait

pub trait Rule: Send + Sync {
    fn name(&self) -> &'static str;
    fn check(&self, manifest: &Manifest) -> Vec<Diagnostic>;
}

Example Rule

pub struct MyRule;

impl Rule for MyRule {
    fn name(&self) -> &'static str {
        "my-rule"
    }

    fn check(&self, manifest: &Manifest) -> Vec<Diagnostic> {
        // Validation logic here
        Vec::new()
    }
}

Configuration

For threshold-based rules, use Threshold type:

// In config.rs
#[serde(deserialize_with = "deserialize_threshold")]
pub my_rule: Threshold,

// In validator.rs
if let Some(max) = config.rules.my_rule.resolve(DEFAULT) {
    rules.push(Box::new(MyRule::new(max)));
}

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon