AgentSkillsCN

DevFlow

CI/CD 工作流执行器,可检测当前开发阶段并引导至下一步。适用于用户提到“devflow”、“处于哪个阶段”、“下一步是什么”、“我在哪一步”、“检查流程”、“推送到生产环境”、“部署”或在开发过程中的任何时刻保持进度时使用。防止偏离轨道,例如直接在主分支上工作或直接编辑生产环境。

SKILL.md
--- frontmatter
name: DevFlow
description: CI/CD workflow enforcer that detects current dev stage and guides to the next step. USE WHEN user says "devflow", "what stage", "next step", "where am I", "check flow", "push to prod", "deploy", OR at any point during development to stay on track. Prevents deviations like working on main or editing prod directly.

DevFlow

CI/CD workflow guardrail for any git project. Detects where you are in the development pipeline, blocks dangerous deviations, and moves you to the next stage.

The pipeline: Branch → Develop → Push → PR → Review → Merge → Deploy

The rule: All code flows through git. Never touch production directly.

Execution

When /DevFlow is invoked, read and follow Workflows/CheckAndAdvance.md exactly.

Workflow Routing

WorkflowTriggerFile
CheckAndAdvance"devflow", "next step", "where am I", "check flow", any dev stage questionWorkflows/CheckAndAdvance.md
CrossRepoCoordinationChanges span multiple repos in a workspaceWorkflows/CrossRepoCoordination.md

Examples

Example 1: Starting new work

code
User: /DevFlow
→ Detects: on main, clean working tree
→ Output: "Stage: READY. Create a feature branch to start: git checkout -b feature/your-feature"

Example 2: Mid-development

code
User: /DevFlow
→ Detects: on feature/xyz, uncommitted changes, no remote branch
→ Output: "Stage: DEVELOP. You have uncommitted changes. Next: commit and push to trigger CI."

Example 3: Ready to merge

code
User: /DevFlow
→ Detects: on feature/xyz, pushed, CI passing, no PR
→ Output: "Stage: PR. Create a pull request: gh pr create --base main"

Example 4: Deviation detected

code
User: /DevFlow
→ Detects: uncommitted changes on main
→ Output: "DEVIATION: You have uncommitted changes on main. Stash and branch: git stash && git checkout -b feature/fix && git stash pop"

Example 5: Go all the way

code
User: "go all the way to create PR" or "push through to merge"
→ Executes ALL remaining pipeline stages automatically (commit → push → CI → PR → review findings → fix)
→ Includes mandatory review bot loop: parse CodeRabbit findings, fix Critical/Major, re-push, re-check
→ Only stops at merge unless explicitly told to merge too

Example 6: PR has review findings

code
User: /DevFlow
→ Detects: PR #17 open, CodeRabbit posted 3 Critical + 2 Major findings
→ Output: "Stage: PR_REVIEW. 3 Critical, 2 Major findings from CodeRabbit. Must fix before merge."
→ Shows each finding with file:line, severity, and title