Best for
- Use when the user asks to review a PR, audit a diff, check whether changes are safe to merge, review their own changes, or asks what to look for in a Dograh PR.
dograh-hq/dograh/.agents/skills/review-pr/SKILL.md
Review a Dograh pull request, branch diff, or pasted patch for repo-specific security and correctness risks that are not obvious from generic FastAPI, Next.js, or Python conventions. Use when the user asks to review a PR, audit a diff, check whether changes are safe to merge, review their own changes, or asks what to look for in a Dograh PR. Focus on tenant isolation, route auth, webhook signing and org derivation, DB layering, worker-sync, migrations, generated SDK usage, and test hazards.
Decision brief
This skill is for reviewing any PR, including PRs written by maintainers. Focus on Dograh-specific regression risks. Skip generic lint, formatting, and type-check comments unless they connect to one of the repo-specific issues below.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/dograh-hq/dograh --skill ".agents/skills/review-pr"Inspect the Agent Skill "review-pr" from https://github.com/dograh-hq/dograh/blob/958731ab50c3ce8aca645ce64d61479e36084ebc/.agents/skills/review-pr/SKILL.md at commit 958731ab50c3ce8aca645ce64d61479e36084ebc. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Get the diff: - GitHub PR: gh pr diff or gh pr view --json files,additions,deletions - Local branch: git diff origin/main...HEAD 2. Bucket changed files into the sections below. 3. Read the current repo as source of truth before finalizing findings: - api/AGENTS.md for org sc…
Production runs multiple workers. Per-process mutable caches become stale unless updates are broadcast.
Treat this file as review policy and navigation, not as a frozen inventory.
Review the “File to section map” section in the pinned source before continuing.
There is no global auth middleware. Each route declares its own auth behavior. Forgetting one creates a silently public endpoint.
Permission review
The documentation asks the agent to read local files, directories, or repositories.
Read the current repo as source of truth before finalizing findings:The documentation includes network, browsing, or remote request actions.
## 3. DB query layering (`api/db/` is the only home for SQL)The documentation includes network, browsing, or remote request actions.
The frontend should talk to the backend through `ui/src/client/`. Raw `fetch` to internal `/api/v1/` routes is suspicious by default.Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 84/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 5,125 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
This skill is for reviewing any PR, including PRs written by maintainers. Focus on Dograh-specific regression risks. Skip generic lint, formatting, and type-check comments unless they connect to one of the repo-specific issues below.
The main failure modes in this repo are:
api/db/*_client.pygh pr diff <N> or gh pr view <N> --json files,additions,deletionsgit diff origin/main...HEADapi/AGENTS.md for org scoping and worker-syncui/AGENTS.md for generated client rules<file>:<line> -> <problem> -> <correct pattern>.Treat this file as review policy and navigation, not as a frozen inventory.
| Path pattern in diff | Sections to run |
|---|---|
api/routes/*.py | 1, 2, 8 |
api/db/*_client.py, api/db/models.py | 2, 3 |
api/services/**/*.py | 2, 3, 4 |
api/tasks/*.py | 2, 3, 5 |
api/alembic/versions/*.py | 6 |
api/mcp_server/**, api/services/workflow/mcp_*.py | 1, 2, 7 |
ui/** | 9 |
api/constants.py, anything os.getenv | 10 |
api/tests/** | 11 |
api/schemas/*.py | 12 |
api/routes/*.py)There is no global auth middleware. Each route declares its own auth behavior. Forgetting one creates a silently public endpoint.
Common auth deps from api.services.auth.depends:
get_userget_user_wsget_superuserChecks:
@router.<verb>(...) handler with no auth dependency is public. Treat that as a finding unless the current file already establishes a deliberate public auth pattern such as public token auth, signed webhook auth, or an equivalent websocket token flow.get_user on an impersonation, cross-org, or global reporting endpoint should usually be get_superuser.Depends(get_user_ws) and without a clear public token path is a finding.CORSMiddleware to a fixed origin list needs strong justification. Dograh relies on cross-origin embedding; endpoint auth is the real control.Useful commands:
rg -n "Depends\\((get_user|get_user_ws|get_superuser)\\)" api/routes
rg -n "@router\\.(get|post|put|delete|patch|websocket)" api/routes
This is the highest priority rule in the repo. Every request-reachable read or write of an org-scoped resource must filter or validate by organization_id.
Use api/AGENTS.md as the canonical summary.
Determine scope from the current code:
organization_idorganization_idChecks:
*_by_id(...) call in a route handler is suspicious. If request-reachable and unscoped, it is usually a finding.list_* or get_* endpoints must filter in SQL, not in Python after .all().user.selected_organization_id and reject if it does not belong to the org.organization_id, trace the caller.organization_id.organization_id, not org_id, tenant_id, or organisation_id.Useful commands:
rg -n "_by_id\\(" api/routes api/services api/tasks
rg -n "db_client\\.get_\\w+\\(" api/routes api/services api/tasks
rg -n "organization_id|selected_organization_id" api/routes api/services api/tasks api/db
api/db/ is the only home for SQL)Production SQL belongs in api/db/*_client.py. Routes, services, and tasks should call DB client methods, not write SQLAlchemy directly.
Checks:
select, update, delete, insert, AsyncSession, sessionmaker, or async_session in api/routes/, api/services/, or api/tasks/ is a finding.api/services/admin_utils/ is the exception. It is not a template for production code.organization_id.Useful commands:
rg -n "(from sqlalchemy|AsyncSession|sessionmaker|async_session)" api/routes api/services api/tasks
api/services/worker_sync/)Production runs multiple workers. Per-process mutable caches become stale unless updates are broadcast.
Use api/AGENTS.md as the canonical summary.
Checks:
WorkerSyncManager broadcast path.api/tasks/, ARQ)Checks:
api/tasks/arq.py::WorkerSettings.functions.api/alembic/versions/)Checks:
upgrade() and downgrade() should both exist and be meaningfully reversible unless the change truly cannot be reversed.NOT NULL column to a populated table needs a safe default or a backfill before the constraint.alter_column(..., nullable=False).api/mcp_server/)Checks:
authenticate_mcp_request(), not reimplement API-key validation.Checks:
verify_inbound_signature() or the provider equivalent.organization_id.ui/) - generated SDK onlyUse ui/AGENTS.md as the canonical summary.
The frontend should talk to the backend through ui/src/client/. Raw fetch to internal /api/v1/ routes is suspicious by default.
Checks:
fetch('/api/v1/...') or fetch(\${backendUrl}/api/v1/...`)` in app code is usually a finding unless the current code proves a narrow exception.Authorization header construction in regular components is a finding; auth should be injected centrally.ui/src/client/ should usually change too.Useful commands:
rg -n "fetch\\(['\"\\`].*api/v1" ui/src
rg -n "Authorization" ui/src
Checks:
logging.os.getenv(...) outside api/constants.py is a finding.Common offender shapes:
logger.info(f"config: {config}")logger.debug(request_body)api/tests/)Checks:
asyncio.wait_for(...) or another bounded timeout pattern..env.test, not .env.api/schemas/)Checks:
Present findings in three buckets:
Blocker
Should-fix
Nit
Cite file:line for each finding. Skip anything a formatter, linter, or IDE would already catch unless it connects to one of the repo-specific risks above.
Alternatives
hw-native-sys/simpler
Review a GitHub PR by analyzing the correct diff (merge-base to HEAD), reconciling stated vs. real goal, and applying type-specific scrutiny. Optionally folds in independent reviews from local `codex` / `gemini` CLIs when the invocation explicitly opts in (`codex`, `gemini`, or `all` in the arguments). Use when the user asks to review a PR, analyze PR changes, or give feedback on a pull request.
Jeffallan/claude-skills
Analyzes code diffs and files to identify bugs, security vulnerabilities (SQL injection, XSS, insecure deserialization), code smells, N+1 queries, naming issues, and architectural concerns, then produces a structured review report with prioritized, actionable feedback. Use when reviewing pull requests, conducting code quality audits, identifying refactoring opportunities, or checking for security issues. Invoke for PR reviews, code quality checks, refactoring suggestions, review code, code quali
JasonColapietro/suede-creator-skills
Suede-owned experimentation discipline for hypotheses, sample sizing, test duration, significance, and repeatable experiment programs. Use when comparing variants, deciding whether a result is reliable, or building an experiment backlog and cadence. NOT FOR: analytics instrumentation (use suede-analytics), post-click conversion diagnosis (use suede-site-alchemy), or writing the variant copy itself (use suede-copy).
narrative-io/narrative-skills-marketplace
Translate a fuzzy analytical question into a rigorous investigation plan. Interrogates the ask, grounds the plan in the available data dictionary, applies analytical best practices, and produces a structured brief of query specifications for a downstream query-writing skill. Plans, does not write SQL. Use when: "why did X drop", "is there a relationship between A and B", "who are our highest-value customers", "what's driving the change in Y", "investigate this trend", "design an analysis for", "