Skip to content
Back to search

swarm-build-video

SkillWorks with Claude CodeGitHub

Make a "swarm build" video of an iOS app screen. Figma-style multiplayer cursors build the real SwiftUI screen in about 12 seconds (red guides, grey boxes that turn into cards, typed text, alt-drag copies, one joke typo fixed at the end). It's recorded on the iOS Simulator and rendered as an MP4 in a phone mockup. Use when someone asks for a swarm video, a swarm build, or "cursors building my screen" for a SwiftUI app. Needs a Mac with Xcode, the iOS Simulator and ffmpeg.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/rehanxahmed--swarm-build-video/badge.svg)](/listings/rehanxahmed--swarm-build-video)

HTML

<a href="/listings/rehanxahmed--swarm-build-video"><img src="/api/listings/rehanxahmed--swarm-build-video/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

You need a Mac with Xcode (plus an iOS Simulator runtime), ffmpeg (`brew install ffmpeg`) and Claude Code.

git clone https://github.com/Rehanxahmed/swarm-build-video ~/.claude/skills/swarm-build-video

Restart Claude Code if it was open.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 165 lines
  1. ---
  2. name: swarm-build-video
  3. description: Make a "swarm build" video of an iOS app screen. Figma-style multiplayer cursors build the real SwiftUI screen in about 12 seconds (red guides, grey boxes that turn into cards, typed text, alt-drag copies, one joke typo fixed at the end). It's recorded on the iOS Simulator and rendered as an MP4 in a phone mockup. Use when someone asks for a swarm video, a swarm build, or "cursors building my screen" for a SwiftUI app. Needs a Mac with Xcode, the iOS Simulator and ffmpeg.
  4. ---
  5. # Swarm build video
  6. You turn one screen of the person's SwiftUI app into a 12-second clip where
  7. four multiplayer cursors build it live, the way a design file comes together:
  8. - Red margin guides slide in from the edges.
  9. - A cursor crosshair-drags a grey box with a size pill, and it becomes the real card.
  10. - Headlines are typed small behind a caret, then stepped up to size.
  11. - Repeated items are built once, then alt-dragged into place with a red measure and retyped.
  12. - Lines are penned, icons dropped in, images swapped into their grey boxes.
  13. - Near the end, one cursor double-clicks a word typed wrong ("Good morming") and fixes it.
  14. - The cursors leave and the finished screen holds for a beat.
  15. One cursor carries the person's first name; the other three are unlabelled.
  16. The real screen is what gets built. The engine animates the app's own views,
  17. so the final frame *is* the app.
  18. Outputs: `<name>.mp4` (phone mockup, 1440×1800, 60 fps), `<name>-screen.mp4`
  19. (bare screen) and `<name>-sheet.png` (contact sheet), in `~/Movies/Swarm/`.
  20. **Keep it quick.** Do one build pass, check the stills and the contact sheet,
  21. then deliver. Offer a polish pass rather than looping on it unasked.
  22. ## Ground rules
  23. - **Never touch the person's real project.** Everything happens in a copy.
  24. - Only SwiftUI screens. If the screen is UIKit, say so and stop.
  25. - Show the screen at its best: real layout, believable full content (seed
  26. demo data in the copy), no login, onboarding or empty states.
  27. - iOS 17+ for the engine. In the copy you may raise the deployment target.
  28. ## Steps
  29. ### 1. Preflight
  30. ```bash
  31. xcodebuild -version && xcrun simctl help >/dev/null && which ffmpeg python3
  32. ```
  33. If ffmpeg is missing, ask before running `brew install ffmpeg`. Note the
  34. skill's own folder (where this file is) as `SKILL_DIR`.
  35. ### 2. Pick the screen and the name
  36. - **Screen:** if the person didn't name one, pick the app's main or home screen and say which.
  37. - **Name:** use the person's first name for the labelled cursor if you know it.
  38. Otherwise use the first word of `id -F`. The output name is `<App>-<Screen>`.
  39. ### 3. Copy the project
  40. ```bash
  41. WORK="${TMPDIR:-/tmp}/swarm-video/<AppName>"
  42. rm -rf "$WORK" && mkdir -p "$WORK"
  43. rsync -a --exclude .git --exclude build --exclude DerivedData --exclude '*.xcresult' <project-root>/ "$WORK/"
  44. ```
  45. The project root is the folder holding the `.xcodeproj`, `.xcworkspace`,
  46. `project.yml` or `Package.swift`. If the project refers to files outside that
  47. folder (`../Shared`, local packages), copy the common parent instead.
  48. ### 4. Add the engine
  49. `SKILL_DIR/engine/SwarmKit.swift` is the whole engine: one self-contained
  50. file, no dependencies. Get it into the app target in the copy:
  51. | Project kind | How |
  52. |---|---|
  53. | Xcode 16+ folders (`PBXFileSystemSynchronizedRootGroup` in `project.pbxproj`) | copy the file into the app's source folder |
  54. | XcodeGen (`project.yml`) | copy it into a source folder, then run `xcodegen generate` |
  55. | Swift Package / Tuist | copy it into the app target's sources |
  56. | Classic groups (anything else) | append its contents to the end of the target screen's `.swift` file, and move its `import` lines to the top (no duplicates) |
  57. ### 5. Make the app open straight on the screen
  58. In the copy, change the `App`'s root so it shows the target screen directly,
  59. with demo data and any environment objects it needs. Skip launch gates,
  60. splash screens, auth and paywalls. If the screen lives in a `TabView` or
  61. `NavigationStack`, keep that chrome so it looks real.
  62. ### 6. Wire the build
  63. Read `SKILL_DIR/reference/choreography.md` first. It has the moves, the
  64. timing, the patterns (cards, repeated rows, images, the joke fix) and the
  65. gotchas.
  66. 1. On the screen's root view: `@State private var build = <Screen>Build.make()` and `.swarmStage(build)`.
  67. 2. Tag every piece visible on the first screen with `.swarm("id")`.
  68. - Anything visible that isn't tagged shows from the first frame, so tag it or let it be the page itself.
  69. - Don't tag what's below the fold.
  70. 3. Write `<Screen>Build.make()`: the steps (id, cursor, start, length, move), `SwarmBuild.crew(named: "<FirstName>")`, and `length` ≈ 10.5–11.2 s.
  71. Without `-swarm` the screen opens finished, so normal launches are unaffected.
  72. ### 7. Build for the simulator
  73. ```bash
  74. cd "$WORK"
  75. xcodebuild -list # find the scheme
  76. xcodebuild -project <App>.xcodeproj -scheme <Scheme> -configuration Debug \
  77. -destination 'generic/platform=iOS Simulator' -derivedDataPath "$WORK/build" \
  78. CODE_SIGNING_ALLOWED=NO build 2>&1 | grep -E "error:|BUILD (SUCCEEDED|FAILED)"
  79. APP=$(find "$WORK/build/Build/Products" -maxdepth 2 -name '*.app' -path '*iphonesimulator*' | head -1)
  80. ```
  81. Use `-workspace <App>.xcworkspace` instead if there is one (CocoaPods).
  82. ### 8. Check stills before recording
  83. ```bash
  84. python3 "$SKILL_DIR/scripts/still.py" --app "$APP" --at 0.3 2 4 6 8.5 99 --out "$WORK/stills.png"
  85. ```
  86. Each moment is a fresh launch frozen at that time on a dedicated simulator
  87. ("Swarm Recorder", created on first use; the first run takes about a
  88. minute). Look at the image:
  89. - **0.3 s** must be the empty page, plus system chrome like the status bar and tab bar. Anything else showing is untagged or has a typo'd id.
  90. - **Mid-build** frames should show marks: grey boxes, selection, caret, red measures.
  91. - **99** must be the finished screen exactly as the app normally looks.
  92. Fix what's off, rebuild, re-check.
  93. ### 9. Record and render
  94. ```bash
  95. python3 "$SKILL_DIR/scripts/record.py" --app "$APP" --seconds <length + 2.5> --out "$WORK/takes" --name take
  96. python3 "$SKILL_DIR/scripts/render.py" "$WORK/takes/take.mov" --out ~/Movies/Swarm/<App>-<Screen>
  97. ```
  98. - **record.py** launches the screen as an empty page, starts recording, then cues the build. No launch animation ends up in the take.
  99. - **render.py** finds the first and last movement on its own, cuts from just before the first cursor to a held final frame (12 s by default, `--duration` to change), and writes the mockup, the bare screen and a contact sheet.
  100. - Add `--dark` to record.py for dark-mode screens, and `--args "..."` for any demo-mode flags the copy needs.
  101. ### 10. Look, then deliver
  102. Read `<name>-sheet.png`. Check:
  103. - The page starts empty.
  104. - Pieces arrive one at a time, with two or three cursors busy at once.
  105. - Nothing pops in at the very end.
  106. - The typo gets fixed.
  107. - It ends on the finished screen.
  108. If something is clearly broken, fix it once and re-record. Then tell the person:
  109. - the paths to the two videos
  110. - the order things get built and the joke fix
  111. - that their real project was not modified, and that the working copy is at `$WORK` if they want tweaks
  112. ## Troubleshooting
  113. | Symptom | Fix |
  114. |---|---|
  115. | render.py says nothing moves | `.swarmStage(build)` missing, the app doesn't open on the screen, or the screen isn't built with `-swarm`. Run still.py at 2 s to see. |
  116. | Something visible from the first frame | It's untagged, or its id isn't in the steps (unknown ids count as finished). |
  117. | A cursor jumps instead of gliding | Two of its steps overlap or sit too close. Leave ≥ 0.2 s between one cursor's steps. |
  118. | Cursor flies to the top-left corner | That step's view never got a frame (not on screen). For guides and parks, use `build.pin` / `build.park`. |
  119. | Marks clipped inside a `List` | In the copy, swap the `List` for `ScrollView { VStack }` with the same row views. |
  120. | Large navigation title can't be typed | In the copy, hide the system title and put a `Text` header in the content instead. |
  121. | A setup banner shows in the take | A brand-new simulator. Record again; the banners only come once. |
README.md · README · 53 lines
  1. # Swarm build video: a Claude Code skill
  2. Point Claude at a SwiftUI app and ask for a swarm video. It makes a
  3. 12-second clip where four Figma-style multiplayer cursors build one of your
  4. screens live:
  5. - red guides
  6. - grey boxes that turn into cards
  7. - headlines typed and stepped up
  8. - rows alt-dragged into place
  9. - one typo fixed at the end
  10. The clip comes out in a phone mockup, ready to post.
  11. ## Install
  12. You need a Mac with Xcode (plus an iOS Simulator runtime), ffmpeg
  13. (`brew install ffmpeg`) and Claude Code.
  14. ```bash
  15. git clone https://github.com/Rehanxahmed/swarm-build-video ~/.claude/skills/swarm-build-video
  16. ```
  17. Restart Claude Code if it was open.
  18. ## Use
  19. Open Claude Code in your app's folder and say something like:
  20. > make a swarm video of my home screen
  21. Claude works on a copy of your project; your real code isn't changed. The
  22. videos land in `~/Movies/Swarm/`:
  23. - `<App>-<Screen>.mp4`: the phone mockup, 1440×1800, 60 fps
  24. - `<App>-<Screen>-screen.mp4`: the bare screen
  25. The first run creates a simulator called "Swarm Recorder" and takes a few
  26. extra minutes. Your everyday simulator isn't used.
  27. ## What's inside
  28. | File | What it is |
  29. |---|---|
  30. | `SKILL.md` | the steps Claude follows |
  31. | `reference/choreography.md` | how a good build is timed and staged |
  32. | `engine/SwarmKit.swift` | the animation engine: one drop-in SwiftUI file |
  33. | `scripts/still.py` | freezes the build at chosen moments, for checking |
  34. | `scripts/record.py` | records the build on its own simulator |
  35. | `scripts/render.py` | auto-cuts the take and renders the mockup video |
  36. | `assets/` | the phone frame and backdrop |
  37. Works with SwiftUI screens on iOS 17+. UIKit screens aren't supported.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.