cnb-cool-integration

针对 cnb.cool 的云原生构建(CNB Build):生成/修改 .cnb.yml 流水线、触发规则、 构建环境、runner 资源、缓存、环境变量、手动触发与调试。 在接入、迁移、优化或排查 CNB 构建配置时使用。

5 stars

Best use case

cnb-cool-integration is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

针对 cnb.cool 的云原生构建(CNB Build):生成/修改 .cnb.yml 流水线、触发规则、 构建环境、runner 资源、缓存、环境变量、手动触发与调试。 在接入、迁移、优化或排查 CNB 构建配置时使用。

Teams using cnb-cool-integration should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/cnb-cool-integration/SKILL.md --create-dirs "https://raw.githubusercontent.com/northseadl/norix-skills/main/cnb-cool-integration/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/cnb-cool-integration/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How cnb-cool-integration Compares

Feature / Agentcnb-cool-integrationStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

针对 cnb.cool 的云原生构建(CNB Build):生成/修改 .cnb.yml 流水线、触发规则、 构建环境、runner 资源、缓存、环境变量、手动触发与调试。 在接入、迁移、优化或排查 CNB 构建配置时使用。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# CNB 云原生构建(cnb.cool)

## 你要输出什么

- `.cnb.yml`(必选):基于用户目标生成或最小改动修改,并解释触发与并发关系(pipeline 并发 / stage 串行 / job 并发)。
- 需要时额外输出:
  - `.cnb/web_trigger.yml`:需要“手动触发按钮/参数/选择目标构建”时。
  - `.cnb/env/*.yml`:需要复用环境变量或跨仓库 `imports` 时(见 `references/env.md`)。
- 注意:若用户使用的是 CODING 平台的云原生构建(配置文件为 `.coding-ci.yml`),语法与变量机制(尤其 `exports/imports`、内置任务等)与本 CNB 有差异,应改用 `coding-ci` Skill。

## 开始前先问(尽量一次问完)

1. 默认分支与触发分支:哪些分支要跑?是否需要 `$` 兜底配置?
2. 事件:`push` / `pull_request` / `commit.add` / `web_trigger_*` / `schedule` / `api_trigger` 等需要哪些?
3. 构建语言与命令:例如 Go/Node/Java,具体 `test/build/lint` 命令。
4. 构建环境:直接用 `docker.image`,还是 `docker.build`/`docker.devcontainer`?是否需要共享 `volumes`?
5. 资源与速度:runner 需要多少 `cpus/mem/disk`?是否需要 `tags`?
6. 缓存与参数:需要缓存什么(`node_modules` / `go` / `maven` / `npm cache`)?是否需要跨节点缓存(`docker:cache`)?是否需要 `exports` 传参?
7. 发布与手动:是否需要 `docker build & push`、部署、以及 web_trigger 按钮?

## 配置生成/修改流程

### 1) 选用 `.cnb.yml` 结构

- **推荐**:`<branch> -> <event> -> [pipelines]`(最直观)
- **需要跨分支复用**:使用 `imports` 或 YAML 锚点(见 `references/cnb-yml.md`、`references/file-reference.md`)

### 2) 写最小可跑的 pipeline

- pipeline 内 `stages` 默认串行;stage 内 `jobs` 默认并发。
- 同一 `<branch>/<event>` 下多个 pipeline **并发**,并共享相同 docker 环境与 runner(见 `references/cnb-yml.md`)。

### 3) 加入缓存与复用

- 用 `docker.volumes` 缓存目录(copy-on-write,跨 stage 复制;见 `references/cache.md`)。
- 需要跨节点共享时,用 `docker:cache`(见 `references/cache.md`)。

### 4) 补齐触发与手动能力

- 分支匹配用 glob;不匹配时可用 `$` 兜底。
- web_trigger 的 event 为 `web_trigger_<button-id>`(需要 `.cnb/web_trigger.yml`;见 `references/web-trigger.md`)。

### 5) 出问题先按这套排查

- 触发没跑:检查 branch glob、event 名、是否被 `skip-cnb`/`skip-cnb: <stage>` 跳过(见 `references/trigger-rule.md`、`references/recipes.md`)。
- 缓存没命中:确认 `volumes` 挂载路径一致;需要跨节点则改用 `docker:cache`(见 `references/cache.md`)。
- 需要进机排查:按 `login` debug 配置加一段可登录 stage(见 `references/debug.md`)。

## 常见用户请求 → 你应加载的参考

- 只问“怎么写 `.cnb.yml`”:读 `references/cnb-yml.md` 与 `references/docker-and-runner.md`
- 只问“触发规则/事件/分支匹配”:读 `references/trigger-rule.md`
- 只问“env/imports/exports”:读 `references/env.md`
- 只问“缓存/加速”:读 `references/cache.md`
- 只问“手动触发按钮”:读 `references/web-trigger.md`
- 只问“登录调试”:读 `references/debug.md`
- 只问“Monorepo 按需构建 / Docker build&push / 跳过构建 / 超时 / 权限”:读 `references/recipes.md`

Related Skills

feishu-integration

5
from northseadl/norix-skills

Feishu (Lark) unified CLI for tasks, documents, wiki, bitable, messaging, approval, and Drive. Supports search/create/edit/publish/export across all modules. Use when reading/writing Feishu docs, searching docs or wiki, managing tasks, sending messages, creating approvals, exporting to Markdown, or any 飞书/Lark interaction.

coding-net-integration

5
from northseadl/norix-skills

Coding.net DevOps automation: MR lifecycle, CI operations (trigger/logs/stop), artifact registry, cross-project queries, remote file audit.

web-scraper

5
from northseadl/norix-skills

Web scraper with SPA/JavaScript rendering, page interaction, and JS execution. Two-tier engine (HTTP → Playwright browser). Smart discovery, batch fetch, interactive content extraction, OpenAPI parsing. Use when read_url_content fails, SPA rendering needed, or page interaction required.

pm-toolkit

5
from northseadl/norix-skills

自然语言 → Mermaid 图表(16 种)+ 网页原型,本地 Web 面板实时预览/导出。

mobile-testing

5
from northseadl/norix-skills

Android/iOS automated testing: device management, app install, performance profiling, log analysis, screenshot comparison, Maestro E2E orchestration.

llm-agent-dev

5
from northseadl/norix-skills

LLM Agent engineering: pattern selection (12-mode matrix), data simulation, convergence iteration. Covers intent routing, function calling, ReAct, MCP, prompt chaining, guardrails, evaluation.

image-studio

5
from northseadl/norix-skills

AI image generation and editing: e-commerce templates (hero/banner/detail/lifestyle), image refinement (background replace/remove, enhance, retouch, style transfer), icon extraction (bg-removal + detect + smart crop with transparent output).

es-analytics

5
from northseadl/norix-skills

Elasticsearch / SLS 只读数据分析:索引探索、mapping、聚合统计、日志搜索、时间序列、多 Profile。

doc-sentinel

5
from northseadl/norix-skills

Document-code change notification system: traceable doc-code binding via git tree hash, git-diff-driven reconciliation plans with confidence/risk metadata, and idempotent execution. Use when maintaining documentation freshness, detecting stale docs, or binding docs to source code.

agent-task-orchestration

5
from northseadl/norix-skills

Task decomposition and multi-agent orchestration with retry, checkpoint recovery, and real-time monitoring. Mixed Codex/Claude Code engine. Parallel/sequential execution.

agent-swe-team

5
from northseadl/norix-skills

Multi-agent SWE team built on the Workshop model. Full-stack vertical workers, meeting room with @mention notification, private pipes, shared task board. Git worktree isolation, Leader-driven coordination. Mixed Codex/Claude Code engine. Use when a task needs engineering depth beyond a single agent. NOT for simple task parallelism (use agent-task-orchestration) or design discussions (use agent-brainstorm).

agent-front-design

5
from northseadl/norix-skills

Frontend design blueprints with craftsmanship scoring, self-critique loops, and engineering handoff. Aesthetic intelligence against AI homogeneity. Use for: UI/UX design specs, design system creation, visual direction exploration, component design review, design-to-engineering handoff.