Installation

Install as Agent Plugin Recommended
copilot plugin marketplace add samueltauil/skills-hub
copilot plugin install eas-workflows@skills-hub

Works with GitHub Copilot CLI and VS Code (enable chat.plugins.enabled). Plugin eas-workflows v1.0.0 follows the Agent Plugins spec.

Install with the gh extension
gh skills-hub install eas-workflows

Don't have the extension? Run gh extension install samueltauil/skills-hub first.

Download and extract to your repository:

.github/skills/eas-workflows/

Extract the ZIP to .github/skills/ in your repo. The folder name must match eas-workflows for Copilot to auto-discover it.

Skill Files (4)

SKILL.md 4.9 KB
---
name: eas-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:*),Bash(npx *eas-cli@*),Bash(npx --yes @expo/agent-cli@latest *)"
license: MIT License
---

# EAS Workflows Skill

> **EAS service - costs apply.** EAS Workflows run on Expo Application Services, a paid product with free-tier limits. Each workflow job consumes your plan's build/compute minutes, and jobs that build or submit also need paid Apple Developer and Google Play accounts. Review https://expo.dev/pricing before triggering runs.

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

## Reference Documentation

Fetch these resources before generating or editing workflow files, or when answering syntax questions. First resolve this skill's directory, then use the fetch script in its `scripts/` directory. It is implemented using Node.js and caches responses using ETags for efficiency:

```bash
# Fetch resources
node <skill-dir>/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 the workflow YAML structure; EAS CLI remains the authoritative final validator
   - 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`). Each file must be 16 KiB or smaller.

## 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 with EAS CLI from the Expo project root:

```sh
npx --yes eas-cli@latest workflow:validate .eas/workflows/<workflow.yml> --non-interactive
```

Run the command separately for each changed workflow file. It requires a logged-in EAS CLI session and a linked Expo project. Unlike schema-only validation, it also checks build profile references against the project's `eas.json` and performs EAS server-side validation. Fix every reported error and rerun the command until it prints `Workflow configuration YAML is valid.` Do not replace this command with a local YAML or JSON Schema validator.

## 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.

## Submitting Feedback
If this skill has an error, or misleading or outdated information, tell the user and offer to report it to Expo. A report is optional, and the user decides. Do not send a report before the user agrees.
The `feedback` command of the agent CLI sends a report. Its `--help` lists the categories (`skills` with the subject "eas-workflows", `agent-cli` for a problem with the agent CLI, `evals` when an agent repeatedly fails at an Expo task) and the data that a report sends. Show the user the message, and tell the user that the report also carries project and environment details. If you cannot ask the user, put the command with your message in your final summary, so the user can send it. Do not include secrets or personal data.
agents/
openai.yaml 0.3 KB
interface:
  display_name: "EAS Workflows"
  short_description: "Write and validate EAS workflow YAML files for Expo projects"
  default_prompt: "Use $eas-workflows when creating or editing .eas/workflows YAML, validating EAS workflow configuration, or answering questions about workflow triggers, jobs, runners, and expressions."
scripts/
fetch.js 2.9 KB
#!/usr/bin/env node

import { createHash } from 'node:crypto';
import { readFile, writeFile, mkdir } from 'node:fs/promises';
import { resolve } from 'node:path';
import process from 'node:process';

const CACHE_DIRECTORY = resolve(import.meta.dirname, '.cache');
const DEFAULT_TTL_SECONDS = 15 * 60; // 15 minutes

export async function fetchCached(url) {
  await mkdir(CACHE_DIRECTORY, { recursive: true });

  const cacheFile = resolve(CACHE_DIRECTORY, hashUrl(url) + '.json');
  const cached = await loadCacheEntry(cacheFile);
  if (cached && cached.expires > Math.floor(Date.now() / 1000)) {
    return cached.data;
  }

  // Make request, with conditional If-None-Match if we have an ETag.
  // Cache-Control: max-age=0 overrides Node's default 'no-cache' to allow 304 responses.
  const response = await fetch(url, {
    headers: {
      'Cache-Control': 'max-age=0',
      ...(cached?.etag && { 'If-None-Match': cached.etag }),
    },
  });

  if (response.status === 304 && cached) {
    // Refresh expiration and return cached data
    const entry = { ...cached, expires: getExpires(response.headers) };
    await saveCacheEntry(cacheFile, entry);
    return cached.data;
  }

  if (!response.ok) {
    throw new Error(`HTTP ${response.status}: ${response.statusText}`);
  }

  const etag = response.headers.get('etag');
  const data = await response.text();
  const expires = getExpires(response.headers);

  await saveCacheEntry(cacheFile, { url, etag, expires, data });

  return data;
}

function hashUrl(url) {
  return createHash('sha256').update(url).digest('hex').slice(0, 16);
}

async function loadCacheEntry(cacheFile) {
  try {
    return JSON.parse(await readFile(cacheFile, 'utf-8'));
  } catch {
    return null;
  }
}

async function saveCacheEntry(cacheFile, entry) {
  await writeFile(cacheFile, JSON.stringify(entry, null, 2));
}

function getExpires(headers) {
  const now = Math.floor(Date.now() / 1000);

  // Prefer Cache-Control: max-age
  const maxAgeSeconds = parseMaxAge(headers.get('cache-control'));
  if (maxAgeSeconds != null) {
    return now + maxAgeSeconds;
  }

  // Fall back to Expires header
  const expires = headers.get('expires');
  if (expires) {
    const expiresTime = Date.parse(expires);
    if (!Number.isNaN(expiresTime)) {
      return Math.floor(expiresTime / 1000);
    }
  }

  // Default TTL
  return now + DEFAULT_TTL_SECONDS;
}

function parseMaxAge(cacheControl) {
  if (!cacheControl) {
    return null;
  }
  const match = cacheControl.match(/max-age=(\d+)/i);
  return match ? parseInt(match[1], 10) : null;
}

if (import.meta.main) {
  const url = process.argv[2];

  if (!url || url === '--help' || url === '-h') {
    console.log(`Usage: fetch <url>

Fetches a URL with HTTP caching (ETags + Cache-Control/Expires).
Default TTL: ${DEFAULT_TTL_SECONDS / 60} minutes.
Cache is stored in: ${CACHE_DIRECTORY}/`);
    process.exit(url ? 0 : 1);
  }

  const data = await fetchCached(url);
  console.log(data);
}
package.json 0.1 KB
{
  "name": "@expo/eas-workflows-skill",
  "version": "0.0.0",
  "private": true,
  "type": "module"
}

License (MIT)

View full license text
The MIT License (MIT)

Copyright (c) 2025-present 650 Industries, Inc. (aka Expo)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.