authoring-ci-workflows
聚焦审稿式判断逻辑,适合维护稳定一致的 CI 策略。
修改 CI 工作流可能影响构建与发布,需要谨慎变更并测试。
对 `.github/` 下 GitHub Actions 工作流的编写与判断指导。
写或改 .github/ 下的 GitHub Actions 工作流时会用到。帮你决定触发条件、并发组、clone 深度、timeout、缓存和 runner 的选择,也会处理 App token、fork 下的 secrets 和 action pinning 等细节。会说明 PostHog 的工作流约定及背后原因,并指向 actionlint / hogli 等 linters,省去踩雷和重复试错。
▸ 展开 SKILL.md 英文原文
Use when adding or editing a GitHub Actions workflow, composite action, or reusable workflow under `.github/` — new CI jobs, triggers, matrices, checkout/clone tuning, action pinning, GitHub App token auth, concurrency groups, `timeout-minutes`, `paths` filters, caching, or runner choice. Covers PostHog's workflow-authoring conventions and the reasons behind them: the 500-runs/10s dispatch cap, shallow vs full clone, per-SHA push concurrency, dedicated App-token rate-limit buckets, and fork-safe secrets on a public repo. Points to the linters (`bin/hogli lint:workflows`, actionlint) that enforce the mechanical rules, and to the narrower skills for production deploys, secrets, and Depot runners. Not for debugging red CI (use debugging-ci-failures) or wiring a new secret end to end (use managing-github-actions-secrets).
帮我安装这个 skill:https://raw.githubusercontent.com/PostHog/posthog/master/.agents/skills/authoring-ci-workflows/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/PostHog/posthog/master/.agents/skills/authoring-ci-workflows/SKILL.md"# Authoring CI workflows Conventions for `.github/workflows/**` and `.github/actions/**`. The linters own the mechanical rules (below); this skill is the **judgment calls** they can't enforce. ## Before you write - Copy from a canonical file rather than from memory. `ci-paths-filter.yml` is the smallest complete example (triggers, concurrency, timeout, app token, Depot runner); `ci-backend.yml` is the reference for the heavy patterns (bounded-depth checkout, per-SHA concurrency, draft/ready, sharding). - Related skills — reach for these instead of duplicating them here: - `/gating-production-deploys` — any job that pushes a prod image or dispatches a Charts deploy. - `/managing-gi