Agent skill

Fly E2E Test

by cmpnd-ai in cmpnd-ai/dspy-cli

Deploy and test dspy-cli on Fly.io using local changes via temp git branch.

MITAuto-check: notesTesting & QA

Install Fly E2E Test

skills CLI
$ npx skills add cmpnd-ai/dspy-cli --skill fly-e2e-test -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cmpnd-ai/dspy-cli fly-e2e-test --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cmpnd-ai/dspy-cli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/fly-e2e-test .claude/skills/fly-e2e-test && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fly-e2e-test
GitHub stars
137
Token cost
~2.3k tokens
SKILL.md length
369 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Deploy and test dspy-cli on Fly.io using local changes via temp git branch.

  • Works in 8 steps: Setup Environment → Pre-flight Checks → Create and Push Temp Branch → …
  • Tasks that involve Integration testing
  • SKILL.md covers ⚠️ CRITICAL RULES, Prerequisites, Quick Start and Verification Checklist, plus 3 more sections
  • Calls fly, curl and git; needs OPENAI_API_KEY and DSPY_API_KEY

What it does

Fly E2E Test is an agent skill from cmpnd-ai/dspy-cli. Deploy and test dspy-cli on Fly.io using local changes via temp git branch. Full integration testing with guaranteed cleanup. (project)

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Integration testing, End-to-end testing and Git workflow. It works with Git. The repository describes itself as: dspy-cli is a tool for creating, developing, testing, and deploying DSPy programs as HTTP APIs. The licence is MIT.

When your agent uses it

  • Tasks that involve Integration testing
  • Tasks that involve End-to-end testing
  • Tasks that involve Git workflow

Example prompts

  • “/fly-e2e-test”

Requirements

  • A credential in OPENAI_API_KEY
  • A credential in DSPY_API_KEY
  • Pre-approved tools (allowed-tools): Bash

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Setup Environment
  2. Pre-flight Checks
  3. Create and Push Temp Branch
  4. Create Test Project
  5. Modify for Git-Based dspy-cli
  6. Create fly.toml and Deploy
  7. Run Integration Tests
  8. Guaranteed Cleanup

What it can do on your machine

Read from SKILL.md and the folder at commit c3b667e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • fly
    • curl
    • git
    • apt-get

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • OPENAI_API_KEY
    • DSPY_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fly E2E Test loads about 2.3k tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 369 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~37
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:21
    . **OPENAI_API_KEY**: In environment or `.env` file
  • NoteMentions a .env fileSKILL.md:42
    # Source .env for OPENAI_API_KEY
  • NoteMentions a .env fileSKILL.md:43
    x send-keys -t e2e-fly 'set -a && source .env && set +a' C-m
  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cmpnd-ai/dspy-cli at commit c3b667e, republished under its MIT licence (© cmpnd-ai). 369 words, ~2,304 tokens.

Download SKILL.mdSave it as .claude/skills/fly-e2e-test/SKILL.md (or your agent's skills folder).
name
fly-e2e-test
description
Deploy and test dspy-cli on Fly.io using local changes via temp git branch. Full integration testing with guaranteed cleanup. (project)
allowed-tools
Bash

Fly.io E2E Integration Test Skill

Deploy a fresh dspy-cli project to Fly.io using your local code changes, run full integration tests (health, auth, LLM execution), and guarantee cleanup regardless of success or failure.

⚠️ CRITICAL RULES

  1. NEVER commit directly to main - Always create a side branch first, even for small changes
  2. ALWAYS clean up - Destroy Fly apps and delete temp branches, even if tests fail
  3. Use temp branches - Name them e2e-test/{timestamp}-{random} for easy identification

Prerequisites

  1. fly CLI: Installed and authenticated (fly auth whoami)
  2. OPENAI_API_KEY: In environment or .env file
  3. Git: Clean working directory (stash uncommitted changes first)
  4. Git push access: Ability to push to origin

Quick Start

Run each phase in a tmux session to enable output capture and cleanup tracking.

Phase 1: Setup Environment
bash
# Create tmux session
tmux new-session -d -s e2e-fly -c /Users/isaac/projects/dspy-cli

# Set variables
tmux send-keys -t e2e-fly 'export DSPY_CLI_DIR="/Users/isaac/projects/dspy-cli"' C-m
tmux send-keys -t e2e-fly 'export TIMESTAMP=$(date +%s)' C-m
tmux send-keys -t e2e-fly 'export RANDOM_SUFFIX=$(head -c 4 /dev/urandom | xxd -p)' C-m
tmux send-keys -t e2e-fly 'export FLY_APP_NAME="dspy-e2e-${RANDOM_SUFFIX}"' C-m
tmux send-keys -t e2e-fly 'export TEMP_BRANCH="e2e-test/${TIMESTAMP}-${RANDOM_SUFFIX}"' C-m

# Source .env for OPENAI_API_KEY
tmux send-keys -t e2e-fly 'set -a && source .env && set +a' C-m

# Verify setup
tmux send-keys -t e2e-fly 'echo "App: $FLY_APP_NAME Branch: $TEMP_BRANCH"' C-m
Phase 2: Pre-flight Checks
bash
# Verify fly CLI
tmux send-keys -t e2e-fly 'fly version && fly auth whoami' C-m

# Check for uncommitted changes (stash if needed)
tmux send-keys -t e2e-fly 'git status --porcelain' C-m

# Clean up any orphaned e2e resources
tmux send-keys -t e2e-fly 'fly apps list 2>/dev/null | grep "dspy-e2e" || echo "No orphaned apps"' C-m
Phase 3: Create and Push Temp Branch
bash
tmux send-keys -t e2e-fly 'git checkout -b "$TEMP_BRANCH"' C-m
tmux send-keys -t e2e-fly 'git push -u origin "$TEMP_BRANCH"' C-m
Phase 4: Create Test Project
bash
# Create temp directory
tmux send-keys -t e2e-fly 'export TEST_DIR=$(mktemp -d) && echo "TEST_DIR=$TEST_DIR"' C-m

# Create project (will prompt for API key confirmation - send Y)
tmux send-keys -t e2e-fly 'uv run --directory "$DSPY_CLI_DIR" dspy-cli new fly-e2e-test --program-name qa_module --signature "question:str -> answer:str" --module-type Predict --model openai/gpt-4o-mini' C-m

# When prompted "Proceed with this API key? [Y/n]:", send:
tmux send-keys -t e2e-fly 'Y' C-m

# Move project to temp dir (dspy-cli creates in current dir)
tmux send-keys -t e2e-fly 'mv "$DSPY_CLI_DIR/fly-e2e-test" "$TEST_DIR/" && cd "$TEST_DIR/fly-e2e-test"' C-m
Phase 5: Modify for Git-Based dspy-cli
bash
# Update pyproject.toml to install dspy-cli from temp branch
tmux send-keys -t e2e-fly 'sed -i.bak "s|\"dspy-cli\"|\"dspy-cli @ git+https://github.com/cmpnd-ai/dspy-cli.git@$TEMP_BRANCH\"|" pyproject.toml' C-m

# IMPORTANT: Update Dockerfile to include git (required for git-based deps)
# NOTE: This is an example dockerfile. There may be specific changes in a newer version of dspy-cli. Check the current Dockerfile and add the Git install line
tmux send-keys -t e2e-fly 'cat > Dockerfile << '"'"'EOF'"'"'
FROM python:3.11-slim

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV XDG_CACHE_HOME=/tmp/.cache

# Install git for fetching dspy-cli from git URL
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*

COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv

COPY . .
RUN uv sync --no-dev

EXPOSE 8000

CMD ["uv", "run", "dspy-cli", "serve", "--host", "0.0.0.0", "--port", "8000", "--auth", "--no-reload"]
EOF' C-m
Phase 6: Create fly.toml and Deploy
bash
# Create fly.toml
tmux send-keys -t e2e-fly 'cat > fly.toml << EOF
app = '"'"'$FLY_APP_NAME'"'"'
primary_region = '"'"'ewr'"'"'

[build]

[http_service]
  internal_port = 8000
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0
  processes = ['"'"'app'"'"']

[[vm]]
  memory = '"'"'512mb'"'"'
  cpu_kind = '"'"'shared'"'"'
  cpus = 1
EOF' C-m

# Create app
tmux send-keys -t e2e-fly 'fly apps create "$FLY_APP_NAME" --org personal' C-m

# Generate a random API key for testing
tmux send-keys -t e2e-fly 'export DSPY_API_KEY_VALUE="test-e2e-$(head -c 8 /dev/urandom | xxd -p)"' C-m

# Set secrets using fly secrets (required env vars for your app)
# Add any additional env vars your project needs here
tmux send-keys -t e2e-fly 'fly secrets set OPENAI_API_KEY="$OPENAI_API_KEY" DSPY_API_KEY="$DSPY_API_KEY_VALUE" --app "$FLY_APP_NAME"' C-m

# Deploy (takes ~2-3 minutes)
tmux send-keys -t e2e-fly 'fly deploy --app "$FLY_APP_NAME" --wait-timeout 300' C-m
Phase 7: Run Integration Tests
bash
tmux send-keys -t e2e-fly 'export FLY_APP_URL="https://$FLY_APP_NAME.fly.dev"' C-m

# Test 1: Health Check
tmux send-keys -t e2e-fly 'echo "=== Test 1: Health Check ===" && curl -s "$FLY_APP_URL/health"' C-m
# Expected: {"status":"ok"}

# Test 2: Auth Redirect (unauthenticated)
tmux send-keys -t e2e-fly 'echo "=== Test 2: Auth Redirect ===" && curl -s -o /dev/null -w "HTTP: %{http_code}\n" "$FLY_APP_URL/programs"' C-m
# Expected: HTTP: 303

# Test 3: Auth Success (authenticated)
tmux send-keys -t e2e-fly 'echo "=== Test 3: Auth Success ===" && curl -s -H "Authorization: Bearer $DSPY_API_KEY_VALUE" "$FLY_APP_URL/programs"' C-m
# Expected: {"programs":[{"name":"QaModulePredict",...}]}

# Test 4: LLM Module Execution
tmux send-keys -t e2e-fly 'echo "=== Test 4: LLM Execution ===" && curl -s -X POST -H "Authorization: Bearer $DSPY_API_KEY_VALUE" -H "Content-Type: application/json" -d '"'"'{"question": "What is 2+2?"}'"'"' "$FLY_APP_URL/QaModulePredict"' C-m
# Expected: {"answer":"4"} (or similar)
Phase 8: Guaranteed Cleanup

ALWAYS run cleanup, even if tests fail:

bash
# Destroy Fly app
tmux send-keys -t e2e-fly 'fly apps destroy "$FLY_APP_NAME" --yes' C-m

# Delete remote branch
tmux send-keys -t e2e-fly 'git -C "$DSPY_CLI_DIR" push origin --delete "$TEMP_BRANCH"' C-m

# Return to main and delete local branch
tmux send-keys -t e2e-fly 'git -C "$DSPY_CLI_DIR" checkout main' C-m
tmux send-keys -t e2e-fly 'git -C "$DSPY_CLI_DIR" branch -D "$TEMP_BRANCH"' C-m

# Remove temp directory
tmux send-keys -t e2e-fly 'rm -rf "$TEST_DIR"' C-m

# Kill tmux session
tmux kill-session -t e2e-fly

Verification Checklist

TestExpected Result
Health Check{"status":"ok"}
Auth Redirect (no auth)HTTP 303
Auth Success (Bearer token)JSON with QaModulePredict
LLM ExecutionJSON with "answer" field

Cleanup Verification

After running cleanup, verify:

bash
# No orphaned Fly apps
fly apps list | grep "dspy-e2e" || echo "Clean"

# No orphaned branches
git branch -r | grep "e2e-test/" || echo "Clean"

Troubleshooting

Deploy fails with "Git executable not found"

The Dockerfile must include git installation. Ensure the Dockerfile has:

dockerfile
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
Show full SKILL.md (143 more words)Show less
pyproject.toml sed command doesn't expand variables

Use double quotes for the sed command, not single quotes:

bash
sed -i.bak "s|...|...@$TEMP_BRANCH\"|" pyproject.toml  # Correct
sed -i.bak 's|...|...|' pyproject.toml  # Won't expand $TEMP_BRANCH
Project created in wrong directory

dspy-cli new creates projects relative to the current working directory, not where it's run from. Move the project after creation:

bash
mv "$DSPY_CLI_DIR/fly-e2e-test" "$TEST_DIR/"
Cleanup fails

If any cleanup step fails, run them individually:

bash
fly apps destroy "dspy-e2e-XXXX" --yes
git push origin --delete "e2e-test/XXXX"
git checkout main
git branch -D "e2e-test/XXXX"
App crashes due to missing environment variables

Use fly secrets to set any required env vars. Check the app logs to see which vars are missing:

bash
# View logs to find missing env vars
fly logs --app "$FLY_APP_NAME" --no-tail

# Set additional secrets as needed
fly secrets set VAR_NAME="value" ANOTHER_VAR="value" --app "$FLY_APP_NAME"

# List current secrets
fly secrets list --app "$FLY_APP_NAME"

Common env vars that might be needed:

  • OPENAI_API_KEY - Required for OpenAI models
  • DSPY_API_KEY - Required when --auth is enabled
  • Project-specific vars (check your gateway's setup() method)

Multi-Layer Cleanup Protection

  1. Unique naming: dspy-e2e-{random} prevents conflicts
  2. Pre-test orphan cleanup: Removes stale resources before starting
  3. tmux session: Enables output capture and manual recovery
  4. Explicit cleanup phase: Always runs after tests
  5. Verification commands: Confirm cleanup succeeded

© cmpnd-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/fly-e2e-test of cmpnd-ai/dspy-cli.

Open the folder on GitHubat commit c3b667e

Compare with similar skills

Fly E2E Test next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fly E2E Test compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fly E2E Test this skillcmpnd-ai/dspy-cli137—~2.3kAutomated safety check: NotesMIT
OpenHarness End-to-End EvalsHKUDS/OpenHarness16k1 repos~2.1kAutomated safety check: NotesMIT
Workflow Regression Testspurefunctor/purescript-iris117—~1.8kAutomated safety check: PassCustom licence
Command Test Conventionsruby-git/ruby-git1.8k—~7.8kAutomated safety check: PassMIT
E2E Testinglangflow-ai/langflow156k—~3.3kAutomated safety check: PassMIT
MongoDB Source Connector E2E Harnessairbytehq/airbyte22k—~1.9kAutomated safety check: PassCustom licence

Similar skills

  • Validates OpenHarness features by running real multi-turn agent loops with live LLM calls against an unfamiliar codebase, checking actual tool execution.

    16k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check: notes
  • Workflow Regression Tests

    purefunctor/purescript-iris

    Workflow for producing auditable Git or jj history for a known compiler bug fix.

    117 GitHub stars~1.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Command Test Conventions

    ruby-git/ruby-git

    Conventions for writing and reviewing unit and integration tests for Git::Commands:: classes.

    1.8k GitHub stars~7.8k tokensUpdated 6 days ago
    Testing & QAAuto-check passed
  • E2E Testing

    langflow-ai/langflow

    Write and review Playwright E2E tests for Langflow. An agent skill from langflow-ai/langflow.

    156k GitHub stars~3.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Official

    Starts a throwaway MongoDB 7.0 replica set and runs the Airbyte spec, check, discover and read commands against source-mongodb-v2 images for local end-to-end testing.

    22k GitHub stars~1.9k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Official

    Creates a Java SDK end-to-end test for the Copilot SDK that runs against a recorded YAML snapshot through a replay proxy, so CI needs no real authentication.

    11k GitHub stars~1.8k tokensUpdated today
    Testing & QAAuto-check passed

More from cmpnd-ai/dspy-cli

  • Tmux

    cmpnd-ai/dspy-cli

    Instructions for using tmux to spawn multiple processes, inspect them, and capture their output.

    137 GitHub stars~611 tokensUpdated 7 mo ago
    Auto-check: notes

Works with

Categories

Questions about Fly E2E Test

What does Fly E2E Test do?

Deploy and test dspy-cli on Fly.io using local changes via temp git branch. Fly E2E Test is an agent skill from cmpnd-ai/dspy-cli.io using local changes via temp git branch.

When should I use Fly E2E Test?

Fly E2E Test fits situations like: tasks that involve Integration testing; tasks that involve End-to-end testing; tasks that involve Git workflow.

How do I install Fly E2E Test in Claude Code?

Run `npx skills add cmpnd-ai/dspy-cli --skill fly-e2e-test -a claude-code`. Or copy the skill folder (.claude/skills/fly-e2e-test in cmpnd-ai/dspy-cli) into .claude/skills/fly-e2e-test in your project. Claude Code loads it when a task matches its description.

How do I install Fly E2E Test in Codex?

Run `npx skills add cmpnd-ai/dspy-cli --skill fly-e2e-test -a codex`. Or copy the skill folder (.claude/skills/fly-e2e-test in cmpnd-ai/dspy-cli) into .agents/skills/fly-e2e-test in your project. Codex loads it when a task matches its description.

Can I use Fly E2E Test in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cmpnd-ai/dspy-cli --skill fly-e2e-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fly-e2e-test, .gemini/skills/fly-e2e-test, .github/skills/fly-e2e-test and .opencode/skills/fly-e2e-test in your project.

What does Fly E2E Test need to run?

Going by SKILL.md and its folder, Fly E2E Test needs the command-line tools its instructions call (fly, curl, git and apt-get) and credentials named OPENAI_API_KEY and DSPY_API_KEY. Our summary lists: A credential in OPENAI_API_KEY; A credential in DSPY_API_KEY. Its frontmatter pre-approves these tools: Bash.

Does Fly E2E Test access the network?

SKILL.md contains no URLs. Its commands use curl and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Fly E2E Test safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file; pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Fly E2E Test use?

Fly E2E Test is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fly E2E Test use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Fly E2E Test?

Skills that share tags, products or a category with Fly E2E Test: OpenHarness End-to-End Evals (HKUDS/OpenHarness, 16k stars), Workflow Regression Tests (purefunctor/purescript-iris, 117 stars), Command Test Conventions (ruby-git/ruby-git, 1.8k stars) and E2E Testing (langflow-ai/langflow, 156k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fly E2E Test?

cmpnd-ai (a GitHub organization) maintains it in cmpnd-ai/dspy-cli, which has 137 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on March 3, 2026.

Source: cmpnd-ai/dspy-cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.