Flutter deploy

From tinh2/skills-hub-registry · View interactive version

Flutter deploy is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Build and deploy Flutter apps to App Store (TestFlight) and Google Play (internal/production). Auto-detects project structure, pulls signing secrets from AWS Secrets Manager, installs certificates, bumps build numbers, and runs Fastlane. Fully autonomous.

How to use this skill

Skill file

You are an autonomous Flutter deployment agent. Do NOT ask questions. Detect, build, sign, upload.

TARGET:

$ARGUMENTS

If no arguments: deploy all Flutter apps found in the working directory to both platforms on testflight/internal track.

Arguments: [app-name] [ios|android|both] [testflight|production]

============================================================

PHASE 0: PROJECT DISCOVERY

============================================================

Find all Flutter projects:

  1. Search for pubspec.yaml files in the current directory and immediate subdirectories
  2. For each, check if android/ and ios/ directories exist
  3. Check for existing Fastlane configs (fastlane/Fastfile)
  4. Check for signing configs:

Build an app inventory:

| App | Root | Bundle ID (Android) | Bundle ID (iOS) | Fastlane | Signing |

|-----|------|---------------------|-----------------|----------|---------|

============================================================

PHASE 1: SIGNING SETUP

============================================================

For iOS deployment, ensure signing is configured:

  1. Check for valid signing identity: security find-identity -v -p codesigning
  2. If no valid identity found, check for a setup script or AWS secret:

```bash

aws secretsmanager get-secret-value --secret-id "deploy/app-store-keys" --query SecretString --output text

```

  1. For Android, verify keystore exists at the path specified in key.properties

If signing cannot be resolved, skip that platform and report the blocker.

============================================================

PHASE 2: BUILD

============================================================

For each app and platform:

ANDROID:

cd <app_root>
flutter build appbundle --release --build-number=$(date +%s)

iOS:

  1. Bump build number in ios/Flutter/Generated.xcconfig:

```bash

BUILD_NUM=$(date +%s)

sed -i '' "s/FLUTTER_BUILD_NUMBER=.*/FLUTTER_BUILD_NUMBER=$BUILD_NUM/" ios/Flutter/Generated.xcconfig

```

  1. If Fastlane is configured: cd <fastlane_dir> && fastlane ios upload
  2. If no Fastlane: use flutter build ipa --release then xcrun altool --upload-app

Run builds for different apps in parallel using the Agent tool.

iOS and Android for the SAME app can also run in parallel.

============================================================

PHASE 3: UPLOAD

============================================================

ANDROID (if not already uploaded by Fastlane):

iOS:

```bash

xcrun altool --upload-app -f <ipa_path> --type ios \

--apiKey <key_id> --apiIssuer <issuer_id>

```

============================================================

PHASE 4: VERIFY & REPORT

============================================================

After all uploads complete:

  1. Check for failed builds or uploads
  2. Collect build numbers and version info
  3. Report results:

Deploy Report

| App | Platform | Track | Status | Build Number | Version | Notes |

|-----|----------|-------|--------|-------------|---------|-------|

Artifacts

Next Steps

============================================================

SELF-HEALING VALIDATION (max 1 retry per step)

============================================================

If any build or upload fails:

  1. Read the full error output
  2. Diagnose common issues:
  1. Retry the failed step ONCE
  2. If retry fails, mark as failed and continue with remaining apps

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /flutter-deploy — {YYYY-MM-DD}
- Outcome: {SUCCESS | PARTIAL | FAILED}
- Self-healed: {yes — what was healed | no}
- Apps deployed: {list}
- Platforms: {ios | android | both}
- Bottleneck: {phase that struggled or "none"}
- Suggestion: {one-line improvement idea for /evolve, or "none"}

============================================================

DO NOT

============================================================

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.