/universal-dev-standards:push [--force] [--target <branch>] [--skip-gates] [--no-pr]from universal-dev-standards
AI-assisted safety layer for git push operations with quality gates, force-push guardrails, and structured push receipts. Runs pre-push lint/test checks and supports PR automation.
Ships in universal-dev-standards. 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.
Language: English | 繁體中文
Version: 2.0.0 Created: 2026-04-23 Applicability: Claude Code Skills
AI-assisted safety layer for git push. Detects protected branches, enforces force-push guardrails, runs pre-push quality gates, outputs a structured push receipt, and integrates with PR automation.
git push 的 AI 輔助安全層。偵測保護分支、強制 force-push 護欄、執行 pre-push 品質 gate、輸出結構化推送收據,並整合 PR 自動化。
This skill implements .standards/push-standards.ai.yaml.
When /push is invoked, Claude executes the following steps natively:
Run git rev-parse --abbrev-ref HEAD to get current branch.
Compare against protected_branches list (default: main, master, release/, hotfix/).
If protected: show warning + pending commits, require explicit user confirmation before proceeding.
If --force or --force-with-lease flag detected:
Run git log origin/<branch>..HEAD --oneline to find commits that will be overwritten.
Show count and author list. Require user to type yes, force push to proceed.
Run each configured gate in sequence using Bash tool:
lint: detect and run project lint commandtest: detect and run project test commandtype-check (optional): TypeScript type checkac-coverage (optional): acceptance criteria coveragesecurity-scan (optional): security vulnerability scanIf any required gate fails: abort with error message.
Run git push <remote> <branch> [--force].
If push fails: show git error and suggest remediation.
Output structured receipt to console (and optionally to ~/.uds/push-history.jsonl):
{
"branch": "<branch>",
"commit_sha": "<sha>",
"gates_passed": ["lint", "test"],
"force_push": false,
"timestamp": "<ISO8601>",
"target_remote": "origin"
}
If auto_pr=true AND repo_mode=team AND no open PR exists for this branch:
Suggest running /pr-automation-assistant to create a Pull Request.
Before pushing, the assistant detects whether the target branch is a protected branch (e.g., main, master, release/*, hotfix/*).
推送前偵測目標分支是否為保護分支(例如 main、master、release/*、hotfix/*)。
When --force is detected, shows the impact before allowing execution.
偵測到 --force 時,推送前顯示影響範圍。
yes, force push)force_push: true in the push receiptRuns configured quality gates in sequence before pushing.
推送前依序執行已設定的品質 gate。
| Gate | Description | 說明 |
|---|---|---|
lint | Run project lint command | 執行 lint 檢查 |
test | Run project test command | 執行測試 |
type-check | TypeScript type checking (optional) | TypeScript 型別檢查(選用) |
ac-coverage | Acceptance criteria coverage check (optional) | AC 覆蓋率檢查(選用) |
security-scan | Security vulnerability scan (optional) | 安全掃描(選用) |
After a successful push, outputs a structured receipt for audit trail purposes.
推送成功後輸出結構化收據,供稽核追蹤使用。
{
"branch": "feature/my-feature",
"commit_sha": "a1b2c3d",
"gates_passed": ["lint", "test"],
"gates_skipped": false,
"force_push": false,
"timestamp": "2026-04-23T10:00:00Z",
"target_remote": "origin"
}
Optionally appended to ~/.uds/push-history.jsonl for persistent audit trail.
可選擇附加到 ~/.uds/push-history.jsonl 以持久化稽核追蹤。
After pushing a feature branch, prompts user to create a Pull Request if none exists.
推送 feature branch 後,若尚無 PR,提示使用者建立 Pull Request。
pr-automation-assistantsingle-owner repo mode or when --no-pr flag is used# Standard push (runs quality gates automatically)
/push
# Push with force (shows overwritten commits, requires confirmation)
/push --force
# Push to a specific remote branch
/push --target main
# Skip quality gates (emergency use)
/push --skip-gates
# Push without PR prompt
/push --no-pr
# Force push without PR prompt (e.g., updating a personal branch)
/push --force --no-pr
| Argument | Description | 說明 |
|---|---|---|
--force | Enable force push with guardrail checks | 啟用 force push,含護欄確認 |
--target <branch> | Specify target remote branch explicitly | 明確指定目標遠端分支 |
--skip-gates | Skip pre-push quality gates (emergency only) | 跳過品質 gate(僅緊急情況) |
--no-pr | Suppress PR automation prompt after push | 推送後不提示建立 PR |
Configure via uds.project.yaml:
push:
repo_mode: team # "team" | "single-owner"
protected_branches:
- main
- master
- "release/*"
- "hotfix/*"
push_gates:
default:
- lint
- test
optional:
- type-check
- ac-coverage
- security-scan
receipt:
output: console # "console" | "file" | "both"
file_path: "~/.uds/push-history.jsonl"
auto_pr: true # prompt to create PR after push to non-protected branch
| Option File | Mode | Description | 說明 |
|---|---|---|---|
options/push/team-mode.md | team | Full collaboration guardrails (default) | 完整協作護欄(預設) |
options/push/single-owner-mode.md | single-owner | Reduced friction for personal repos | 個人 repo 低摩擦模式 |
After /push completes, the AI assistant should suggest:
推送完成。建議下一步 / Push complete. Suggested next steps:
- 執行
/pr-automation-assistant建立或更新 Pull Request ⭐ Recommended / 推薦 — 確保協作流程完整 / Ensure complete collaboration workflow- 執行
/checkin確認程式碼簽入品質 — 下次提交前的品質確認 / Quality verification before next commit- 查看
~/.uds/push-history.jsonl確認推送紀錄 — 稽核追蹤 / Audit trail verification
| Version | Date | Changes |
|---|---|---|
| 2.0.0 | 2026-04-28 | Restore workflow execution steps (XSPEC-097 採用層解耦); remove deprecation notice |
| 1.0.0 | 2026-04-23 | Initial release — XSPEC-081 Phase 1 |
This skill is released under MIT License and CC BY 4.0.
Source: universal-dev-standards
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
57 skills in this plugin
/ac-coverage[UDS] Analyze AC-to-test traceability and generate requirement-level coverage reports.
Use when: auditing which acceptance criteria have tests, building a traceability matrix from a SPEC file, finding uncovered AC before release.
Not for: code-level line/branch/function coverage — use /coverage; writing the missing tests — use /tdd or /spec-derive.
Keywords: AC coverage, traceability, acceptance criteria, SPEC, traceability matrix, 驗收條件, 需求追蹤, 覆蓋率矩陣.
/adr[UDS] Create, manage, and track Architecture Decision Records (ADR).
Use when: architecture decisions, technology choices, design trade-offs, pattern selection.
Not for: decisions that do not change architecture — record them in the spec or commit; ideas not yet formed enough to decide — use /brainstorm.
Keywords: ADR, architecture decision, decision record, trade-off.
/ai-collaboration-standardsPrevent AI hallucination and ensure evidence-based responses when analyzing code or making suggestions.
Use when: analyzing code, making recommendations, providing options, or when user asks about confidence/certainty.
Not for: authoring the AI instruction files themselves — use /ai-instruction-standards; reviewing a concrete diff — use /code-review.
Keywords: certainty, assumption, inference, evidence, source.
/ai-friendly-architectureDesign AI-friendly architecture with explicit patterns, layered documentation, and semantic boundaries.
Use when: structuring projects for AI collaboration, optimizing codebase for AI analysis, setting up AI context.
Not for: writing the instruction files — use /ai-instruction-standards; language-conventional directory layout — use /project-structure-guide.
Keywords: architecture, AI-friendly, context, modules, documentation layers, .ai-context.yaml.
/ai-instruction-standardsCreate and maintain AI instruction files (CLAUDE.md, AGENTS.md, .cursor/rules/, etc.) with proper structure.
Use when: creating AI instruction files, separating universal vs project-specific rules, configuring AI tools.
Not for: shaping the codebase so AI can navigate it — use /ai-friendly-architecture; enforcing evidence-based answers — use /ai-collaboration-standards.
Keywords: CLAUDE.md, AGENTS.md, cursorrules, windsurfrules, clinerules, AI instructions, system prompt.
/api-designGuide API design following REST, GraphQL, and gRPC best practices.
Use when: designing APIs, reviewing endpoints, API versioning decisions.
Not for: verifying a running API against its consumers — use /contract-test; schema design behind the API — use /database.
Keywords: API, REST, GraphQL, gRPC, endpoint, versioning.
asiaostrich-universal-dev-standards@cascade-code-general-misc-3 is listed by joshuarweaver/cascade-code-general-misc-3 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-general-misc-3 --plugin asiaostrich-universal-dev-standardsOther plugins' skills for the same job