protolint: Skill for Claude Code

.claude/skills/add-lint-rule/SKILL.md

add-lint-rule is a skill for Claude Code from yoheimuta/protolint. It costs 52 tokens per session (811 once invoked), scanned A, original, MIT.

A development guide for adding a new protolint rule. A lint rule automatically checks source files for a specific problem or style requirement.

In plain words
What is it for?
It helps implement the rule, write table-driven tests, register it, add configuration and severity handling, provide example files, and document its setting.
Why use it?
It prevents a new rule from working only in code while remaining unavailable, unconfigurable, or undocumented for users. It lays out the related implementation, tests, registration, configuration, examples, and documentation.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is yoheimuta/protolint's own configuration. It tells Claude Code how to work on protolint itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything protolint configures →

Reuse

Borrowing it

Nothing to install: this file belongs to yoheimuta/protolint. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/yoheimuta/protolint/master/.claude/skills/add-lint-rule/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/yoheimuta/protolint

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-lint-rule

README.md
[![agentmods](https://agentmods.dev/badge/skills/yoheimuta/protolint/add-lint-rule/github.svg)](https://agentmods.dev/skills/yoheimuta/protolint/add-lint-rule)
Your own site
<a href="https://agentmods.dev/skills/yoheimuta/protolint/add-lint-rule"><img src="https://agentmods.dev/badge/skills/yoheimuta/protolint/add-lint-rule/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-lint-rule

Your own site · 80×15
<a href="https://agentmods.dev/skills/yoheimuta/protolint/add-lint-rule"><img src="https://agentmods.dev/badge/skills/yoheimuta/protolint/add-lint-rule.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 811 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.00811
Opus 5 $0.00026 $0.00405
Sonnet 5 $0.00010 $0.00162
Haiku 4.5 $0.00005 $0.00081

Measured 9d ago against content hash 23fcd8133c10, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

add-lint-rule scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/add-lint-rule/SKILL.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Adding a lint rule

A rule is not done when Apply works — it has to be registered, made configurable, and documented, or it is invisible to users. Copy the closest existing rule rather than starting from scratch.

Files to touch

File Always? What goes in
internal/addon/rules/<camelCase>Rule.go yes the rule
internal/addon/rules/<camelCase>Rule_test.go yes table-driven tests
internal/cmd/subcmds/rules.go yes register in newAllInternalRules
internal/linter/config/rulesOption.go yes one field on RulesOption
README.md yes a row in the ## Rules table
_example/config/.protolint.yaml yes a commented example entry
internal/linter/config/<name>Option.go (+ test) only if configurable a dedicated option type
_testdata/rules/<name>/*.proto when fixtures help input protos

Naming is mechanical: rule ID FIELD_NUMBERS_ORDER_ASCENDING → type FieldNumbersOrderAscendingRule → file fieldNumbersOrderAscendingRule.go → config key field_numbers_order_ascending.

The rule type

Embed RuleWithSeverity and implement:

  • ID() stringUPPER_SNAKE_CASE, unique
  • Purpose() string — one sentence; it is user-facing and goes in the README verbatim
  • IsOfficial() boolthis decides whether the rule is on by default

Rules.Default() in internal/linter/rule/rules.go keeps only rules where IsOfficial() is true. Return true only for rules from the official style guide; anything opinionated returns false and users opt in via .protolint.yaml.

Apply(proto *parser.Proto) ([]report.Failure, error) walks the AST with a visitor from linter/visitor.

Fixable and auto-disable

Both are opt-in and both show up as columns in the README table.

  • Fixable — build the visitor with visitor.NewBaseFixableVisitor and take a fixMode bool in the constructor. Users get it via -fix.
  • AutoDisable — take autoDisableType autodisable.PlacementType. The constructor must force fixMode = false when autoDisableType != autodisable.Noop; the two cannot both apply. Users get it via -auto_disable.

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 79 lines · 52 tokens per session scan A 23fcd8133c10

Subscribe to this mod's changes

add-lint-rule is a skill published in the GitHub repository yoheimuta/protolint (697 stars, last pushed 25d ago), licensed MIT. It adds 52 tokens to every session and 811 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

no-bare-casts

Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.

prisma/orm · 52 tokens

performance-lint-rules

Performance review guidance for Oxc linter rule implementations. Use only when reviewing Rust rule code under crates/oxclinter/src/rules/ or when explicitly auditing those rules for performance improvements.

oxc-project/oxc · 45 tokens

ultracite

Ultracite is a zero-config linting and formatting preset for JavaScript/TypeScript projects. Use when: (1) Setting up or initializing Ultracite in a project (ultracite init), (2) Running linting or formatting commands (check, fix, doctor), (3) Writing or reviewing JS/TS code in a project that uses Ultracite — to…

haydenbleasel/ultracite · 142 tokens

solid-principles

SOLID principles checklist with Java examples. Use when a class has too many responsibilities, an abstraction leaks, or a dependency points the wrong way, and when the user asks about Single Responsibility, Open/Closed, Liskov, Interface Segregation or Dependency Inversion. For naming, duplication and method length…

decebals/claude-code-java · 73 tokens

go-concurrency-safety

L1 supplement - audits Go-specific concurrency hazards in node client code: map iteration non-determinism, goroutine leaks, mutex ordering, panic boundaries, context cancellation.

PlamenTSV/plamen · 40 tokens

ring:auditing-dependency-security

Auditing a dependency for supply-chain risk before install (pip/npm/go/cargo): checks typosquatting, maintainer/age risk, vulnerability DBs (OSV, GHSA, Socket), and lockfile hash pinning, then emits a risk score and approve/conditional/escalate/block decision. Use when adding or updating a dependency, reviewing a…

LerianStudio/ring · 102 tokens