No slash command · from beagle-python
Enforces mandatory verification steps before reporting code review findings to reduce false positives. Includes anti-confabulation checks, hard gates, and a pre-report checklist.
Ships in beagle-python. 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.
None: SKILL.md is the whole skill.
This protocol MUST be followed before reporting any code review finding. Skipping these steps leads to false positives that waste developer time and erode trust in reviews.
Before issuing any verdict — flag, reject, or downgrade a finding — you MUST echo the exact artifact you are judging, quoted from a source you read in this turn:
The artifact is the only source of truth. Never infer what you are reviewing from the branch name, the working directory, surrounding files, or recollection. If your mental model differs from the freshly read source, the source wins. A verdict issued without a same-turn echo of its target is invalid — emit the echo first, or do not emit the verdict.
This gate exists because an LLM under contextual priming will confidently flag code that is not in the file. It runs before the hard gates below.
Complete gates in order for each finding (or finding class). A gate passes only when the pass condition is objectively met—internal confidence is not enough.
find_referencing_symbols-style lookup) and noted whether non-definition matches exist. If use may be dynamic (decorators, getattr, entry points, plugins), PASS when: you state that and name the registration or import path that could justify the symbol.[FILE:LINE] to the line that shows the issue (same requirement as Before Submitting Review).If any gate fails, do not report the issue; gather evidence or drop it.
Before flagging ANY issue, verify (after Hard gates above):
Before flagging, you MUST:
Common false positives:
Before flagging, you MUST:
Common false positives:
Before flagging, you MUST:
Valid patterns often flagged incorrectly:
# Type annotation, NOT cast
data: UserData = await load_user()
# Type narrowing with isinstance
if isinstance(data, User):
data.name # Mypy knows this is User
Before flagging, you MUST:
Common false positives:
Before flagging, you MUST:
Do NOT flag:
ONLY use for:
Use for:
Use for:
Use for:
These are NOT review blockers. They should be noted for the author's awareness but must not appear in the actionable issue count. The Verdict should ignore informational items entirely.
| Pattern | Why It's Valid |
|---|---|
dict.get(key, []) | Returns default for missing keys, not error suppression |
Optional[T] return type | Standard way to express nullable in Python typing |
assert in test code | pytest uses assertions, not try/except |
| Type annotation on variable | Not a cast, just a hint for type checkers |
typing.cast() with prior validation | Valid after runtime check confirms type |
| Pattern | Why It's Valid |
|---|---|
Depends() without explicit type | FastAPI infers dependency type from function signature |
async def endpoint without await | May use sync DB calls or simple returns |
| Response model different from DB model | Separation of concerns between API and persistence |
BackgroundTasks parameter | Valid for fire-and-forget operations |
Direct request.state access | Standard pattern for middleware-injected data |
| Pattern | Why It's Valid |
|---|---|
assert without message | pytest rewrites assertions to show detailed diffs |
@pytest.fixture without explicit scope | Default function scope is correct for most fixtures |
monkeypatch over unittest.mock | Simpler API, pytest-native |
| Fixture returning mutable state | Each test gets fresh fixture invocation by default |
| Pattern | Why It's Valid |
|---|---|
+? lazy quantifier in regex | Prevents over-matching, correct for many patterns |
| Direct string concatenation | Simpler than template literals for simple cases |
| Multiple returns in function | Can improve readability |
| Comments explaining "why" | Better than no comments |
Flag missing type annotation ONLY IF ALL of these are true:
_)x = 5 is clearly int)Flag bare except ONLY IF:
Flag missing try/except ONLY IF:
Final verification:
[FILE:LINE] ISSUE_TITLEIf uncertain about any finding, either:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub existential-birds/beagle --plugin beagle-python7 skills in this plugin
/fastapi-code-reviewReviews FastAPI code for routing patterns, dependency injection, validation, and async handlers. Use when reviewing FastAPI apps, checking APIRouter setup, Depends() usage, or response models./postgres-code-reviewReviews PostgreSQL code for indexing strategies, JSONB operations, connection pooling, and transaction safety. Use when reviewing SQL queries, database schemas, JSONB usage, or connection management./pytest-code-reviewReviews pytest test code for async patterns, fixtures, parametrize, and mocking. Use when reviewing test_*.py files, checking async test functions, fixture usage, or mock patterns./python-code-reviewReviews Python code for type safety, async patterns, error handling, and common mistakes. Use when reviewing .py files, checking type hints, async/await usage, or exception handling./review-pythonComprehensive Python/FastAPI backend code review with optional parallel agents/sqlalchemy-code-reviewReviews SQLAlchemy code for session management, relationships, N+1 queries, and migration patterns. Use when reviewing SQLAlchemy 2.0 code, checking session lifecycle, relationship() usage, or Alembic migrations.Other plugins' skills for the same job