home / skills / marcoodignoti / couple-diary / cicd-workflows

cicd-workflows skill

/.agent/skills/cicd-workflows

This skill helps you write and validate Expo EAS workflow YAML files, enabling reliable CI/CD pipelines for Expo projects.

npx playbooks add skill marcoodignoti/couple-diary --skill cicd-workflows

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
3.4 KB
---
name: cicd-workflows
description: Helps understand and write EAS workflow YAML files for Expo projects. Use this skill when the user asks about CI/CD or workflows in an Expo or EAS context, mentions .eas/workflows/, or wants help with EAS build pipelines or deployment automation.
allowed-tools: "Read,Write,Bash(node:*)"
version: 1.0.0
license: MIT License
---

# EAS Workflows Skill

Help developers write and edit EAS CI/CD workflow YAML files.

## Reference Documentation

Fetch these resources before generating or validating workflow files. Use the fetch script (implemented using Node.js) in this skill's `scripts/` directory; it caches responses using ETags for efficiency:

```bash
# Fetch resources
node {baseDir}/scripts/fetch.js <url>
```

1. **JSON Schema** — https://api.expo.dev/v2/workflows/schema
   - It is NECESSARY to fetch this schema
   - Source of truth for validation
   - All job types and their required/optional parameters
   - Trigger types and configurations
   - Runner types, VM images, and all enums

2. **Syntax Documentation** — https://raw.githubusercontent.com/expo/expo/refs/heads/main/docs/pages/eas/workflows/syntax.mdx
   - Overview of workflow YAML syntax
   - Examples and English explanations
   - Expression syntax and contexts

3. **Pre-packaged Jobs** — https://raw.githubusercontent.com/expo/expo/refs/heads/main/docs/pages/eas/workflows/pre-packaged-jobs.mdx
   - Documentation for supported pre-packaged job types
   - Job-specific parameters and outputs

Do not rely on memorized values; these resources evolve as new features are added.

## Workflow File Location

Workflows live in `.eas/workflows/*.yml` (or `.yaml`).

## Top-Level Structure

A workflow file has these top-level keys:

- `name` — Display name for the workflow
- `on` — Triggers that start the workflow (at least one required)
- `jobs` — Job definitions (required)
- `defaults` — Shared defaults for all jobs
- `concurrency` — Control parallel workflow runs

Consult the schema for the full specification of each section.

## Expressions

Use `${{ }}` syntax for dynamic values. The schema defines available contexts:

- `github.*` — GitHub repository and event information
- `inputs.*` — Values from `workflow_dispatch` inputs
- `needs.*` — Outputs and status from dependent jobs
- `jobs.*` — Job outputs (alternative syntax)
- `steps.*` — Step outputs within custom jobs
- `workflow.*` — Workflow metadata

## Generating Workflows

When generating or editing workflows:

1. Fetch the schema to get current job types, parameters, and allowed values
2. Validate that required fields are present for each job type
3. Verify job references in `needs` and `after` exist in the workflow
4. Check that expressions reference valid contexts and outputs
5. Ensure `if` conditions respect the schema's length constraints

## Validation

After generating or editing a workflow file, validate it against the schema:

```sh
# Install dependencies if missing
[ -d "{baseDir}/scripts/node_modules" ] || npm install --prefix {baseDir}/scripts

node {baseDir}/scripts/validate.js <workflow.yml> [workflow2.yml ...]
```

The validator fetches the latest schema and checks the YAML structure. Fix any reported errors before considering the workflow complete.

## Answering Questions

When users ask about available options (job types, triggers, runner types, etc.), fetch the schema and derive the answer from it rather than relying on potentially outdated information.

Overview

This skill helps you understand, generate, and validate EAS workflow YAML files for Expo projects. It guides CI/CD design, checks syntax against the official EAS workflow JSON schema, and enforces correct job references and expressions. Use it to produce reliable .eas/workflows/*.yml files that work with EAS build and submit pipelines.

How this skill works

When you ask about a workflow, the skill fetches the authoritative JSON schema and official syntax docs to determine valid job types, triggers, runner images, and expression contexts. It inspects your YAML structure for required top-level keys, validates job parameters, verifies needs/after relationships, and checks expression references. The skill can generate starter workflows, propose edits, and provide the exact validation commands to run locally.

When to use it

  • You need a new EAS workflow for building, testing, or submitting an Expo app.
  • You want to validate or fix an existing .eas/workflows/*.yml file against the current schema.
  • You need to reference valid job types, triggers, or runner VM images.
  • You want help composing expressions using github.*, inputs.*, needs.*, or workflow.* contexts.
  • You’re automating releases and need guidance on job dependencies and concurrency.

Best practices

  • Always fetch the latest JSON schema before generating or validating workflows to avoid stale assumptions.
  • Keep workflows small and composable: prefer multiple focused jobs with explicit needs dependencies.
  • Use expression contexts (${ { }}) only with documented keys and validate outputs referenced by downstream jobs.
  • Place workflows in .eas/workflows/*.yml and validate YAML locally with the provided validator before pushing.
  • Limit long if expressions to the schema’s allowed length and test triggers with workflow_dispatch inputs where possible.

Example use cases

  • Generate a build-and-submit workflow that builds Android and iOS on separate jobs and submits artifacts.
  • Validate a modified workflow after adding a new pre-packaged job type or runner image.
  • Convert a manual CI step into an automated job that runs on push and tags using triggers.
  • Diagnose a failing job reference when a job listed in needs or after cannot be found.
  • Compose expressions that pass outputs from a build job to a deploy job using needs.* contexts.

FAQ

Do I have to trust cached schema data?

No. The skill fetches the schema and caches using ETags for efficiency but always revalidates when asked or when schema changes are detected.

Where must workflow files live?

Workflows belong in .eas/workflows/ and must be YAML files with .yml or .yaml extensions.