AgentSkillsCN

buildgit

Jenkins CI/CD构建监控器。检查构建状态,推送并监控构建,实时追踪构建进度。当用户询问CI/CD状态、构建结果,或希望推送代码并监控Jenkins构建,又或是询问CI是否通过时,可使用此功能。触发指令包括“检查构建”“构建状态”“CI是否通过”“构建是否绿色”“推送并观察”“推送并监控”“CI中哪里出了问题”“为什么构建失败”“追踪构建”“监控构建”“触发构建”“运行构建”。

SKILL.md
--- frontmatter
name: buildgit
description: Jenkins CI/CD build monitor. Check build status, push and monitor builds,  follow builds in real-time. Use when the user asks about CI/CD status,  build results, wants to push code and monitor the Jenkins build, or asks if CI is passing. Triggers include "check build", "build status", "is CI passing", "is the build green", "push and watch", "push and monitor", "what failed in CI",  "why did the build fail", "follow the build", "watch the build", "trigger a build",  "run the build".
license: MIT

buildgit

A unified CLI for git operations with Jenkins CI/CD integration.

Prerequisites

Before running any command, verify:

  1. Jenkins env vars are set: JENKINS_URL, JENKINS_USER_ID, JENKINS_API_TOKEN
  2. Project has JOB_NAME=<name> in its CLAUDE.md or AGENTS.md

If any prerequisite is missing, tell the user what's needed instead of attempting the command.

The buildgit script is bundled at scripts/buildgit within this skill package.

Commands

CommandPurpose
scripts/buildgit statusJenkins build status snapshot
scripts/buildgit status -fFollow builds in real-time (Ctrl+C to stop)
scripts/buildgit status --jsonMachine-readable Jenkins build status
scripts/buildgit pushPush + monitor Jenkins build until complete
scripts/buildgit push --no-followPush only, no build monitoring
scripts/buildgit buildTrigger a new build + monitor until complete
scripts/buildgit build --no-followTrigger only, no monitoring
scripts/buildgit --job <name> <cmd>Override auto-detected job name

Interpreting Output

Exit codes:

CodeMeaning
0Success (build passed, or git command succeeded)
1Build failed, or an error occurred
2Build is currently in progress

Build states:

  • SUCCESS — build passed, all tests green
  • FAILURE — build failed; output includes failed stage and error details
  • BUILDING — build is still running
  • ABORTED — build was manually cancelled

For failures, summarize the failed stage name, error logs, and test failure details for the user.

Dynamic Context

To inject live build state into context before reasoning about build issues:

code
!`scripts/buildgit status --json 2>/dev/null`

Reference

See references/reference.md for full command documentation, example output, and troubleshooting.