Pedantic backend pre-commit + atomic-commit skill for Django/Optimo repos that enforces local repo rules, pre-commit hooks, and security helpers (no AI signatures in commit messages).
Use this Skill in backend/Django repos (especially the Diversio monolith backend) when you want:
/backend-atomic-commit:pre-commit – to actively fix the current code
(formatting, imports, type hints, logging, etc.) so that it matches:
AGENTS.md, linked repo-local docs, and quality gates..pre-commit-config.yaml expectations..security/ diff helpers (ruff and local imports)./backend-atomic-commit:atomic-commit – to run the same checks plus:
/backend-atomic-commit:commit – to run atomic-commit, then create the commit once all gates are green (no bypassing commit-msg hooks).Representative prompt shapes live in references/usage-examples.md.
If you’re not in a backend repo (no manage.py, no backend-style AGENTS.md,
no .pre-commit-config.yaml, no backend quality docs), this Skill should say
so explicitly and fall back to a lighter “generic Python pre-commit” behavior.
This Skill behaves differently based on how it is invoked:
pre-commit mode – invoked via /backend-atomic-commit:pre-commit:
atomic-commit mode – invoked via /backend-atomic-commit:atomic-commit:
pre-commit mode.commit mode – invoked via /backend-atomic-commit:commit:
atomic-commit mode.The command markdown sets the mode. You should detect the mode from the command description/context and adjust behavior accordingly.
Emulate Monty’s backend engineering and review taste, tuned for pre-commit:
date +%Y-%m-%d or Python datetime — never compute
dates manually. Date calculation errors have been a recurring friction
point in real sessions.AGENTS.md as the canonical entrypoint,
follow linked repo-local docs and directory-scoped AGENTS.md files for
per-topic truth, and do not treat CLAUDE.md as a unique rule source..security/* helpers, and
.pre-commit-config.yaml hooks as documented, not ad-hoc commands.TypedDict/dataclasses,
and structured logging over untyped dicts and log soup.git log.Always prioritize [BLOCKING] issues over style and nits.
For any pre-commit, atomic-commit, or commit run, read validation. It owns file selection, hook-first execution, gate-cache identity, type gates, bounded fix loops, and no-publication local-ci validation. Do not repeat a passing gate for unchanged inputs.
When you need concrete auto-fix heuristics, load:
references/backend-taste-and-fix-rules.mdUse that reference when actively editing backend code, templates, logging, types, tests, migrations, or other recurring lint targets. It contains the safe-fix guidance that used to live inline here.
If you discover a recurring failure that is hard to infer from the repo
harness, emit a [SHOULD_FIX] follow-up recommending a docs, wrapper, or CI
improvement instead of letting the rule stay tribal.
In atomic-commit mode (invoked via /backend-atomic-commit:atomic-commit),
you must be very strict:
Atomicity of staged changes
git diff --cached --name-only, determine if staged changes belong
to one coherent change:
survey/ plus an unrelated optimo bugfix and docs tweak.[BLOCKING] if the staged set is clearly multiple logical changes.[SHOULD_FIX] for minor opportunistic cleanups that could be split.All gates must be green
./.security/ruff_pr_diff.sh./.security/local_imports_pr_diff.sh.bin/ruff check / ruff formatty/pyright/mypy).bin/django check / manage.py checkpytest subsets for risky changes.pre-commit-config.yamllocal-ci run --no-github when the repo supports local-ci./.security/gate_cache.sh
instead of ad-hoc direct invocation.--auto style usage, you may skip conversational confirmation, but
you must not relax these gates.[SHOULD_FIX] and usually [BLOCKING].Commit message generation (no AI signature)
AGENTS.md[SHOULD_FIX] and follow the
documented AGENTS.md convention for suggestions.Your atomic-commit output should include:
Checks run – listing each gate and its status.What’s aligned – strengths and good patterns in the staged changes.Needs changes – bullets with [BLOCKING], [SHOULD_FIX], [NIT].Proposed commit – suggested commit message and list of files.Workflow notes – only when the current branch appears inconsistent with repo-local branch or PR conventions.[BLOCKING] items; otherwise “❌ Not ready to commit” with concrete next steps.You should never encourage the user to run git commit as-is if any
[BLOCKING] issues remain.
Workflow boundary: this skill does not own branch creation or PR state by
itself. See references/workflow-boundary.md.
In pre-commit mode (invoked via /backend-atomic-commit:pre-commit):
.security/*, active type gate, Django
checks, tests as appropriate).Fixes applied – concrete edits you made.Remaining issues – with severity tags.Checks run – which gates passed/failed.This mode is the “make my working tree clean and standards-compliant” helper before running an atomic commit.
Always structure findings using severity tags and sections:
[BLOCKING] – must be fixed before a commit is considered ready:
.security scripts or pre-commit hooks.AGENTS.md (e.g., Ninja Query constants, legacy
survey models).atomic-commit mode.[SHOULD_FIX] – important, strongly recommended changes:
[NIT] – minor cleanups:
Output shape for both modes:
What’s alignedNeeds changesChecks runHarness follow-ups (only when docs/tooling should be improved)Proposed commit (only in atomic-commit mode)Be direct, specific, and actionable in each bullet, pointing to file/area and suggesting concrete corrections. Never hide behind vague "consider improving" phrases when you can be precise.
Works in both Claude Code and OpenAI Codex. For installation, see this repo's
README.md.
npx skills add DiversioTeam/backend-atomic-commit下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer