By dynamik-dev
Enforce, maintain, and refine custom lint rules via a hybrid semantic-structural engine. Auto-detect stack, author rules with fixture testing, audit rule health from telemetry, and auto-close PRs that prune noisy or dead rules.
Evaluates a single bully semantic-evaluation payload against a diff and returns a structured violation list. Invoked exclusively by the bully skill when the PostToolUse hook injects a SEMANTIC EVALUATION REQUIRED payload. Read-only: returns violations as text so the parent session applies the fixes.
Background entropy agent. Runs `bully-review` against accumulated telemetry and opens a single, small PR retiring or downgrading the most-deserving rule (one rule per run).
Authors, modifies, or removes rules in `.bully.yml`. Use when the user says "add a lint rule for X", "ban Y", "tighten <rule-id>", "make <rule-id> a warning", "convert <rule-id> to semantic", "remove <rule-id>", "change the scope of <rule-id>", or asks to apply recommendations from `/bully-review`. Always tests a rule against a fixture before writing it to the config.
Bootstraps a project's .bully.yml by detecting the tech stack from manifest files, migrating rules from existing linting tools, and generating a baseline config. Use when user says "init agentic lint", "set up agentic lint", "bootstrap lint config", "create lint rules", "bully init", "initialize agentic lint", or asks to create or generate an agentic lint configuration.
Reviews bully rule health from the telemetry log. Use when the user says "review my lint rules", "check rule health", "which lint rules are noisy", "find dead lint rules", "bully review", or asks for an audit of `.bully.yml`. Surfaces noisy, dead, and slow rules and suggests which to adjust, remove, or promote.
Interprets bully PostToolUse hook output after Edit/Write -- fixes blocked-stderr violations or dispatches the bully-evaluator subagent for semantic payloads.
Modifies files
Hook triggers on file write and edit operations
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
The edit doesn't land until your lint rules pass.
Install · Quick start · Configuration · Architecture · Design · Rule authoring · Telemetry
Bully is a PostToolUse hook for Claude Code. On every Edit and Write, it runs your linters (ruff, tsc, eslint, biome, phpstan, clippy, …) and uses an LLM to evaluate plain-English rules against the diff. If anything fails, Claude can't land the edit. Each block feeds the rule back to the agent, so your rules improve its behavior without manual coaching.
Read the Design doc for the architecture, data flow, and baseline contract.
/plugin marketplace add https://github.com/dynamik-dev/bully
/plugin install bully
Restart Claude Code. Then in a project:
> /bully-init
/bully-init detects your stack, wires your existing linters as passthrough rules, and creates .bully/ for telemetry. Review the generated .bully.yml, tweak, commit.
Manual install, bully doctor, model overrides, and uninstall live in Reference.
> /bully-init # bootstrap a config from your stack
> /bully-author # add a rule (engine routing + fixture test)
> /bully-review # prune noisy and dead rules from telemetry
bully baseline-init --glob "src/**/*.ts" # ignore pre-existing violations
bully guide src/foo.ts # which rules apply before editing
bully lint src/foo.ts --print-prompt # debug the semantic prompt
Silence one line when a rule is right in general but wrong here:
eval(expr); // bully-disable: no-eval reason: sandboxed input
engine: script rules call your existing linters as subprocesses (ruff check --quiet {file}, tsc --noEmit). The same checks CI runs, blocking on every edit.engine: ast rules use ast-grep to match shape, not text. Comments, strings, and formatting variants don't fool them.engine: semantic rules are plain English ("don't derive state with useEffect"). The bully-evaluator subagent has no Read / Grep / Glob and only sees the diff, so adversarial content can't redirect it.engine: session fires at Stop over the cumulative changed-set: "auth changed without tests", "migration without rollback", "API changed without changelog". Catches things no per-edit lint can see.bully trust the config. Per-rule capabilities: (network: false, writes: cwd-only) further gate what scripts can do..bully/log.jsonl. /bully-review flags noisy and dead rules; the bully-scheduler agent can run on cron and open small PRs to retire them./bully-init bootstraps a config. /bully-author adds rules with engine routing and fixture testing. bully guide <file> lists rules in scope before the agent edits.One YAML file at .bully.yml in your repo root. A flat list of rules; each names what to check, where it applies, severity, and which engine runs it.
schema_version: 1
rules:
ruff-check:
description: "Code must pass ruff check."
engine: script
scope: ["*.py"]
severity: error
script: "ruff check --quiet {file}"
no-any-cast:
description: "No `as any` casts. Use a precise type or `unknown` plus narrowing."
engine: ast
scope: ["src/**/*.ts", "src/**/*.tsx"]
severity: error
pattern: "$EXPR as any"
npx claudepluginhub dynamik-dev/bully --plugin bullyThis skill should be used when the model needs to ensure code quality through comprehensive linting and formatting. It provides automatic linting workflows for orchestrators (format → lint → resolve via concurrent agents) and sub-agents (lint touched files before task completion). Prevents claiming "production ready" code without verification. Includes linting rules knowledge base for ruff, mypy, and bandit, plus the linting-root-cause-resolver agent for systematic issue resolution.
Deterministic linting hooks, semantic code validators, and a multi-LLM advisory council. Enforces coding rules mechanically — not by suggestion.
Create custom behavioral rules through markdown configuration files - prevent unwanted behaviors with pattern matching
LLM-powered guardrails for Claude Code. Turn every AI mistake into a rule AI can't repeat.
Intelligent sync of Claude instructions with enforcement hooks for security and consistency
A configurable linter for agent skills, plugins, and AI coding assistant context