backend-atomic-commit
強制執行後端程式碼標準和原子提交
後端程式碼經常無法通過 CI 品質閾值檢查,且包含非原子提交。此技能執行 Ruff、ty、Django 檢查和安全腳本來修復問題並強制執行提交標準,且不含 AI 簽名。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“backend-atomic-commit”。 對目前的變更執行 /backend-atomic-commit:pre-commit
预期结果:
- 已修復的項目:修復了 optimo_events.py 中的 3 個本機匯入,為 2 個函式新增了類型提示,將日誌重新格式化為結構化樣式
- 已執行的檢查:Ruff(通過)、ty(通過)、Django 檢查(通過)、security/ruff_pr_diff.sh(通過)
- 剩餘問題:[SHOULD_FIX] survey_helper.py 中缺少文件字串
正在使用“backend-atomic-commit”。 對暂存的變更執行 /backend-atomic-commit:atomic-commit
预期结果:
- 原子性檢查:暂存的變更是 survey/ 模組中一個連貫的錯誤修復
- 提議的提交:clickup_12345: 修復調查回應處理程式中的空引用
- 判決:提交已就緒 - 找不到 [BLOCKING] 項目
安全审计
安全This is a documentation-only skill containing instructions for an AI agent to run local development tools. All 275 static findings are false positives. The 'Ruby/shell backtick execution' detections are markdown code block syntax, not actual shell commands. The 'Weak cryptographic algorithm' findings trigger on markdown headings containing 'MD5' in context of banning insecure patterns. The '1Password data' and 'Environment file access' findings are documentation recommending AGAINST staging secrets. No executable code exists in this skill.
风险因素
🌐 网络访问 (1)
⚙️ 外部命令 (232)
质量评分
你能构建什么
自動修復提交前的程式碼
在 CI 執行之前,執行預提交模式來修復暂存檔案中的格式、匯入、類型提示和日誌模式
強制執行提交原子性
驗證暂存的變更代表一個邏輯變更,且所有品質閾值通過後再建立提交
標準化後端工具
對所有後端程式碼貢獻套用一致的 Ruff、ty 和 Django 檢查,並清楚標示阻塞性問題
试试这些提示
在此儲存庫上執行 /backend-atomic-commit:pre-commit 並修復 git status 中的所有檔案,以遵守 AGENTS.md 和預提交鉤子
使用 /backend-atomic-commit:atomic-commit 為 backend/ 中的暂存變更準備原子提交
在嚴格模式下執行 /backend-atomic-commit:pre-commit:消除本機匯入、修復類型提示、清理除錯語句
執行 /backend-atomic-commit:atomic-commit --auto 以強制執行結構化日誌、驗證測試並報告提交準備就緒狀態
最佳实践
- 在暂存檔案之前執行預提交模式,以便及早發現問題並避免 CI 失敗
- 在嘗試原子提交之前,始終處理 [BLOCKING] 項目
- 使用受限的 ty 檢查來 catch 類型錯誤,而不會在未修改的檔案中觸發基準錯誤
避免
- 在未審查提議的提交訊息之前就執行 atomic-commit 模式
- 忽視會在多次提交中累積的 [SHOULD_FIX] 項目
- 使用本機匯入來避免循環匯入問題,而不是重構