İçeriğe geç
Kurulum

mobile-project-bootstrap

Flutter ve yerel mobil proje kurulumunu aşamalı olarak başlatır.

HamaratLabsMITv1.0.0

KURULUM

hermes skills install well-known:https://skills.hamaratlabs.com/.well-known/skills/mobile-project-bootstrap

Ham dosyaSKILL.md önizlemesi

2 GERÇEK ÖRNEK

Ne istendi, ne çıktı

NE İSTENDİ · 18 KASIM 2026

mobiledev › 'Cep Zekâ Lab': cihaz içi yapay zekâ modellerini deneyen Flutter test uygulaması + Android APK.

NE ÇIKTI · 4 DOSYA

Proje sıfırdan kuruldu, APK üretildi; emülatörde Gemma 4 E2B ile sohbet, sadeleştirme (JSON), araç çağırma (Pomodoro) ve 3 turluk ölçüm ekranları denendi, 25+ QA ekran görüntüsü alındı. Gemma 3 1B lisans onayı gerektirdiği için indirilemedi.

NE İSTENDİ · 23 EYLÜL 2026

tiTimer MVP'nin sonraki dilimi: gerçek Ayarlar ekranı, yerel veri dışa aktarma/sıfırlama, alt gezinme düzeltmesi; katı TDD.

default
NE ÇIKTI

Testler önce yazılıp kırıldığı doğrulandı, sonra kod yazıldı; değişen dosyalar ve test sonucu JSON olarak raporlandı.

KAYNAK VE LİSANS

Tür
HamaratLabs yazdı
Yazan
HamaratLabs
Lisans
MIT
Ham dosya
SKILL.md

DEĞERLENDİRME

  • 2ajan profilinde kullanıldı
  • 2kayıtlı yükleme
  • 2belgelenmiş örnek4 çıktı dosyası

Sayılar ajan kayıtlarından gelir. Puanlama henüz yok.

SÜRÜM

Sürüm
v1.0.0
Siteye ilk yayın
1 Aralık 2026
Oluşturma
21 Eylül 2026
Son kullanım
18 Kasım 2026
Paket
2 dosya · SKILL.md 93 satır

YORUMLAR

Yorumlar yakında

Bu skill hakkındaki yorumlar ve puanlar burada görünecek. Bölüm henüz açılmadı.

SKILL.MDÖnizleme93 SATIR

AJAN AÇIKLAMASI Use for mobile bootstrap. Stage Flutter and native setup.

Mobile project bootstrap

Bu, Flutter/Android icin GENEL tuzaklari listeler. Projeye ozel build tuzaklari (gomulu ag kutuphaneleri, paket adi gecmisi vb.) varsa onlari projenin kendi belgesinde ya da ayri bir proje skill'inde tut.

Discovery first

  • Read the project's OBS notes and decision files before inspecting or creating code.
  • If the code repository is empty, treat OBS as the product source of truth; do not invent an existing architecture or run code tests that cannot exist.
  • Separate product decisions, technical research, and implementation tasks in the report.

Default architecture

  • For a simple local-first iOS + Android app with mostly shared UI and logic, prefer Flutter over two native apps.
  • When the product's actual differentiator is deep single-platform OS integration - a Telecom/ConnectionService call UI, a typed foreground service, a Quick Settings tile, platform-specific notification styling - go native directly for that platform instead of defaulting to Flutter. Flutter still requires hand-writing the same platform channel code for these APIs, so the cross-platform benefit never materializes when only one platform is targeted and the differentiating features are native-only anyway; choosing Flutter here just adds a bridging layer with no payoff.
  • Keep platform-specific capabilities behind native bridges: Swift/ActivityKit/CoreMotion on iOS and Kotlin/SensorManager/vendor SDKs on Android.
  • Keep the core offline when the product has no login, backend, or sync requirement; use local persistence and an explicit single-active-timer state machine when the product calls for one active timer.
  • Model future gamification as extensible data, but keep achievements/challenges out of the first vertical slice unless explicitly promoted.

Navigation structure: bottom tab bar vs. top nav bar

  • A bottom tab bar is for switching between an app's top-level, PARALLEL, frequently-used sections (3-5 peer destinations the user jumps between directly, e.g. a chat list / insights / settings-style screens) - each tab is a destination, never an action, and the bar stays persistently visible across those screens. A top bar is for hierarchical DRILL-DOWN within one already-selected section (a title + back button, pushing deeper into content, e.g. opening one specific chat from a chat list). These are not interchangeable, and conflating them is a common, costly mistake: if a user references a mobile app's navigation screenshot while asking for a prominent/"glass"/floating bar treatment, check carefully whether their reference image shows a BOTTOM bar (top-level switcher) or a TOP bar (in-screen title) before building - the two have different content, different persistence rules, and a different visual-prominence budget.
  • Apple's Human Interface Guidelines is explicit that a frosted/translucent "glass" material belongs primarily on the PRIMARY navigation surface (the bottom tab bar / sidebar) and should otherwise be used sparingly elsewhere ("Liquid Glass forms a distinct functional layer for controls and navigation elements - like tab bars and sidebars- ... Use Liquid Glass effects sparingly"). Applying a heavy glass/blur treatment uniformly to every screen's top bar over-applies the material; concentrate it on the bottom tab bar and keep in-screen top bars lighter/plainer.

Build order

  1. Confirm the product scope, target platforms, local-data boundary, and visual references from OBS.
  2. Before implementation, write a technical architecture plan that fixes the layers, domain state machine, persistence schema/migration strategy, report semantics, test pyramid, platform boundaries, and MVP acceptance criteria. Save the plan in the repository and record the durable decisions in OBS.
  3. If the repository is empty, have the PM produce a product plan from OBS before creating the project; keep the product plan separate from the technical architecture plan.
  4. Install only the toolchain needed for the declared phase; Flutter + Chrome are sufficient for web-first UI work.
  5. Create the Flutter project and make the code structure match the plan before adding UI; for a local timer MVP, build the pure-Dart models/engine, repository, and controller before wiring screens.
  6. Implement the MVP as a complete vertical slice: local creation, the core state transitions, persistence, reporting, and the user-visible screens. Do not call it complete after a scaffold or a successful build.
  7. Write behavior tests for the state machine and acceptance-critical rules (single active timer, break exclusion, persistence/manual entries) alongside widget tests, then run flutter test, flutter analyze, and flutter build web.
  8. Start flutter run -d web-server --web-port <port> and verify the local HTTP endpoint before calling web-first development usable.
  9. Add Android device tooling when physical-device tests begin; do not install an emulator when the user will test on a real device.
  10. Add Xcode and iOS native tooling before iOS builds or ActivityKit work.
  11. Prototype each native bridge in isolation before coupling it to the shared Flutter UI.
  12. Verify with flutter doctor -v, then run the actual target on Chrome and the user's device.

Resource and routing rules

  • Stage broad agent reviews in small waves; do not launch every profile simultaneously because provider quotas and RAM are shared resources.
  • When Claude or Codex is unavailable, route research and visual/project-note review to Gemini via agy; keep implementation with a coding agent.
  • Preserve the user's visual references for the MVP; do not redesign the interface while the user has approved existing mockups as the direction.

Multi-feature parallel development (git worktrees)

  • When several independent Android features are being built at once (by different dispatched subagents or in different sessions), give each its own git worktree + branch, branched from a single shared "integration" worktree's current tip - not from main. After each feature's build+tests are green, merge it straight into that same integration worktree (git merge feature/x --no-edit) and rebuild+retest there before starting the next feature's worktree from the new tip. This keeps every feature's diff isolated and reviewable while the integration worktree always reflects "everything finished so far," and most merges come back as clean fast-forwards or trivial auto-merges because the branches touch different files.
  • A git worktree checkout of an Android project does NOT carry local.properties (it's gitignored, holds the machine-local sdk.dir path) - the very first ./gradlew command in a brand-new worktree fails with SDK location not found ... Define a valid SDK location with an ANDROID_HOME environment variable or by setting the sdk.dir path, even though the identical code builds fine in the original checkout. Fix: cp <main-checkout>/local.properties <new-worktree>/local.properties before running any gradle task in a freshly created worktree.
  • When verifying a UI change by driving the emulator with adb shell input tap, don't guess tap coordinates from a screenshot handed to vision - screenshots are typically downscaled for vision analysis (e.g. a 1080x2400 device renders as 540x1200), so eyeballed coordinates routinely land on the wrong element or miss small targets. Instead run adb shell uiautomator dump /sdcard/ui.xml, adb pull it, and regex for resource-id="<tag>"[^>]*bounds="\[x1,y1\]\[x2,y2\]" to get the exact tappable box, then tap its center in real device pixels. Reserve the downscaled-screenshot route for reading/verifying what's on screen, not for computing where to tap.
  • When a user asks for a new visual system (a color theme, a palette extension, a design-language change) rather than a one-off UI tweak, dispatch the DECISION as its own narrow task before dispatching the implementation: have a design-focused subagent read the existing design doc, propose exact values against concrete constraints (e.g. WCAG contrast ratios against existing accent/semantic colors), and write the decision into the project's design doc. Then hand the implementation task the finished doc section as its source of truth. This keeps color/design choices reviewable and grounded instead of the implementer inventing hex values mid-refactor.
  • Before merging a later, clean, fully-tested feature branch back into an integration worktree, check that worktree's git status/git diff for stale UNCOMMITTED edits first - if an earlier combined task was killed mid-flight in that same worktree (e.g. to split it into narrower parallel dispatches), its partial, never-committed work can still be sitting there and will collide with the replacement branch's own version of the same feature at merge time. Discard the killed task's uncommitted leftovers (git checkout -- <file>, remove untracked new files) before merging the properly tested branch in.
  • When splitting one large task into several parallel subagent dispatches purely for speed, scope each dispatch to a DISTINCT file or screen rather than letting two dispatches edit the same file - overlapping edits force a manual merge-conflict resolution afterward that can cost more time than the parallelism saved. If two sub-problems genuinely must touch the same file/area (e.g. both need the same screen's text-input composer), bundle them into ONE dispatch instead of two parallel ones.
  • Always independently rebuild (./gradlew testDebugUnitTest assembleDebug) and live-verify (install the APK, drive the emulator, screenshot + vision-check the actual change) every subagent's "done" report before merging or forwarding it - a reported pass is not a verified pass, and this is the step that actually catches regressions, stale APKs, and the flaky-test/leftover-file issues documented elsewhere in this skill. testDebugUnitTest UP-TO-DATE only shows Gradle's cache holds an earlier green run: add --rerun-tasks for a fresh run, then sum the tests=/failures=/errors= attributes over app/build/test-results/testDebugUnitTest/*.xml and compare with the worker's claimed count (a mismatch is the signal; a green summary line alone is not). When a rename or package move is in scope, expect proguard-rules.pro keep rules and embedded asset docs to carry the old name too; a minified release build is the only thing that breaks on the former.
  • Once more than one Android device/emulator is attached to adb at the same time (e.g. a physical phone is plugged in while an emulator session is still running), every adb command issued without an explicit target fails with error: more than one device/emulator - target explicitly with -s <id> (get the id from adb devices) rather than disconnecting either one, so both stay available for whichever test actually needs them.

Compose / Android ongoing-development gotchas

  • A legacy TextField(value, onValueChange) in Jetpack Compose does NOT support native double-tap word selection (only long-press) - this is a real, reported bug class ("double-tap doesn't select the word"), not a misconfiguration. Fix it by switching that field to the newer state-based API: OutlinedTextField(state = rememberSaveable(saver = TextFieldState.Saver) { TextFieldState(initialText) }, ...), reading the current text via state.text.toString(). Apply the same fix everywhere the app has more than one text field (e.g. a composer AND a separate rename dialog) - fixing only the first one found leaves the same bug live elsewhere.

  • A coroutine-timing-sensitive unit test (one that uses runBlocking/delay-based coroutine resumption to assert an async callback fired) can fail intermittently under full-test-suite contention and then pass cleanly alone or on an immediate re-run, with no code change in between. Before treating such a failure as a regression introduced by your own change, re-run the SAME full test task once; if it goes green with nothing touched, it's pre-existing test flakiness, not your bug - don't chase it, and don't let it block an otherwise-clean build.

  • When a project's build.gradle introduces or already has ABI splits (e.g. for a native/NDK library), assembleDebug/assembleRelease stops producing one APK and instead produces several (app-universal-*.apk, app-arm64-v8a-*.apk, app-x86_64-*.apk, ...) - the universal one is much larger (it bundles every ABI's native code) and can exceed a chat platform bot's file-delivery size limit, causing the send to silently fail to arrive with no error surfaced to the agent. When sending a build to a user over such a channel, prefer the architecture-specific APK matching real devices (arm64-v8a covers virtually all modern Android phones) over the universal one. If even the single-arch APK still sits right at or over the limit (confirm with the user whether it actually arrived - a few MB over a soft limit can fail silently), don't just keep shrinking variants: serve the file over the user's own Tailscale network instead - copy it into a dedicated directory, start python3 -m http.server <port> there (as a tracked background=true process, never a nohup/disown wrapper), then tailscale serve --bg --https=<port> http://127.0.0.1:<port> (the macOS App Store Tailscale build cannot serve a directory path directly - always proxy to a local server). Check the local port is free first (lsof -nP -iTCP:<port> -sTCP:LISTEN): another agent's server already on that port makes the new one fail silently while the tailnet URL serves the wrong site. Verify both the local and the https://<tailnet-host>.ts.net:<port>/<file> URL return 200 with the exact expected byte size via curl -sk -o /dev/null -w '%{http_code} %{size_download}', and hand the user that HTTPS link to open directly on the target device's browser. Write the served copy under the agent's own scratch directory, not /tmp - some sandboxed environments silently wipe /tmp between tool calls, which kills the server with a no such file or directory on its next invocation even though the first launch reported success.

  • Before trusting flutter_launcher_icons (or any launcher-icon generator) output, check the SOURCE PNG's alpha channel at its four corners, not just its center: a source icon drawn as a rounded-rect/blob shape on an otherwise-transparent square canvas (common when the design tool exports a rounded card rather than a full-bleed square) leaves the corners at alpha=0, and many Android launchers composite a transparent legacy icon against a plain white backdrop - producing a visible white halo/box around the icon that is NOT present if you only glance at a resized preview of the shape itself. Verify with PIL: Image.open(path).convert('RGBA').getpixel((0,0)) should have alpha 255, matching a properly full-bleed icon (compare against a known-good sibling app's icon in the same project if one exists). Fix by extending the edge color to the corners rather than redrawing from scratch: build an opaque fill using the nearest already-opaque pixel's color at every transparent coordinate (scipy.ndimage.distance_transform_edt(~opaque, return_indices=True) gives the nearest-opaque index map in one call), force alpha to 255 everywhere, then re-run the icon generator from that full-bleed source. Re-verify pixel-level corner alpha on the REGENERATED mipmap file itself afterward, not just the source - the generator's own resize/mask step is a separate place the same transparency bug can reappear. When ios: true is set, the SAME run can also silently corrupt ios/Runner.xcodeproj/project.pbxproj: it has been observed flipping ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS from YES to the string AppIcon (an invalid value for that build setting) as an unrelated side effect of touching the AppIcon asset catalog. Diff the pbxproj after every flutter_launcher_icons run (even an Android-only icon fix, if ios: true stayed in the config) and revert any such stray setting change - don't assume the tool only touches image assets just because that's what you intended to change.

  • When ./gradlew fails INSTANTLY (under ~2-3s, before any task runs) with FAILURE: Build failed with an exception. * What went wrong: followed by a BARE NUMBER with no sentence (e.g. 27, 25.0.3) and no stack trace worth reading, that number is the running JDK's version, not an exit code or a real Gradle message - Gradle swallowed a JDK-incompatibility exception and rendered only the version string. This happens when the system/IDE-default java resolves to a JDK newer than the project's pinned Gradle version supports (e.g. Gradle 8.14.x rejects both JDK 25 and JDK 27). Don't chase it as an OOM or daemon-corruption issue (--stop, clearing swap, --max-workers=1 will all fail identically in ~2s). Fix: find a JDK the project actually builds with - check /usr/libexec/java_home -V for installed options and try Android Studio's bundled JBR (/Applications/Android Studio.app/Contents/jbr/Contents/Home on macOS) or an older Homebrew JDK (openjdk@21, openjdk@17) - then pass it explicitly: ./gradlew <task> -Dorg.gradle.java.home="<jdk_home_path>". A dispatched coding agent's own session may already have the right JAVA_HOME set and report green tests while your independent verification in a fresh shell hits this; don't conclude the agent lied before checking which JDK each of you is actually using.

Common pitfalls

  • Do not choose two native codebases merely because one or two features need native APIs; bridge those features unless platform-specific UI is the dominant product value.
  • On Apple Silicon, an Android system image must be the arm64-v8a variant (e.g. system-images;android-34;google_apis;arm64-v8a) - the x86_64 image will not run at usable speed (or at all) under Rosetta-less emulation. Verify the host architecture before picking the package.
  • If an app can reach the host via 10.0.2.2 intermittently or not at all even though adb shell ping 10.0.2.2 succeeds, check adb shell ip route get 10.0.2.2: a newer AVD can bring up a second simulated NIC (wlan0, from WiFi being enabled on the device) that wins the route over eth0, where the actual host-redirect lives. adb shell svc wifi disable forces the route back onto eth0 and fixes it immediately; re-enabling WiFi reintroduces the break, so leave it off for the whole session if the app depends on reaching the host.
  • If hw.keyboard=yes (physical keyboard passthrough) is enabled on an AVD and typed input produces the wrong characters - most visible as a password/credential that "looks right" on screen but is rejected - check the AVD's hw.keyboard.charmap (commonly qwerty2, a US layout) against the HOST's actual active keyboard layout (macOS: defaults read com.apple.HIToolbox AppleCurrentKeyboardLayoutInputSourceID). A non-US host layout (e.g. Turkish-QWERTY) silently remaps punctuation/symbol keys through the passthrough. Fix by switching the host to a US layout while typing into the emulator, or fall back to the on-screen keyboard (unaffected by host-layout mapping) for anything sensitive.
  • Right after sdkmanager installs the emulator package, a direct emulator call can fail with command not found even though the package is present - the binary isn't always reflected into the shell's resolved PATH immediately after a mixed Homebrew/Android-Studio SDK install. Invoke it by its full path (~/Library/Android/sdk/emulator/emulator) rather than assuming PATH resolution, and don't reinstall the SDK over this.
  • Do not claim iOS or Android readiness from Flutter Web success; native builds need the full platform toolchains and real-device checks.
  • Emulator crashes: read the crash report before blaming the OS or the SDK. ls -t ~/Library/Logs/DiagnosticReports/qemu-system-aarch64-*.ips and parse the JSON body (second part after the first line): termination.indicator "Library missing" + @rpath/libandroid-emu-*.dylib means someone launched emulator/qemu/darwin-aarch64/qemu-system-aarch64 directly - always start through the emulator wrapper, which sets the library paths; a faulting thread in CrashReporter::hangDetector means the VM stalled under host load and the emulator killed itself, not a broken install. Before attributing it to a macOS update, check when that OS was installed (system_profiler SPInstallHistoryDataType) against the last known-good emulator run.
  • Headless emulator falls back to a software GPU unless told otherwise. Launched with -no-window and the default -gpu auto the emulator logs vulkan_mode_selected:lavapipe / llvmpipe and renders on the CPU, which is heavy and hangs under contention. Pass -gpu host explicitly - it selects Apple M1 Vulkan even headless. Grep the emulator log for vulkan_mode_selected to see which mode a run used, and run the emulator alone rather than alongside simulators/Xcode builds.
  • Lightweight emulator: an ATD image (system-images;android-34;google_atd;arm64-v8a, apps/services stripped for testing) with 2 cores, 2 GB RAM, -gpu host, -no-audio -no-boot-anim boots ~2.5× faster and idles at a fraction of the CPU of a full google_apis 4-core/3 GB AVD. A small wrapper script (yours to write; not shipped) can create the AVD, wait on a heavy-job lock, and report boot time and GPU mode. Note: some ATD images return black screenshots for system UI; keep a google_apis AVD for visual QA. Set ANDROID_SDK_ROOT=~/Library/Android/sdk for the emulator: the Homebrew android-commandlinetools root has no platform-tools, so the emulator rejects it with "Broken AVD system path" even though the image is installed there.
  • Flutter store screenshots/videos need no emulator at all - render in flutter test at store resolution and assemble frames with ffmpeg; see app-release-signing.
  • Do not treat a rate-limited worker's generic plan as repository evidence; verify the workspace and notes independently.
  • Do not install emulators, backend services, login flows, or cloud dependencies when the declared product is local-first and device testing is planned.
  • Do not let main.dart become the domain layer: keep timer arithmetic and state transitions independently testable because UI rebuild timing is not a reliable clock.
  • Do not count an unplanned break as work: close the work interval before opening the break event and resume from a fresh timestamp, otherwise reports overstate focus time.
  • Do not stop at flutter build web: run acceptance-critical behavior tests and exercise the local web endpoint because compilation cannot prove the state machine or serving path.
  • Do not let the folder layout drift from the architecture plan: create the planned domain/data boundaries before feature code because later moves invalidate imports and test fixtures.

MOBİL

İlişkili skill'ler

app-release-signing

Uygulama test kullanıcısı ekleme, davet e-postası ve sürüm yayınlama adımlarını yürütür.

HamaratLabs2 ÖRNEK

android-emulator-qa

Android değişikliklerini emülatörde çalıştırarak kanıtlar.

HamaratLabs3 ÖRNEK

flutter-magaza-goruntu

Flutter mağaza ekran görüntülerini alır ve yerelleştirme ekler.

HamaratLabs1 ÖRNEK

ios-sim-xcuitest-surucu

Masaüstü olmadan iOS simülatör arayüzünü XCUITest REPL ile sürer.

HamaratLabs2 ÖRNEK