Agent Skills
› FlorianBruniaux/claude-code-ultimate-guide
› ci-pipeline
ci-pipeline
GitHub自动推送当前分支并生成 CI/CD 流水线追踪链接,支持 GitLab CI 和 GitHub Actions。包含分支保护、未提交检查及可选的实时状态查询功能。
Trigger Scenarios
用户需要推送代码到远程仓库
用户希望查看或触发持续集成/持续部署流程
用户询问构建或测试任务的进度
Install
npx skills add FlorianBruniaux/claude-code-ultimate-guide --skill ci-pipeline -g -y
SKILL.md
Frontmatter
{
"name": "ci-pipeline",
"model": "haiku",
"effort": "low",
"description": "Push current branch and return the pipeline tracking URL (GitLab or GitHub Actions)",
"allowed-tools": [
"Bash"
],
"argument-hint": "[--force | --draft]",
"disable-model-invocation": true
}
/ci:pipeline: Push and trigger pipeline
Pushes the current branch and returns the pipeline tracking link.
Process
BRANCH=$(git branch --show-current)
# 1. Safety checks
if echo "$BRANCH" | grep -qE "^(main|master|production)$"; then
echo "❌ Direct push to $BRANCH is not allowed. Create a feature/fix branch."
exit 1
fi
# 2. Check for uncommitted changes
UNCOMMITTED=$(git status --porcelain | wc -l | tr -d ' ')
if [ "$UNCOMMITTED" -gt 0 ]; then
echo "⚠️ $UNCOMMITTED uncommitted file(s):"
git status --short
echo ""
echo "Commit first with /commit or git add + git commit"
exit 0
fi
# 3. Push
echo "Pushing → origin/$BRANCH"
git push origin "$BRANCH" 2>&1
Pipeline URL
GitLab CI
REMOTE=$(git remote get-url origin 2>/dev/null || echo "")
WEB_URL=$(echo "$REMOTE" | sed 's/git@gitlab\.com:/https:\/\/gitlab.com\//' | sed 's/\.git$//')
echo ""
echo "✅ Push OK"
echo " Pipeline: $WEB_URL/-/pipelines?ref=$BRANCH"
# Live status via glab (if installed)
if command -v glab &>/dev/null; then
sleep 3
glab ci status --branch "$BRANCH" 2>/dev/null || true
fi
GitHub Actions
REMOTE=$(git remote get-url origin 2>/dev/null || echo "")
WEB_URL=$(echo "$REMOTE" | sed 's/git@github\.com:/https:\/\/github.com\//' | sed 's/\.git$//')
echo ""
echo "✅ Push OK"
echo " Actions: $WEB_URL/actions?query=branch%3A$BRANCH"
# Live status via gh (if installed)
if command -v gh &>/dev/null; then
sleep 5
gh run list --branch "$BRANCH" --limit 3 2>/dev/null || true
fi
Expected output
Pushing → origin/feat/add-payment-retry
Enumerating objects: 12, done.
...
✅ Push OK
Pipeline: https://gitlab.com/org/my-app/-/pipelines?ref=feat/add-payment-retry
Pipeline status (after 3s):
⏳ lint running
⏸️ test waiting
⏸️ deploy waiting
Usage
/ci:pipeline
Target: $ARGUMENTS
Version History
- fa57065 Current 2026-07-25 10:17


