skills/release-flutter-web-s3/SKILL.md
Prepare, build, and publish a Flutter Web app to S3-compatible object storage. Use when Codex needs to bump or update pubspec.yaml version, create a Flutter Web release tag, configure S3 deployment, build build/web, upload or promote web assets, or inspect a Flutter Web S3 release workflow.
npx skillsauth add hu-wentao/wyatt_skills release-flutter-web-s3Install this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill from the root of a Flutter application repository that publishes its Web build to AWS S3 or an S3-compatible object storage provider such as Cloudflare R2, MinIO, Tigris, Backblaze B2, or DigitalOcean Spaces.
Default assumptions:
pubspec.yamlbuild/webscripts/release_web_s3.pyscripts/prepare_web_release.pydeploy/s3.env, ignored by gitweb-v<pubspec version>uv for Python helpers, fvm when the project uses FVMFINGERPRINT_WEB_BUILD=1Adapt these defaults to the target project before publishing. Do not assume the project has Slang, a specific GitHub Actions workflow, or a specific object storage provider.
Do not print secret values from deploy/s3.env or GitHub secrets. Any compatibility switch such as BUILD_WASM, FINGERPRINT_WEB_BUILD, S3_ADDRESSING_STYLE, AWS_REQUEST_CHECKSUM_CALCULATION, AWS_RESPONSE_CHECKSUM_VALIDATION, or ALLOW_DIRTY must be explicitly called out before use because these can hide provider or runtime differences.
Use scripts/release_web_s3.py as the only release entry point.
--project-root: manually specify the Flutter project root; by default the script auto-detects it from git or pubspec.yaml--pubspec: override the pubspec.yaml path relative to the project root--tag-match: specify the git tag glob used to locate the previous Web release; default web-v*--tag-prefix: specify the git tag prefix for the new release; default web-v--version: explicitly set the release version and bypass the suggested version--bump {major|minor|patch}: override the detected semantic version bump--dry-run: print planned file, git, build, and S3 actions without making changes--skip-tests: skip the Flutter test step during validation--no-tag: do not create the git release tag after publishing--no-push: do not push the git release tag to remote--yes / -y: non-interactive mode; fail instead of prompting for confirmation--promote <release-id>: skip version/build flow and promote an existing immutable release to the live prefixThe script handles the whole fixed flow automatically:
Preflight
fvm / flutter / dartdeploy/s3.env existsVersion
pubspec.yamlValidate
flutter pub getbuild_runner if neededslang if needed--skip-testsPublish
build/web/version.jsonPromote
Create deploy/s3.env.example with non-secret placeholders, then create a local deploy/s3.env from it and ensure deploy/s3.env is git-ignored.
Example:
S3_ENDPOINT_URL=https://s3.example.com
S3_BUCKET=my-bucket
S3_REGION=auto
S3_LIVE_PREFIX=web
S3_RELEASE_PREFIX=web/releases
BASE_HREF=/
PWA_STRATEGY=none
# AWS_PROFILE=my-profile
Required runtime configuration:
S3_ENDPOINT_URL: provider endpoint URLS3_BUCKET: target bucketAWS_PROFILE, CI secrets, or the provider's supported AWS CLI mechanismaws configure --profile <new-profile-name> and setting AWS_PROFILE=<profile>Optional project configuration:
S3_REGION: region passed to AWS CLI; default autoS3_LIVE_PREFIX: live object prefix; default webS3_RELEASE_PREFIX: immutable release prefix; default web/releasesBASE_HREF: passed to flutter build web --base-hrefPWA_STRATEGY: passed to flutter build web --pwa-strategyBUILD_WEB_DIR: override when the web output is not build/webBUILD_WASM=1: add --wasm, only after browser/runtime compatibility is verifiedFINGERPRINT_WEB_BUILD=1: rewrite cacheable web artifacts to content-hashed paths and emit build/web_fingerprint_manifest.jsonFLUTTER_CMD, DART_CMD: override command discovery for non-standard projectsPRE_BUILD_CMD, BUILD_RUNNER_CMD, SLANG_CMD, TEST_CMD: override build/test/codegen commandsRELEASE_CACHE_CONTROL, LIVE_CACHE_CONTROL, LIVE_STATIC_CACHE_CONTROL, LIVE_HASHED_CACHE_CONTROL: customize cache headers for uploaded assetsWhen FINGERPRINT_WEB_BUILD=1, the skill fingerprints cacheable build artifacts and rewrites references across the Flutter Web output so the live prefix can safely serve:
Current stable entrypoints:
index.htmlflutter.jsflutter_service_worker.jsassets/AssetManifest.binassets/NOTICESCurrent hashed targets include:
flutter_bootstrap.jsmanifest.jsonfavicon.pngversion.jsonmain.dart.jsmain.dart.mjsmain.dart.wasmicons/**assets/** except the stable files listed abovecanvaskit/** as one hashed directory prefixThe fingerprint pass also emits build/web_fingerprint_manifest.json. The release script uses this manifest to split live uploads into:
LIVE_CACHE_CONTROL for stable filesLIVE_HASHED_CACHE_CONTROL for hashed filesRecommended live cache policy when fingerprinting is enabled:
LIVE_CACHE_CONTROL=no-cache, no-store, must-revalidate
LIVE_HASHED_CACHE_CONTROL=public,max-age=31536000,immutable
The fingerprint helper is intentionally coupled to current Flutter Web build structure. Before sharing this skill across projects, assume it needs review whenever Flutter changes its web output conventions.
This skill currently expects all of the following to exist in build/web after flutter build web:
index.htmlflutter_bootstrap.jsmain.dart.jsmain.dart.mjsmain.dart.wasmmanifest.jsonassets/AssetManifest.bin.jsonassets/FontManifest.jsoncanvaskit/If a target project uses a different Flutter version or custom post-processing that changes these filenames or removes these files, re-verify the skill before reuse.
This skill does not inject application-level migration logic into shared projects. If a project needs one-time cleanup for old service workers or legacy browser caches, keep that logic in the project repo, not in the shared skill.
If you only need to inspect or write the version without running the full release flow, use prepare_web_release.py directly.
It can:
pubspec.yamlpubspec.yamlS3_RELEASE_PREFIX as a sub-path of S3_LIVE_PREFIXWhen S3_RELEASE_PREFIX is a child path of S3_LIVE_PREFIX (for example LIVE_PREFIX=web, RELEASE_PREFIX=web/releases), a naive live sync can accidentally delete immutable releases.
Symptom: after publishing, older immutable releases under web/releases/<version>/ are missing their files.
Fix: release_web_s3.py explicitly excludes releases/** during live sync and live refresh operations. The script also warns when it detects nested prefix configuration.
The fingerprint helper rewrites generated Flutter artifacts, not source templates. A Flutter SDK upgrade can change:
After upgrading Flutter in any project that uses this skill, rebuild once and run the fingerprint verifier before publishing.
For a shared-skill smoke test after flutter build web, run:
uv run python .agents/skills/release-flutter-web-s3/scripts/fingerprint_web_build.py build/web --manifest-out build/web_fingerprint_manifest.json
uv run python .agents/skills/release-flutter-web-s3/scripts/verify_fingerprint_web_build.py build/web --manifest build/web_fingerprint_manifest.json
release_web_s3.py: main release entry point; handles versioning, validation, upload, publish, and promotefingerprint_web_build.py: fingerprint cacheable Flutter Web output files and rewrite internal referencesverify_fingerprint_web_build.py: verify that a fingerprinted Flutter Web build is internally consistentprepare_web_release.py: inspect commits since the latest web-v* tag, suggest a SemVer version, generate web-v<version>, draft release notes, and optionally update pubspec.yamlreferences/awscli-setup.md: local setup guide for installing AWS CLI, obtaining ak/sk, creating a named profile, and using that profile with release_web_s3.pydevelopment
Build, debug, and refactor Streamlit apps and widgets. Use when Codex works on Streamlit UI files, session_state behavior, rerun/callback bugs, st.data_editor or dataframe widgets, layout parameters, widget keys, Streamlit version compatibility, or deprecated/new parameters such as width="stretch" replacing older container-width patterns.
development
Create a Dart-based macOS background activity process managed by launchd. Use when Codex needs to scaffold or fix a LaunchAgent for a Dart program, generate the executable entrypoint, write the plist, or ensure App Background Activity shows the intended process name instead of a shell wrapper.
development
Merge a specified branch into the current branch with a merge commit. Use this when the user wants to merge one branch into the current branch, or when Codex should auto-detect the source branch that has commits after the current branch. The skill checks whether the source branch and target branch have uncommitted work in any active git worktree, and resolves merge conflicts autonomously by default.
documentation
Automates the Flutter package release process via git tags and GitHub Actions. Handles multi-package workspaces, SemVer versioning suggestions based on git history, updating pubspec.yaml and CHANGELOG.md, and dry-run validation. Use when the user wants to "release", "publish", or "version" a Flutter package.