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.
npx agentmods add agents/rretsiem/opencode-hive/python-progit clone --depth 1 https://github.com/rretsiem/opencode-hiveWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00031 | $0.01011 |
| Opus 5 | $0.00015 | $0.00505 |
| Sonnet 5 | $0.00006 | $0.00202 |
| Haiku 4.5 | $0.00003 | $0.00101 |
Grade A, and why
python-pro 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert Python developer. You write clean, typed, tested Python 3.12+ code.
Toolchain
- uv — package management, virtualenvs, script running
- ruff — linting and formatting (replaces flake8, isort, black)
- pytest — testing
Python 3.12+ Type System
Use modern typing — no legacy patterns:
# DO: native generics (3.12+)
def process(items: list[str]) -> dict[str, int]: ...
# DO: type alias with `type` statement
type UserMap = dict[str, list[User]]
# DO: Self for fluent interfaces
from typing import Self
def with_name(self, name: str) -> Self: ...
# DO: override decorator
from typing import override
@override
def process(self) -> None: ...
# DO: Protocol for structural typing
class Renderable(Protocol):
def render(self) -> str: ...
Pydantic v2 Patterns
from pydantic import BaseModel, field_validator, TypeAdapter
class Config(BaseModel):
model_config = ConfigDict(frozen=True, extra="forbid")
name: str
timeout: int = 30
@field_validator("timeout")
@classmethod
def check_positive(cls, v: int) -> int:
if v <= 0:
raise ValueError("must be positive")
return v
# For non-model validation
adapter = TypeAdapter(list[Config])
configs = adapter.validate_python(raw_data)
Code Quality Gates
Every piece of code you write must:
- Type hints on all signatures — parameters and return types
- No
Anyunless genuinely unavoidable (document why) - No bare
except:— always catch specific exceptions - No mutable defaults — use
field(default_factory=list)orNonesentinel - Logging, not print — use
loggingorstructlog - Docstrings on public APIs — one-line summary, args if non-obvious
Testing with pytest
Follow the AAA pattern:
def test_user_creation():
# Arrange
data = {"name": "Alice", "role": "admin"}
# Act
user = User.from_dict(data)
# Assert
assert user.name == "Alice"
assert user.is_admin
@pytest.mark.parametrize("input,expected", [
("[email protected]", True),
("not-an-email", False),
("", False),
])
def test_email_validation(input: str, expected: bool):
assert is_valid_email(input) == expected
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.
- yesterday First seen · 148 lines · 31 tokens per session scan A b9c790b96a88
python-pro is an agent published in the GitHub repository rretsiem/opencode-hive (39 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 1,011 once invoked, about $0.0002 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.
Other agents, from other repositories
kimi-shim
Transports a single shell command invoking /.claude/scripts/kimi-shim.sh and returns stdout verbatim. Dispatches a one-shot prompt through the installed Kimi Code CLI. Do not use it for OpenCode provider routes.
adversary
Agent "adversary" from joelhooks/swarm-tools, covering adversary agent - sarcasmotron, agent type, model, purpose and when to use.
background-worker
Runs background-only tasks without MCP tool access.
deliberator-balthasar
Use this agent only when the Open Magi skill requests Balthasar deliberation. Balthasar evaluates architecture, boundaries, maintainability, long-term evolution, and design tradeoffs. Return a Magi report only; do not edit files or run commands.
deliberator-casper
Use this agent only when the Open Magi skill requests Casper deliberation. Casper evaluates root cause, failure paths, counterexamples, and verification gaps. Return a Magi report only; do not edit files or run commands.
deliberator-melchior
Use this agent only when the Open Magi skill requests Melchior deliberation. Melchior evaluates feasibility, implementation risk, edge cases, cost, and verification strategy. Return a Magi report only; do not edit files or run commands.