From backend-pr-workflow
Pedantic backend PR workflow skill that follows repo-local workflow docs, GitHub issue linkage, safe Django migrations, and downtime-safe schema changes.
npx claudepluginhub diversioteam/agent-skills-marketplace --plugin backend-pr-workflowThis skill is limited to using the following tools:
Use this Skill whenever you are:
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Use this Skill whenever you are:
If the target repo has its own harness docs, treat AGENTS.md as the
canonical entrypoint and follow any linked workflow/release/migration docs or
directory-scoped AGENTS.md files for per-topic truth. CLAUDE.md should be
treated as a pointer, not as a unique rule source. This Skill is the default
baseline when repo-local docs are absent or thin.
backend-pr-workflow skill to review this Django4Lyfe PR’s branch name, linked issues, migrations, and downtime-safety. Here are the branch name, base branch, and PR title: …”backend-pr-workflow on my planned title, description, and migration summary and tell me all [BLOCKING] and [SHOULD_FIX] issues.”backend-pr-workflow to check that my base branch, title, and release plan follow our backend workflow.”backend-pr-workflow to verify that my migrations and rollout plan are downtime-safe.”When this Skill reviews a PR or workflow plan, the response must be structured and tagged:
What’s aligned – bullets of things that follow the workflow.Needs changes – bullets with severity tags:
[BLOCKING] – must fix before merge or deploy.[SHOULD_FIX] – important but not strictly blocking for merge.[NIT] – minor consistency or documentation suggestions.Each bullet in Needs changes should:
Example bullet:
[SHOULD_FIX] Branch name 'misc/work' does not match the repo's documented feature-branch convention. Rename it to something clearer like 'feature/1234-user-auth' or 'feature/user-auth'.Before giving a full review, this Skill should gather:
release, master, etc.).If any of these are missing or unclear, ask the user to provide them before doing a full workflow review.
Before applying the checklist, inspect the repo harness:
AGENTS.md first.AGENTS.md files when they exist.[SHOULD_FIX] harness finding recommending a repo-docs update.This Skill treats the target repo's current AGENTS.md, runbooks, and PR
template as the source of truth.
Check the branch name:
feature/employee-importbugfix/1234-employee-importchore/ci-cleanupIf the branch does not follow this pattern, emit:
[SHOULD_FIX] – with a suggested corrected branch name that matches the repo
docs.[BLOCKING] only if current CI or automation still explicitly
depends on a pattern and would fail without it.When a feature spans multiple repositories, prefer:
DiversioTeam/monolith when the work is cross-repoExplain the risk of collapsing unrelated repo work into one opaque thread:
If the user appears to be shoving cross-repo work into one PR or one unclear issue reference, emit:
[SHOULD_FIX] – recommending a monolith planning issue and separate
repo-local execution work where appropriate.Check or remind the user that:
If commit messages are vague, misleading, or clearly violate a documented repo-local rule, emit:
[SHOULD_FIX] – asking the author to fix future commits and, where
practical, to rewrite recent history before merge.The PR title must:
Closes #1234Refs DiversioTeam/monolith#1234If not, emit:
[SHOULD_FIX] – and propose a corrected title or PR-body linkage that
matches the repo docs.Check whether the work is still in progress:
WIP / [WIP].If not, emit:
[SHOULD_FIX] – asking the author to convert to draft or annotate the PR as
WIP to avoid premature review.Confirm the base branch matches the project’s release workflow:
release (for repos following the Django4Lyfe
pattern).release contents:
master.If a PR targets the wrong base branch:
[BLOCKING] and recommend the correct base, explaining whether the
change belongs in release or should be a master hotfix.If the repo’s harness docs specify a different default (e.g. custom long-lived
branches in AGENTS.md or a linked workflow doc), follow that instead.
This Skill expects PR authors to be their own first reviewer.
Check that the description (or planned description):
If key context is missing, emit:
[SHOULD_FIX] – listing the missing items and suggesting how to include
them.Prompt the author to confirm they have checked:
print() / ipdb / pdb left behind.ty, then pyright,
then mypy.ty is configured, it is mandatory and blocking.If any of these fail obviously based on the PR description or user input, emit
appropriate [SHOULD_FIX] or [BLOCKING] bullets. Type-gate failures should
generally be [BLOCKING] for merge readiness.
This Skill enforces a clean release flow.
release branch)For normal deployments, check that:
release.pyproject.toml) is bumped to the intended release
version, using CalVer (e.g. 2025-08-19).release are not allowed, a small PR is created to
bump the version on release.release → master with a title like:
Release: 2025-08-19Release 2: 2025-08-19 (for multiple releases in one day).Post-deployment:
master.YYYY-MM-DD or YYYY-MM-DD-2.If any of these are obviously missing from the plan, emit [SHOULD_FIX].
For hotfixes, enforce:
master (not release).Hotfix release: 2025-08-19release so it stays ahead of or equal to
master.If a supposed hotfix PR is targeting release, or a hotfix is not planned to
be merged back into release, emit [BLOCKING].
When the PR includes Django model changes, this Skill should be pedantic about migrations.
If the PR has multiple intermediate migrations for the same feature
(...x1.py, ...x2.py, ...x3.py, etc.), recommend cleaning them up before
merge:
Never recommend deleting migrations that are already on production.
If the PR clearly contains many iterative migrations for one feature, emit:
[SHOULD_FIX] – asking the author to collapse them into a clean final
migration set.When suggesting commands, align with the repo’s tooling:
uv run / .bin/django wrappers as documented in AGENTS.md or linked
repo-local docs.This Skill should conceptually describe the migration cleanup steps, not hard code commands that may become outdated.
This is the most critical part of the Skill for production stability.
If the PR both:
then:
Enforce the safe two-step pattern:
If a single PR contains both the schema drop and remaining code references, or removes code and schema at once in a way that risks downtime, emit:
[BLOCKING] – and explicitly recommend splitting into two PRs as above.For a new column on a large / hot table with a static default (e.g.
is_active = True):
AddField with default can cause a long-running table rewrite and
lock, blocking writes and potentially causing errors.Enforce a safe pattern:
null=True and no default.ALTER TABLE ... ADD COLUMN is fast.RunSQL to set the default for new rows only, avoiding a full
table rewrite.atomic = False for large
operations.If the PR adds a non-nullable column with a default on a table that likely has many rows, emit:
[SHOULD_FIX] or [BLOCKING] depending on table size and risk, and
describe the two-step pattern above.For defaults that require dynamic values (e.g. generate UUIDs, timestamps):
Recommend:
If a PR uses a volatile default in a way that will backfill a large table inside an atomic migration, emit:
[BLOCKING] – and propose the batched, non-atomic backfill approach.When invoked, this Skill should:
What’s aligned bullets.Needs changes bullets with [BLOCKING], [SHOULD_FIX], [NIT].This Skill is designed to work with both Claude Code and OpenAI Codex.
plugins/backend-pr-workflow/commands/).name: backend-pr-workflow.For installation, see this repo's README.md.