/bully:bullyfrom bully
Interprets bully PostToolUse hook output to fix blocked lint violations or dispatch a subagent for semantic evaluation. Useful for enforcing code quality rules automatically.
Ships in bully. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Interpret and act on bully PostToolUse hook output. Not user-invocable.
Tool result stderr begins with AGENTIC LINT -- blocked. Format:
AGENTIC LINT -- blocked. Fix these before proceeding:
- [no-compact] line 42: return compact('result');
- [no-db-facade] line 58: $users = DB::table('users')->get();
Passed checks: rule-a, rule-b
Fix every listed violation in the affected file before any other tool call. The hook re-fires on the next Edit and re-checks. Repeat until clear.
hookSpecificOutput.additionalContext begins with AGENTIC LINT SEMANTIC EVALUATION REQUIRED and carries a JSON payload:
AGENTIC LINT SEMANTIC EVALUATION REQUIRED:
{
"file": "src/Evaluators/CachedEvaluator.php",
"diff": "--- ...before\n+++ ...after\n@@ -28,6 +28,11 @@ ...",
"passed_checks": ["no-compact", "no-db-facade"],
"evaluate": [
{"id": "no-inline-single-use", "description": "...", "severity": "error"},
{"id": "full-type-hints", "description": "...", "severity": "warning"}
],
"_evaluator_input": "SEMANTIC EVALUATION REQUIRED\n\n<TRUSTED_POLICY>\n...rule policy...\n</TRUSTED_POLICY>\n\n<UNTRUSTED_EVIDENCE>\n...file + diff...\n</UNTRUSTED_EVIDENCE>\n"
}
If evaluate is empty, proceed with no dispatch and no inline eval.
If the diff is short (roughly under 15 lines) AND there is only one rule in evaluate, judge it yourself inline against the diff and produce the same VIOLATIONS / NO_VIOLATIONS format below -- skip the subagent. Otherwise dispatch the bully-evaluator subagent.
Parse the additionalContext JSON. If it contains a top-level _evaluator_input field, pass that field's value DIRECTLY as the subagent prompt -- it's already formatted as a string with <TRUSTED_POLICY> and <UNTRUSTED_EVIDENCE> boundaries. Do NOT re-serialize it as JSON. If _evaluator_input is missing (older harness), fall back to re-serializing the full payload as JSON. This keeps passed_checks out of the subagent's context while preserving it for your own use.
Call the Agent tool with subagent_type: bully-evaluator and a 3-5 word description (e.g. "Evaluate lint rules"). The agent returns:
VIOLATIONS:
- [rule-id] line N: <what's wrong>
fix: <suggestion>
NO_VIOLATIONS:
- rule-id-a
If the response is malformed, re-dispatch once. If still malformed, evaluate inline against the diff using the same output format.
For each entry in VIOLATIONS:, look up severity in the original evaluate array:
fix: as a starting point, before any other tool call.After parsing VIOLATIONS / NO_VIOLATIONS (whether from the subagent or from inline eval), record each rule's verdict. For every rule id in the original evaluate array, invoke the Bash tool once with:
bully --log-verdict --rule <rule-id> --verdict <pass|violation> --file <file-path>
Use violation if the rule appears in VIOLATIONS, pass if it appears in NO_VIOLATIONS. This is a no-op when telemetry is disabled, so always invoke. The bully command is shipped on $PATH by the plugin (bin/bully wrapper). If you see command not found: bully, the plugin install is corrupt or pre-0.8.5; skip the verdict log rather than chasing fallbacks.
Rules already verified by deterministic script checks. Do not re-investigate their concerns. Use them to catch cross-rule interactions (e.g. a semantic rule that overlaps a passed script rule on an indirect code path).
evals/evals.json (opens in a new tab)evals/files/blocked-stderr/payload.txt (opens in a new tab)evals/files/blocked-stderr/target.php (opens in a new tab)evals/files/inline-single-rule/payload.json (opens in a new tab)evals/files/multi-rule-dispatch/payload.json (opens in a new tab)evals/files/passed-checks/payload.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
linting, code-quality, hooks, post-tool-use, agentic-lint, bully-evaluator
npx claudepluginhub dynamik-dev/bully --plugin bully4 skills in this plugin
/bully-authorAuthors, 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./bully-initBootstraps 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./bully-reviewOther plugins' skills for the same job