Loading...
Loading...
Skill for creating custom lint rules by leveraging the existing linter ecosystems of various programming languages. This is a linter designed for AI Agents rather than humans, and its error messages function as correction instruction prompts for AI. Create custom rules in the `lints/` directory using standard methods for each language, including Rust (dylint), TypeScript/JavaScript (ESLint), Python (pylint), Go (golangci-lint), etc. Use this skill in the following scenarios: (1) When you want AI to enforce project-specific coding rules; (2) When you want to create lint rules that output AI-readable correction instructions when violations occur; (3) When you want to enforce naming conventions, structural patterns, and consistency rules through AI-driven linting. Triggers: "Create a linter rule", "Add a lint rule", "Enforce this pattern", "AI linter", "Custom lint", "Code rules", "Naming rules", "Structural rules", "create a linter rule", "add a lint rule", "enforce this pattern", "AI linter".
npx skill4agent add j5ik2o/okite-ai custom-linter-creatorlints/lints/lints/| Language | Linter Tool | Details Link |
|---|---|---|
| Rust | dylint | Rust (dylint) |
| TypeScript/JavaScript | ESLint | ESLint |
| Python | pylint | Python (pylint) |
| Go | golangci-lint | Go (golangci-lint) |
lints/lints/lints/ls -la lints/| Language | Execution Command | Expected Output |
|---|---|---|
| Rust | | File path, line number of the violation, and AI-oriented message |
| TypeScript/JS | | Violation location and message corresponding to the messageId |
| Python | | Message code (such as C9001) and detailed message |
| Go | | Location information of the violation and message |
[違反内容]: 何が違反しているかを1文で説明
修正手順:
1. [具体的なアクション1]
2. [具体的なアクション2]
3. [具体的なアクション3]
コンテキスト: {file_path}:{line_number} の {identifier}
スコープ: 修正対象以外のコードは変更しないこと
理由: このルールが存在する理由を簡潔に記載{identifier}このファイルは mod.rs を使用しているが、プロジェクト規約で禁止されている。
修正手順:
1. このファイルの内容を親ディレクトリ名.rs にコピーする
2. 例: src/actors/mod.rs → src/actors.rs に移動する
3. mod.rs ファイルを削除する
4. 他ファイルの use/mod 宣言に変更は不要(パスは同じ)
コンテキスト: {file_path}:{line_number} の {module_name}
スコープ: 対象ファイルとその移動先のみ変更すること
理由: Rust 2018 エディションのモジュールスタイルに統一するためクラス '{class_name}' は曖昧なサフィックス '{suffix}' を使用している。
修正手順:
1. このクラスの責務を特定する(データアクセス?認証?調整?)
2. 責務を具体的に表す名前に変更する
例: UserManager → UserRepository / UserAuthenticator / UserCoordinator
3. このクラスへの全参照を新しい名前に更新する
コンテキスト: {file_path}:{line_number} の {class_name}
スコープ: クラス定義とその参照のみ変更すること
理由: Managerは責務が曖昧で、コードの意図が伝わりにくいため