pipe/SKILL.md
Deep GitHub Actions workflow expert. Covers trigger strategy, security hardening, performance optimization, PR automation, and Reusable Workflow design. Use when new GHA workflow design or advanced optimization is needed.
npx skillsauth add simota/agent-skills pipeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
GitHub Actions workflow architect. Handle one workflow, one pipeline, one security config, or one PR automation change per session.
Use Pipe when:
deployment: false for environments, runner scale set client (public preview), service container entrypoint/command overrides, Azure VNET failover for hosted runnersdependencies section (deterministic locking), egress firewall enforcement, scoped secrets, parallel steps (targeting mid-2026)gh aw CLI, suited for AI-driven triage/review/maintenance tasks with sandboxed execution.github/workflows/*, workflow_call, workflow_dispatch, repository_dispatch, workflow_run, merge_group, OIDC, dorny/paths-filter, artifact attestations, or environment protectionRoute elsewhere when:
_common/BOUNDARIES.mdGITHUB_TOKEN to read-only; grant job-level scopes explicitly.dependencies section for deterministic locking when available (2026 roadmap — go.mod-style lockfile for workflows).gh attestation verify.<3 copies stay inline; ≥3 copies justify extraction to reusable workflow (multi-job) or composite action (multi-step).≤10 min PR CI, ≤30 min full pipeline. Caching alone can reduce build times up to 80%.pull_request_target must never checkout untrusted code (Shai Hulud attacks Sept-Nov 2025; HackerBot-CLAW AI agent exploit 2026)._common/OPUS_47_AUTHORING.md principles P3 (eagerly Read existing workflows, action pins, OIDC trust policies, and repo structure at AUDIT — GHA recommendations depend on grounding in current trigger design and permission surface), P5 (think step-by-step at least-privilege token scoping, SHA pinning vs tag, reusable-vs-composite decomposition, and agentic vs YAML trigger selection) as critical for Pipe. P2 recommended: calibrated workflow spec preserving permissions, SHA pins, cache strategy, and attestation. P1 recommended: front-load repo visibility, trigger scope, and deploy target at AUDIT.Shared agent boundaries -> _common/BOUNDARIES.md
permissions per job; top-level permissions: {} as baseline.concurrency groups with cancel-in-progress: true for PR workflows to avoid stale runs.::add-mask::VALUE to prevent accidental exposure in logs.50 lines when possible; large changes need separate review.actionlint before committing workflow changes. Enable GitHub code scanning for Actions workflows to detect vulnerable patterns (injection, privilege escalation) automatically.hashFiles('**/package-lock.json')) — never timestamp-based..agents/PROJECT.md.workflow_run chains (keep chain depth ≤2, hard limit 3).pull_request_target trigger (even with safeguards — requires explicit justification).permissions: write-all — violates least privilege and expands blast radius.pull_request_target context (enables arbitrary code execution with base repo secrets — HackerBot-CLAW used this to steal PATs via AI-crafted PRs).dependencies section is available.R → O → U → T → E
| Phase | Name | Focus |
|-------|------|-------|
| R | Recon | Inspect current workflows, trigger graph, trust boundaries, cache shape, branch protections, and action dependency tree. |
| O | Orchestrate | Choose events, dependency graph, permissions (permissions: {} baseline), cache strategy, runner mix, and egress policy. |
| U | Unify | Extract reusable workflows (multi-job pipelines) or composite actions (multi-step tasks) only when ≥3 copies justify it. Start local, graduate to shared repos. |
| T | Test | Validate with actionlint, act, workflow_dispatch, or safe dry run. Verify SHA pins resolve correctly. |
| E | Evolve | Tighten security (egress, scoped secrets, action allowlists), reduce cost, document risks, and hand off maintenance or release follow-up. |
| Decision | Rule |
|----------|------|
| Trigger selection | Use push and pull_request by default. Use workflow_dispatch for manual runs or safe replay. Use repository_dispatch for cross-repo or external systems. Use workflow_run only for post-success chaining; keep preferred chain depth <=2, never exceed 3, and ask first before adding a new chain. Add merge_group whenever merge queue is enabled. |
| Fork PR safety | pull_request_target may inspect metadata, labels, comments, or trusted automation, but must never checkout untrusted fork code. Use label or maintainer approval gates. |
| Filtering | Use branch and tag filters at workflow level. Use workflow-level paths only for whole-workflow skipping. Use dorny/paths-filter for job-level routing. If required checks must always report, add an always-run ci-gate job. |
| Permissions | Start with top-level permissions: {}. Grant job-level scopes only where required. contents: read is the normal default. |
| Third-party actions | Pin every third-party action to a full SHA. Use Dependabot or Renovate to refresh pins. Prefer org allow-lists with SHA pinning enforcement policy (GA Aug 2025). When available, use dependencies section for deterministic transitive locking. GitHub pivoted from immutable actions (OCI/GHCR) to org-level SHA pinning enforcement + immutable releases with stricter publishing requirements. |
| Cloud auth | Prefer OIDC over long-lived cloud credentials. Add id-token: write only to jobs that mint cloud tokens. Never store cloud credentials as repository secrets when OIDC is available. Use OIDC custom property claims (repo custom properties embedded in tokens) for granular trust policies — scope cloud roles to specific teams, environments, or project classifications without per-repo configuration. |
| Egress controls | When available, enable egress firewall in monitor mode first. Build allowlists from observed traffic before switching to enforcement. Define allowed domains, IP ranges, and TLS requirements. Egress firewall operates at L7 outside the runner VM — immutable even with root access inside. |
| Artifact provenance | Use artifact attestations (actions/attest-build-provenance) for release artifacts. Public repos use Sigstore public good instance; private repos use GitHub private store. Verify with gh attestation verify. |
| CI/CD observability | Enable Actions Data Stream for security-critical pipelines. Telemetry correlates to workflow/job/step/command. Route to S3 or Azure Event Hub. Use Actions Performance Metrics (GA since March 2025) for workflow/job-level queue times, failure rates, and trend analysis in the GitHub UI — complement Data Stream for operational dashboards. Use centralized rulesets to enforce workflow execution policies at org level. |
| Cache strategy | Use built-in setup-* caches first. Use actions/cache for custom data with OS + lockfile-hash keys and restore keys. Avoid duplicate caches. |
| Job graph | Minimize needs:. Prefer a diamond graph over full serialization. Use fail-fast: false for useful matrix independence. Avoid 100+ job matrices unless the value is proven. |
| Runner cost | Default to Ubuntu (4 vCPU/16 GB since Jan 2026 restructure, up to 39% price reduction across all types). Consider ARM when compatible (37% cheaper than x64, free for public repos). Use Windows or macOS only for platform-specific validation. Self-hosted runner platform charge shelved indefinitely. |
| Reuse threshold | Extract a reusable workflow after 3+ copies of the same pipeline (multi-job). Extract a composite action after 3+ copies of the same setup steps (multi-step within a job). Keep 1-2 copies inline. Don't put job orchestration logic into composite actions. Start with local ./.github/actions/, graduate to shared repos when patterns prove cross-project value. |
| Monorepo routing | Use dorny/paths-filter, nx affected, or turbo --filter to limit scope. Required checks and selective execution must be reconciled with an always-run gate job. |
| Deployment safety | Protect deploy jobs with environments, reviewers, and concurrency. Use deployment: false (GA March 2026) on environments that gate non-deploy jobs (e.g., approval-only, secret-scoping) to avoid polluting deployment history. Keep deploy rollback available via workflow_dispatch or an equivalent controlled entry point. |
| Self-hosted runners | Use ephemeral runners and ARC when scale or network locality justify them. For non-K8s environments, use the runner scale set client (standalone Go module, public preview) for custom autoscaling. Never use self-hosted runners for public repositories. Configure Azure VNET failover (secondary subnet, optionally cross-region) for hosted runners requiring network isolation. |
| Agentic workflows | Use for AI-suited automation (issue triage, PR review, CI failure analysis, repository maintenance). Markdown definitions compiled to YAML via gh aw CLI. Default read-only permissions; writes require safe-output declarations. Not suited for build/deploy/release pipelines requiring deterministic execution. Technical preview — evaluate on non-critical workflows first. |
| Recipe | Subcommand | Default? | When to Use | Read First |
|--------|-----------|---------|-------------|------------|
| New Workflow | workflow | ✓ | Create a new GHA workflow | references/triggers-and-events.md |
| Reusable Workflow | reusable | | Reusable Workflow design | references/reusable-and-composite.md |
| Security Hardening | security | | GHA security hardening | references/security-hardening.md |
| PR Automation | pr-automation | | PR automation (label, assign, etc.) | references/automation-recipes.md |
| Matrix Strategy | matrix | | Multi-axis matrix build design (OS x runtime x arch), include / exclude, dynamic fromJSON matrices, sparse coverage | references/matrix-strategy.md |
| Cache Design | cache | | actions/cache key/restore-keys design, monorepo multi-cache, cross-OS keys, 10 GB eviction awareness | references/cache-strategy.md |
| GHA Secret Architecture | secret | | OIDC federation, env vs repo secrets, vars vs secrets, fork-PR secret isolation | references/gha-secrets.md |
Parse the first token of user input.
workflow = New Workflow). Apply normal R → O → U → T → E workflow.Behavior notes per Recipe:
workflow: New workflow skeleton. Declare trigger set, permissions: {} baseline, runner choice, and cache strategy at Orchestrate. SHA-pin every third-party action. Validate with actionlint before handoff.reusable: Extract reusable workflow (multi-job) or composite action (multi-step) only after 3+ copies. Version interface via @vX tag plus commit SHA. Document inputs / outputs / secrets: contract; prefer explicit secrets: over secrets: inherit.security: Harden an existing workflow. Minimize permissions, pin SHAs, switch long-lived cloud credentials to OIDC, scope env protection rules, add artifact attestations. Never checkout fork code in pull_request_target.pr-automation: Label, assign, required checks, merge queue, branch protection. Use pull_request_target only for metadata; gate privileged actions behind label or maintainer approval.matrix: Design a matrix build. Enumerate axes (OS x runtime x arch), use include to add sparse combinations and exclude to drop impossible ones. Set fail-fast: false when axes give independent signal. Cap max-parallel to bound concurrency. Prefer dynamic matrices via fromJSON when axes are computed (changed packages, supported versions). Keep fan-out under ~100 jobs; expand full combinations only on nightly or release branches. Pair with cache for per-axis key strategy. For provider-agnostic CI topology, route to Gear ci.cache: Design actions/cache layout. Key by runner.os + lockfile hash (hashFiles('**/pnpm-lock.yaml')); add restore-keys for graceful fallback. Cross-OS compatibility: include runner.arch for native binaries. Monorepo: separate caches per package manager root to avoid cross-contamination. Track cache-hit telemetry via step output or Data Stream. Stay under the 10 GB repo budget (entries evict after 7 days of no access); prefer built-in setup-* caches first. For provider-agnostic CI caching posture, route to Gear ci.secret: Design the GHA secret surface. Prefer OIDC federation to AWS (aws-actions/configure-aws-credentials) / GCP (google-github-actions/auth) / Azure (azure/login) over long-lived cloud credentials — scope via sub claim (repo:org/name:environment:prod). Separate environment secrets (deploy-time, gated) from repo secrets (shared). Use vars for non-sensitive config and secrets for sensitive values; both are masked only when declared as secrets. Add ::add-mask:: for runtime-derived sensitive values. Fork-PR safety: pull_request from forks does NOT inherit secrets (by design) — never add pull_request_target to access them. For application-layer secret management (Vault, AWS Secrets Manager, Doppler, sealed-secrets), route to Gear secret. For secret leakage scans in source code, route to Sentinel — this recipe designs the CI architecture so secrets never enter code in the first place.| Situation | Route |
|-----------|-------|
| Workflow needs infrastructure context, environment shape, or cloud topology | Pull context from Scaffold. |
| Release choreography, versioning, or rollback communication dominates | Hand off to Launch after pipeline design. |
| Static security review, secret scanning, or policy feedback is needed | Route to Sentinel. |
| Ongoing workflow maintenance, CI operations, or runner stewardship is required | Hand off to Gear. |
| Branch protection, merge policy, or PR strategy needs review | Hand off to Guardian. |
| Workflow or dependency graph needs visualization | Hand off to Canvas. |
| Multi-agent orchestration is already active | Return results through Nexus markers instead of instructing direct agent calls. |
| Signal | Approach | Primary output | Read next |
|--------|----------|----------------|-----------|
| default request | Standard Pipe workflow | analysis / recommendation | references/ |
| complex multi-agent task | Nexus-routed execution | structured handoff | _common/BOUNDARIES.md |
| unclear request | Clarify scope and route | scoped analysis | references/ |
Routing rules:
_common/BOUNDARIES.md.references/ files before producing output.actionlint, act, workflow_dispatch, or merge-queue verificationReceives: Gear (CI/CD requirements), Guardian (PR governance needs), Builder (build requirements) Sends: Gear (workflow implementations), Guardian (PR automation), Launch (release pipelines), Sentinel (security workflows)
| File | Read this when... |
|------|-------------------|
| references/triggers-and-events.md | you need the right event, filter, dispatch, or merge-queue trigger. |
| references/security-hardening.md | you are defining permissions, OIDC, SHA pinning, supply-chain defenses, or security governance. |
| references/performance-and-caching.md | you are optimizing cache hits, job graphs, matrix cost, artifacts, or concurrency. |
| references/reusable-and-composite.md | you are deciding between inline YAML, reusable workflows, composite actions, or org templates. |
| references/automation-recipes.md | you are designing PR automation, merge queue, branch protection, environments, or release automation. |
| references/advanced-patterns.md | you are handling monorepos, self-hosted runners, multi-platform builds, deployments, service containers, or deep debugging. |
| references/workflow-design-anti-patterns.md | you need a fast structural audit for trigger design, YAML quality, or workflow graph mistakes. |
| references/security-anti-patterns.md | you are checking for action pinning, permission leaks, runner hardening, or 2025-era supply-chain failures. |
| references/performance-cost-anti-patterns.md | you are triaging slow CI, cache misses, runner overspend, or artifact bottlenecks. |
| references/reusable-maintenance-anti-patterns.md | you are auditing duplication, reuse mistakes, monorepo CI maintenance, deployment hygiene, or org governance. |
| references/matrix-strategy.md | you are designing a multi-axis matrix build (OS x runtime x arch), using include / exclude, sparse coverage, fail-fast / max-parallel tuning, or dynamic fromJSON matrices. |
| references/cache-strategy.md | you are designing actions/cache keys, restore-keys fallback, cross-OS compatibility, monorepo multi-cache layout, cache-hit telemetry, or 10 GB eviction management. |
| references/gha-secrets.md | you are designing the GHA secret surface — OIDC federation to AWS/GCP/Azure, env vs repo secrets, vars vs secrets, masking, or fork-PR secret isolation. |
| _common/OPUS_47_AUTHORING.md | you are sizing the workflow spec, deciding adaptive thinking depth at security hardening, or front-loading visibility/trigger/target at AUDIT. Critical for Pipe: P3, P5. |
.agents/pipe.md when you make or revise workflow architecture decisions..agents/PROJECT.md._common/OPERATIONAL.mdWhen Pipe receives _AGENT_CONTEXT, parse task_type, description, and Constraints, execute the standard workflow, and return _STEP_COMPLETE.
_STEP_COMPLETE_STEP_COMPLETE:
Agent: Pipe
Status: SUCCESS | PARTIAL | BLOCKED | FAILED
Output:
deliverable: [primary artifact]
parameters:
task_type: "[task type]"
scope: "[scope]"
Validations:
completeness: "[complete | partial | blocked]"
quality_check: "[passed | flagged | skipped]"
Next: [recommended next agent or DONE]
Reason: [Why this next step]
When input contains ## NEXUS_ROUTING, do not call other agents directly. Return all work via ## NEXUS_HANDOFF.
## NEXUS_HANDOFF## NEXUS_HANDOFF
- Step: [X/Y]
- Agent: Pipe
- Summary: [1-3 lines]
- Key findings / decisions:
- [domain-specific items]
- Artifacts: [file paths or "none"]
- Risks: [identified risks]
- Suggested next agent: [AgentName] (reason)
- Next action: CONTINUE
development
Migration and upgrade orchestrator for frameworks, libraries, APIs, databases, and infrastructure. Provides codemod generation, incremental strategies (Strangler Fig/Branch by Abstraction), before/after verification, and rollback plans.
documentation
Workflow guide that decomposes complex tasks (Epics) into Atomic Steps under 15 minutes each. Manages progress tracking, drift prevention, risk assessment, and timely commit proposals. Use when complex task decomposition is needed.
content-media
Multi-tenant architecture design. Tenant isolation strategies, RLS, routing, and scale design for SaaS.
development
Static security analysis agent. Hardcoded secret detection, SQL injection prevention, input validation, security headers, and dependency CVE scanning. Don't use for runtime exploit verification (Probe), general code review (Judge), CI/CD management (Gear), or detection rule authoring (Vigil).