flame-harness-admob
Phase 7 — analyze the game, decide a rewarded-ad strategy, guide manual AdMob ad-unit creation, and inject google_mobile_ads + ATT/UMP consent code.
Phase 4 — propose verifiable completion criteria and mandatory hard gates; reach AGREED (1-pass default, multi-round negotiation in --strict).
$ npx -y skills add tjdrhs90/flutter-flame-harness --skill flame-harness-contract --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/flame-harness-contractContext preview
The summary Claude sees to decide when to auto-load this skill.
Phase 4 — propose verifiable completion criteria and mandatory hard gates; reach AGREED (1-pass default, multi-round negotiation in --strict).
name: flame-harness-contract description: Phase 4 — propose verifiable completion criteria and mandatory hard gates; reach AGREED (1-pass default, multi-round negotiation in --strict). argument-hint: "" allowed-tools: [Agent, Read, Write, Edit, Bash]
Phase 4 of the flutter-flame-harness pipeline. Reads the PRD and design doc, proposes verifiable completion criteria (Mandatory Hard Gates + Functional Criteria), and marks the contract AGREED before handing off to the generator.
All file schemas (`config.md`, `state.md`, `contract.md`) are defined in `docs/harness-protocol.md` — refer to that document as the single source of truth. Do not redefine schemas here.
---
Extract:
| Key | Use | |---|---| | `app_name` | Contract title header | | `app_slug` | Used to identify the game | | `strict_mode` | If `true`, run `--strict` negotiation; if `false` (or absent), run default 1-pass |
Find the most recent file matching `docs/harness/plans/*-prd.md` (sort by filename descending, take the first). Abort with a clear message if none exists.
Find the most recent file matching `docs/harness/plans/*-design.md` (sort by filename descending, take the first). Abort if none exists.
---
These 8 criteria are non-negotiable and must appear verbatim in every `contract.md`. A FAIL on any one results in an immediate FAIL verdict, regardless of other passing criteria.
> **Source:** `docs/harness-protocol.md` §3 — Mandatory Hard Gates block. Always cite; never > restate differently.
1. `flutter analyze` returns zero issues. 2. `flutter test` — all tests pass. 3. No TODO, stub, or placeholder in game logic (grep-checkable). 4. All tuning constants centralized in `game_config.dart` — no magic numbers in gameplay code. 5. Game content (enemies / levels / waves) is defined as data, not hardcoded. 6. Localization complete for all configured locales — `default_language`, plus English when `default_language` ≠ `en` — no missing l10n keys. 7. Core loop works end to end: start → play → win/lose → restart. 8. Runs on a simulator/emulator with zero crashes and zero console errors.
Copy these 8 lines verbatim into the `## Mandatory Hard Gates` section of `contract.md`. Do not paraphrase, reorder, or omit any gate.
In addition to the 8 core gates above, every contract includes a `## Platform-Robustness Gates` section requiring the patterns in `docs/game-gotchas.md` (cite it). These are mandatory:
`AudioPool` (not per-call `FlameAudio.play()`); BGM stops on game-over, app-background, and teardown.
`enabled` toggle + try/catch; gameplay never calls `HapticFeedback.*` raw.
BGM pause; resume reverses; teardown cleans up audio/timers.
frame); `Paint`/shaders not recreated per frame.
is opaque (no alpha), and the localized app display name (`CFBundleDisplayName`/`android:label`) is set to `app_name` — not "Runner"/the slug.
orientation removed — no launch rotate); iPhone-only (`TARGETED_DEVICE_FAMILY = 1`, no iPad); `ITSAppUsesNonExemptEncryption = false`; root back-button = SnackBar double-press-to-exit; bundle id **byte-identical** across iOS (`PRODUCT_BUNDLE_IDENTIFIER`) and Android (`applicationId`) == `config.bundle_id` (lowercase, no `_`/`-`).
cleaned sprites) and **no missing-asset references** (every `pubspec.yaml` asset exists); a `.github/workflows` CI (analyze + test) is present.
**feature graphic (1024×500)** placed for `supply` (`metadata/android/<locale>/images/icon.png` + `featureGraphic.png`); iOS has localized screenshots.
alone) — a `SaveRepository` mirrors the save blob to iOS Keychain (`flutter_secure_storage`, `first_unlock`) + Android Block Store (`play_services_block_store`) + a `shared_preferences` cache, reading durable-first and writing all tiers in try/catch; `PreferencesService` routes through it.
safety); OS Reduce Motion (`MediaQuery.disableAnimations`) is read and damps screen-shake/particles/ flashing; menu/overlay buttons are ≥48×48 dp with `Semantics` labels (icon-only buttons especially); in-game HUD keeps `withNoTextScaling`. (Full in-game screen-reader support is out of scope.)
(score/spawn/difficulty/economy — real logic), **≥1 widget test** (a menu/overlay renders + a button taps), and **≥1 integration test** (core loop: boot → play → game-over). Mirrors the shipped games; prevents a green `flutter test` that actually covers nothing.
---
Per-game acceptance criteria derived from the PRD. Each criterion must be verifiable by one of:
`grep -r "TODO" lib/` returns no matches).
A Claude Code plugin that takes a Flutter/Flame game from raw idea all the way to the app stores.
Phase 7 — analyze the game, decide a rewarded-ad strategy, guide manual AdMob ad-unit creation, and inject google_mobile_ads + ATT/UMP consent code.
Phase 8 — bootstrap signing credentials, generate fastlane config from templates, and build + upload signed IPA (TestFlight) and AAB (internal track).
Phase 3 — define the Flutter design_tokens.dart spec (palette, typography, spacing), the game's art/visual concept, and the asset/audio sourcing plan.
Phase 6 — skeptical QA. Run the game, watch it, then judge against the contract. Default = functional check; --strict adds quality and edge-case passes.
Phase 5 — build the Flame game in 3 gated sub-phases (core loop → systems+components → UI+content), then self-evaluate against the contract.
Phase 2 — write the game PRD in the project's default_language (core loop, mechanics, content metrics, win/lose, scope guard), map the lib/ structure, and…