Agent SkillsAgent Skills
pstuart

fastlane

@pstuart/fastlane
pstuart
20
4 forks
Updated 5/5/2026
View on GitHub

Comprehensive guide to Fastlane automation for iOS and Android app deployment. Use when helping with mobile app releases, code signing, screenshots, TestFlight, App Store Connect, Google Play Store, beta distribution, CI/CD pipelines, or any Fastlane actions/lanes. Covers gym, match, pilot, deliver, supply, snapshot, screengrab, and 100+ other actions.

Installation

$npx agent-skills-cli install @pstuart/fastlane
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Repositorypstuart/pstuart
PathClaude/skills/fastlane/SKILL.md
Branchmain
Scoped Name@pstuart/fastlane

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

npx agent-skills-cli list

Skill Instructions


name: fastlane description: Comprehensive guide to Fastlane automation for iOS and Android app deployment. Use when helping with mobile app releases, code signing, screenshots, TestFlight, App Store Connect, Google Play Store, beta distribution, CI/CD pipelines, or any Fastlane actions/lanes. Covers gym, match, pilot, deliver, supply, snapshot, screengrab, and 100+ other actions.

Fastlane Deployment Skill

Fastlane automates iOS and Android app building, testing, and deployment. This skill provides action references, common workflows, and Fastfile patterns.

Quick Reference

Core Tools (Aliases)

ToolActionPurpose
gymbuild_appBuild and sign iOS/macOS apps
pilotupload_to_testflightUpload to TestFlight
deliverupload_to_app_storeUpload to App Store
supplyupload_to_play_storeUpload to Google Play
matchsync_code_signingSync certificates/profiles
certget_certificatesCreate iOS certificates
sighget_provisioning_profileGenerate provisioning profiles
snapshotcapture_ios_screenshotsiOS screenshots
screengrabcapture_android_screenshotsAndroid screenshots
producecreate_app_onlineCreate app on App Store Connect
pemget_push_certificatePush notification certificates
scanrun_testsRun iOS/macOS tests
precheckcheck_app_store_metadataValidate metadata before submission

Common Workflows

iOS TestFlight Deployment

lane :beta do
  app_store_connect_api_key(
    key_id: ENV["ASC_KEY_ID"],
    issuer_id: ENV["ASC_ISSUER_ID"],
    key_filepath: ENV["ASC_KEY_PATH"]
  )
  increment_build_number
  match(type: "appstore")
  build_app(scheme: "MyApp")
  upload_to_testflight
  slack(message: "Build uploaded to TestFlight!")
end

iOS App Store Release

lane :release do
  app_store_connect_api_key(...)
  capture_screenshots
  sync_code_signing(type: "appstore")
  build_app(scheme: "MyApp")
  upload_to_app_store(
    submit_for_review: true,
    automatic_release: true
  )
end

Android Play Store Deployment

lane :deploy do
  gradle(task: "clean assembleRelease")
  upload_to_play_store(
    track: "production",
    json_key: ENV["GOOGLE_PLAY_JSON_KEY"]
  )
end

Android Beta (Internal Testing)

lane :beta do
  gradle(task: "clean bundleRelease")
  upload_to_play_store(
    track: "internal",
    aab: "app/build/outputs/bundle/release/app-release.aab"
  )
end

Code Signing with Match

# Appfile
app_identifier("com.example.app")

# Matchfile
git_url("git@github.com:org/certificates.git")
storage_mode("git")
type("appstore")

# Usage in lane
lane :setup_signing do
  match(type: "development")  # Dev certs
  match(type: "appstore")     # Distribution certs
end

CI/CD Integration

GitHub Actions Environment

lane :ci_build do
  setup_ci  # Sets up keychain for CI
  match(type: "appstore", readonly: true)
  build_app(scheme: "MyApp")
end

Environment Variables

# App Store Connect API Key (recommended over password auth)
app_store_connect_api_key(
  key_id: ENV["ASC_KEY_ID"],
  issuer_id: ENV["ASC_ISSUER_ID"],
  key_content: ENV["ASC_KEY_CONTENT"],  # Base64 encoded .p8
  is_key_content_base64: true
)

# Google Play Service Account
upload_to_play_store(
  json_key_data: ENV["GOOGLE_PLAY_JSON_KEY"]
)

Detailed Action References

For complete action parameters and examples, see:

  • Building: references/building.md - gym, gradle, xcodebuild, cocoapods
  • Code Signing: references/code-signing.md - match, cert, sigh, notarize
  • App Store: references/app-store.md - deliver, pilot, produce, precheck
  • Google Play: references/google-play.md - supply, gradle actions
  • Screenshots: references/screenshots.md - snapshot, screengrab, frameit
  • Testing: references/testing.md - scan, slather, swiftlint
  • Utilities: references/utilities.md - notifications, source control, misc

Essential Commands

# Initialize fastlane
fastlane init

# List all actions
fastlane actions

# Get action details
fastlane action [action_name]

# Run a lane
bundle exec fastlane [lane_name]

# Run with verbose output
bundle exec fastlane [lane_name] --verbose

App Store Connect Restrictions

Metadata Character Limits

FieldMax LengthNotes
App Name30 charactersShown on App Store
Subtitle30 charactersBelow app name
Keywords100 charactersTotal including commas, no spaces after commas
Promotional Text170 charactersCan update without new build
Description4000 characters
What's New4000 charactersRelease notes

Screenshot Size Requirements

Device ClassResolutionRequired
iPhone 6.9" (16 Pro Max)1320×2868Yes
iPhone 6.7" (15 Pro Max)1290×2796Yes
iPhone 6.5" (11 Pro Max)1242×2688Yes
iPhone 5.5" (8 Plus)1242×2208Yes
iPad 12.9"2048×2732If iPad supported

Known Issue: Screenshots from Xcode 26 beta simulators (iPhone 17 series) may have resolutions not yet recognized by App Store Connect. Use iPhone 16 series simulators.

API Key Configuration

The App Store Connect API key must be properly formatted in JSON:

{
  "key_id": "YOUR_KEY_ID",
  "issuer_id": "YOUR_ISSUER_ID",
  "key": "-----BEGIN PRIVATE KEY-----\nLINE1...\nLINE2...\n-----END PRIVATE KEY-----",
  "duration": 1200,
  "in_house": false
}

Critical: The PEM key MUST have \n newline characters between lines. A single-line PEM causes OpenSSL::PKey::ECError: invalid curve name.

Common Errors and Solutions

ErrorCauseSolution
invalid curve nameAPI key PEM on single lineAdd \n between 64-char lines
Invalid screenshot sizeUnrecognized device resolutionUse supported device simulators
Keywords too longOver 100 characters totalTrim keywords, remove duplicates
Subtitle too longOver 30 charactersShorten subtitle
No data from fetch_app_store_review_detailKnown bug for new appsIgnore - metadata uploads successfully
validate_only not foundParameter renamedUse verify_only instead
Bundler version mismatchGemfile.lock version conflictUse fastlane directly instead of bundle exec fastlane

Fastfile Structure

# fastlane/Fastfile
default_platform(:ios)

platform :ios do
  before_all do
    # Runs before every lane
  end

  lane :test do
    run_tests(scheme: "MyApp")
  end

  lane :beta do
    # Beta deployment
  end

  after_all do |lane|
    # Runs after successful lane completion
  end

  error do |lane, exception|
    slack(
      message: "Error in #{lane}: #{exception.message}",
      success: false
    )
  end
end

platform :android do
  lane :deploy do
    gradle(task: "assembleRelease")
  end
end