oh-my-claudecode
Splits a complex task across several specialized Claude Code agents working in parallel, then keeps going until the result is checked. You describe what you want in plain language instead of memorizing commands.
What bernstein runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.
Claude Code
$ npx -y skills add sipyourdrink-ltd/bernstein --agent claude-code
Cursor
Cursor also runs Claude Code hooks from .claude/settings.json, so copy these hooks there to use them in Cursor.
Where it lives
#!/usr/bin/env python3
"""Claude Code PreToolUse hook - smart auto-approve for agent tool calls.
Reads the tool-call payload from stdin (Claude Code hook JSON format),
classifies the command, and exits with the appropriate code:
Exit 0 - approve (tool call proceeds)
Exit 1 - deny (tool call blocked; reason written to stdout)
Exit 2 - ask (escalate to human; reason written to stdout)
Usage in ~/.claude/settings.json or .claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "python /path/to/bernstein/hooks/smart_approve.py"
}
]
}
]
}
}
Or to cover all tools:
{
"hooks": {
"PreToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "python /path/to/bernstein/hooks/smart_approve.py"
}
]
}
]
}
}
The hook can also be used standalone for testing:
echo '{"tool_name": "Bash", "tool_input": {"command": "ls -la"}}' | python hooks/smart_approve.py
echo $? # 0 - approved
"""
from __future__ import annotations
import json
import sys
def main() -> int:
"""Read hook payload from stdin, classify, return exit code."""
try:
raw = sys.stdin.read()
if not raw.strip():
# No input - allow (edge case in some hook configurations)
return 0
payload: dict[str, object] = json.loads(raw)
except (json.JSONDecodeError, OSError) as exc:
# Cannot parse → escalate to human
print(json.dumps({"decision": "ask", "reason": f"Hook parse error: {exc}"}))
return 2
tool_name = str(payload.get("tool_name", ""))
tool_input_raw = payload.get("tool_input", {})
tool_input: dict[str, object] = (
dict(tool_input_raw) # type: ignore[arg-type]
if isinstance(tool_input_raw, dict)
else {}
)
# Import here so the hook works even when bernstein isn't on PYTHONPATH:
# fall back to a copy of the logic if the package isn't importable.
try:
from bernstein.core.auto_approve import Decision, classify_tool_call
result = classify_tool_call(tool_name, tool_input)
except ImportError:
# Fallback: approve everything if the package isn't installed.
# This preserves the previous --dangerously-skip-permissions behaviour.
print(json.dumps({"decision": "approve", "reason": "bernstein not installed; fallback approve"}))
return 0
if result.decision == Decision.APPROVE:
# Writing nothing to stdout is the standard "allow" signal.
return 0
if result.decision == Decision.DENY:
print(json.dumps({"decision": "block", "reason": result.reason}))
return 1
# ASK - escalate to human
print(json.dumps({"decision": "ask", "reason": result.reason}))
return 2
if __name__ == "__main__":
sys.exit(main())
Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.
The open-source governance layer for AI agents: write the rules declaratively, Bernstein enforces them and produces the verifiable, replayable record. Free, Apache-2.0. https://bernstein.run
Splits a complex task across several specialized Claude Code agents working in parallel, then keeps going until the result is checked. You describe what you want in plain language instead of memorizing commands.
Turns a rough feature idea into a written spec through guided questions, then has the agent build it and checks the result against that spec. Instead of hand-checking whether the work is finished, you get an automatic evaluation gate that runs in your coding agent.
A plugin that runs coding tasks through multiple AI backends (Codex, Claude, Gemini, OpenCode) with a structured development workflow, parallel execution, browser automation and multi-session task checkpointing.
Coordinates AI agents with mechanical protocol enforcement, a workflow gate, memory validation and a session hook. Includes a catalog of specialist agents and has no runtime dependencies.
A Claude Code plugin that enforces finishing multi-step tasks with evidence and verification at each stage. It works as a procedure for Opus or any Claude model, not as chance.
Adjusts how third-party models behave inside Claude Code so they run closer to a native Opus session, covering subagent lifecycle, session hooks and tool interception. It does not replace your gateway, provider mapping or account setup.
Autonomous GitHub Project build → QA → review loop for Claude Code. One-line install.
Runs a PDCA workflow with phase gating, spec checks, and delegation to sub-agents for planning, QA, and deployment. Fires at session start and on prompts, edits, task creation, and phase transitions.