ci-trigger

A workflow for triggering and monitoring Jenkins, a system that automatically builds and packages software, for deployment to a test environment.

In plain words
What is it for?
Use it to start a Jenkins build after code is merged, track its status, wait for lengthy packaging steps, retrieve failure logs, analyse errors, and optionally notify DingTalk.
Why use it?
It removes the need to start long packaging jobs manually and gather their failure details by hand. It also checks the project settings and required credentials before starting.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/linshidream/skill-hub/ci-trigger
Any agent
npx skills add linshidream/skill-hub --skill ci-trigger
Clone the repo
git clone --depth 1 https://github.com/linshidream/skill-hub

Made for: Claude Code, Codex.

Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,029 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00055 $0.02029
Opus 5 $0.00028 $0.01014
Sonnet 5 $0.00011 $0.00406
Haiku 4.5 $0.00006 $0.00203

Measured 2d ago against content hash e7dbab035e54, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ci-trigger scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/adapters/jenkins.sh, scripts/dev-flow-util.py, scripts/fetch-log.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/dev/ci-trigger/SKILL.md · 217 lines

How it starts

The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CI/CD 触发与监控

目标

当用户的代码已合并到测试分支,需要部署到测试环境时,使用本 skill 触发 Jenkins CI 构建、监控构建状态、等待较长 package 流程、拉取失败日志分析原因,并输出可继续处理的结构化报告。

V1 实现 Jenkins 和可选钉钉通知。GitHub Actions、GitLab CI、企业微信、飞书和 Slack 属于 V2,只有对应 adapter 实现后才能在元数据和 .dev-flow.yml schema 中声明为可用。

使用场景

当用户说出类似需求时触发:

  • "触发构建"
  • "部署到测试环境"
  • "跑一下 Jenkins"
  • "构建一下"
  • "打包部署"

前置条件

  • 项目根目录存在 .dev-flow.yml,且 ci 配置块已填写
  • CI 系统的认证凭据已通过环境变量设置(如 JENKINS_URLJENKINS_USERJENKINS_TOKEN
  • 代码已推送到目标分支

执行流程

阶段 1: 准备

  1. 读取 .dev-flow.ymlci 配置
  2. 验证必要环境变量已设置(检查是否非空,不读取值
  3. 确定动态参数:
    • {{branch}} ← 从活动状态文件(由 dev-lifecycle resolve-active-state.py 解析路径,per-feature 模式下 .dev-flow/states/<feature>.json)或当前 git branch 获取
    • {{version}} ← 从项目 pom.xml / package.json / pyproject.toml 解析
  4. 展示即将触发的构建参数

阶段 2: 触发

  1. 调用 scripts/trigger.sh,根据 ci.system 分发到对应适配脚本

    Jenkins:

    bash scripts/trigger.sh --system jenkins --job your-project-pipeline \
      --params "CURRENT_VERSION=v1.0.1&ACTIVE=test&GIT_BRANCH=feat/zx/xxx"
    
  2. 获取构建编号 / Run ID

  3. 更新活动状态文件(路径由编排器通过 --state 传入,或脚本默认 .dev-flow-state.json 兜底):phase=building,记录 build.systembuild.numberbuild.status

阶段 3: 监控

  1. ci.{system}.poll.interval 轮询构建状态
  2. package 或镜像构建较慢时继续等待,直到 ci.{system}.poll.timeout
    • 默认建议 timeout=1800 秒,项目 package 更慢时可继续调大
    • 每次轮询输出简短进度,不把长日志刷屏
  3. 超过 timeout 则超时报告,并保留 build number 供下次继续查询
  4. 每次轮询输出简短进度

阶段 4: 报告

  1. 构建成功:
    • 输出部署信息(版本号、环境、耗时)
    • 更新活动状态文件 phase 为 deployed-test
    • 如果 notify.enabled=true 且配置了钉钉,调用 scripts/notify-dingtalk.sh
  2. 构建失败:
    • 立即拉取失败日志(scripts/fetch-log.sh
    • 分析失败原因:
      • 编译失败 → 定位报错文件和行号
      • 测试失败 → 列出失败的 test case
      • package 失败 → 定位 Maven/Gradle/npm 打包阶段错误
      • Docker 构建失败 → 检查 Dockerfile
      • 网络/依赖问题 → 建议重试
    • 输出分析结果
    • 更新 state:build.status=failure,phase 回到 code:revising
    • 建议下一步操作:回到 code review/revising,修复后重新触发构建
    • 如果 notify.enabled=true 且配置了钉钉,发送失败通知

凭据安全

所有凭据通过环境变量传递,脚本中使用 ${ENV_VAR} 引用:

Read the full file on GitHub · 217 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 217 lines · 55 tokens per session scan A e7dbab035e54

Subscribe to this mod's changes

ci-trigger is a skill published in the GitHub repository linshidream/skill-hub (19 stars, last pushed 21d ago), licensed MIT. It adds 55 tokens to every session and 2,029 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens