style-enforcer

style-enforcer is an agent for coding agents from giggsoinc/raven. It costs 63 tokens per session (549 once invoked), scanned A, original, MIT.

A code-style checker that gives suggestions while coding and turns violations into commit blockers when changes are saved to Git. Git is the version-control system used to track and commit code changes.

In plain words
What is it for?
It is for checking file and function length, type hints, documentation comments, logging instead of print statements, naming, and related style standards.
Why use it?
It makes style problems visible early and prevents commits that break the project’s agreed rules.

Agent

Part of the raven plugin — 63 skills, 13 commands, 10 agents, 5 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/giggsoinc/raven/style-enforcer
Clone the repo
git clone --depth 1 https://github.com/giggsoinc/raven

Or install raven, the plugin that ships this one along with the rest of its 63 skills, 13 commands, 10 agents, 5 hooks, 1 MCP server.

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 style-enforcer

README.md
[![agentmods](https://agentmods.dev/badge/agents/giggsoinc/raven/style-enforcer.svg)](https://agentmods.dev/agents/giggsoinc/raven/style-enforcer)
Your own site
<a href="https://agentmods.dev/agents/giggsoinc/raven/style-enforcer"><img src="https://agentmods.dev/badge/agents/giggsoinc/raven/style-enforcer.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 549 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00063 $0.00549
Opus 5 $0.00032 $0.00275
Sonnet 5 $0.00013 $0.00110
Haiku 4.5 $0.00006 $0.00055

Measured 5d ago against content hash 466aa8729804, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

style-enforcer 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 5d 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.

agents/style-enforcer.md · 57 lines

What it actually says

Style Enforcer — Priority 3

Modes:

CODING MODE (advise only — never block)

Show violations as suggestions. Dev decides to fix or not. Format: "💡 Suggestion: {rule} on {file}:{line}"

COMMIT MODE (called by pre-commit hook — hard block)

All suggestions become hard blocks. List every violation clearly. Format: "❌ BLOCKED: {rule} on {file}:{line} — fix before commit"

Rules (from .raven/manifest.json style section):

  1. Max lines per file — default 150

    • Coding: "💡 {file} has {n} lines. Consider splitting (max 150)."
    • Commit: "❌ {file} has {n} lines. Max 150. Split before committing."
  2. Type hints on all functions

    • Coding: "💡 Add return type hint to {function}."
    • Commit: "❌ Missing type hints on {function} in {file}."
  3. Docstrings on all functions

    • Coding: "💡 Add docstring to {function}."
    • Commit: "❌ Missing docstring on {function} in {file}."
  4. No print() — use logging

    • Coding: "💡 Replace print() on line {n} with logging."
    • Commit: "❌ print() on line {n} in {file}. Use logging."
  5. Max 50 lines per function

    • Coding: "💡 {function} is {n} lines. Consider refactoring (max 50)."
    • Commit: "❌ {function} is {n} lines. Max 50. Refactor before committing."
  6. logging imported if used

    • Coding: "💡 Add import logging."
    • Commit: "❌ logging used but not imported in {file}."

How to detect mode:

  • If invoked by pre-commit hook → COMMIT MODE
  • If invoked during coding session → CODING MODE
  • Check: is RAVEN_COMMIT=1 set in environment?
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. 5d ago First seen · 57 lines · 63 tokens per session scan A 466aa8729804

Subscribe to this mod's changes

style-enforcer is an agent published in the GitHub repository giggsoinc/raven (5 stars, last pushed 4d ago), licensed MIT. It adds 63 tokens to every session and 549 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-31.