# helicopter-skill
An agent skill that gives any AI agent the ability to fly helicopters. Inspired by the scene in The Matrix (1999) where Trinity calls Tank and says "I need a pilot program for a B-212 helicopter. Hurry." — and seconds later, she flies.
This is that program. Install it, and any agent that loads this skill will know how to fly.
Two aircraft are covered:
- **Bell 212 (B-212 / UH-1N Twin Huey):** the twin-engine helicopter from The Matrix. Pre-flight, hover, takeoff, cruise, landing, single-engine failure, autorotation, hydraulic emergencies.
- **Bell 47 (H-13 Sioux):** the iconic 1950s bubble-canopy helicopter from M*A*S*H — the world's first certified civilian helicopter, and the aircraft depicted in the accompanying short film. Includes the critical manual throttle correlation technique unique to this aircraft.
## Install
```bash
npx skills add zeke/helicopter-skill
```
## Tools used
| Tool | What it's used for |
|------|--------------------|
| [Replicate](https://replicate.com) | Running all AI models via API — image generation, video generation, transcription |
| [google/nano-banana-2](https://replicate.com/google/nano-banana-2) | Generating the scene still images used as I2V inputs and visual references |
| [bytedance/seedance-2.0](https://replicate.com/bytedance/seedance-2.0) | Generating all video clips — both text-to-video and image-to-video (I2V) |
| [openai/whisper](https://replicate.com/openai/whisper) | Transcribing the original Matrix helicopter scene dialogue |
| [Suno AI](https://suno.com) | Generating the 1940s hillbilly background music for the film |
| [ffmpeg](https://ffmpeg.org) | Stitching video clips, mixing audio tracks, volume envelopes, fades, title card |
| [ImageMagick](https://imagemagick.org) | Generating the end title card PNG |
| [yt-dlp](https://github.com/yt-dlp/yt-dlp) | Downloading the original Matrix helicopter scene for reference and transcription |
| [OpenCode](https://opencode.ai) | The AI coding agent used to build and iterate on everything in this repo |
## How it was made
### The concept
In The Matrix (1999), Trinity and Neo find a helicopter on a rooftop. Neo asks if she can fly it. She says "Not yet," then calls the operator, Tank, who uploads a "pilot program" directly to her brain. Seconds later she says "Let's go" and flies a Bell 212 across the city.
That scene is a perfect metaphor for agent skills: a discrete, loadable unit of capability that can be transmitted to any agent on demand. So we built the actual pilot program as an agent skill, and then made a short film about it.
### The skill itself
The skill lives in `SKILL.md`. It follows the [Agent Skills specification](https://github.com/agentskills/agentskills) which uses a three-level progressive disclosure model:
- **Level 1 — YAML frontmatter** (~100 tokens): Always in context. Lets the agent decide when to activate the skill.
- **Level 2 — SKILL.md body** (the main content): Loaded when the skill is activated. Contains the full flying reference for both aircraft: controls, hover, takeoff, cruise, approach, landing, single-engine failure, autorotation, hydraulic emergencies, and key numbers.
- **Level 3 — `references/bell-212-specs.md` and `references/bell-47-specs.md`**: Full technical specifications for each aircraft, loaded on demand when the agent needs deeper detail.
The skill works with OpenCode, Claude Code, Cursor, Codex, and 40+ other agents that support the spec.
### The film
To accompany the skill, we built a 7-scene, ~73-second AI-generated short film: a recreation of the Matrix helicopter scene, recast entirely with the same face playing every character (Zeke Sikelianos), shot in a 1950s American Southwest / Wes Anderson aesthetic. No original Matrix footage. Every frame generated by AI.
The film was built entirely through conversational iteration with OpenCode — writing prompts, firing predictions, reviewing outputs, adapting to failures, and reassembling until it worked.
### Scene breakdown
| # | Scene | Character | Duration |
|---|-------|-----------|----------|
| 1 | `01-neo` | Neo | 5s |
| 2 | `02-helicopter` | — (establishing shot) | 5s |
| 3 | `03-trinity-phone` | Trinity | 6s |
| 4 | `04-tank-operator` | Tank | 8s |
| 5 | `05-tank-console` | Tank at console | 6s |
| 6 | `06-trinity-upload` | Trinity (data upload) | 6s |
| 7 | `07-walk` | Neo + Trinity | 8s |
### Image generation pipeline
Before generating videos, we generated still images for each scene using **google/nano-banana-2**, an image model that accepts multiple reference images as style and face inputs.
Each still was generated with:
- A style reference image (one of 5 Asteroid City film stills downloaded via SERP API) to anchor the Wes Anderson aesthetic
- A Zeke face reference photo (`ziki.jpg`) to anchor the character's appearance
- A detailed prompt describing the scene composition, costume, lighting, and setting
The stills served two purposes: visual reference for the dashboard review process, and I2V (image-to-video) first-frame inputs for Seedance.
The key challenge was getting the aesthetic right. The model would consistently generate "ASTEROID CITY" text on signs in the background — because the style reference images came from that film. The solution was to describe the visual palette explicitly in every prompt ("sandy ochre desert ground, turquoise sky, crisp white-painted concrete, muted terracotta, flat bright daylight, soft shadows, 35mm film grain") and add "no text on screen, no signs with words" to every prompt.
Multiple stills were generated for segment 1 (Neo) to find one with the right framing and no visible text. The final approach used a wider shot with the figure at a distance on a desert road, hand shading eyes.
### Video generation pipeline
All video was generated using **bytedance/seedance-2.0**, a text-to-video and image-to-video model run via Replicate's API.
The generation system (`video/src/generate-videos.ts`) works as follows:
1. **Segment definitions** in `video/segments.ts` describe every variant: prompt text, reference image keys, I2V input path, duration, and variant ID
2. All reference images are uploaded to Replicate's file store once and cached by path
3. All predictions are fired concurrently
4. A `state.json` file tracks prediction status in real time, enabling resumable runs — if the process crashes or is killed, re-running skips already-succeeded variants
5. Each downloaded video file is named `{segment}-{variant}-{prediction-id}.mp4` so every output is traceable back to its exact Replicate prediction
A local dev server (`video/src/server.ts`) served a dashboard (`video/index.html`) with live SSE updates showing prediction status, prompts, reference images, and video outputs. Hovering over any video unmutes its audio.
### The content filter battle (E005)
Seedance's content moderation (error code E005: "input or output flagged as sensitive") was the primary obstacle throughout production.
Patterns that consistently triggered E005:
- Any face reference photo where the face is prominent and forward-facing
- I2V inputs using the generated stills for segments 1, 6 (close-up face shots)
- The `outdoor-selfie`, `orange-hat`, `lava-lamps`, and `zeko` reference photos
- Prompts describing "removes sunglasses", "eyes moving rapidly", "REM flicker"
Patterns that consistently worked:
- The `ziki` and `wilder-shirt` reference photos (the face is less directly frontal)
- I2V from `03-trinity-phone.jpg` (profile/partial face angle)
- I2V from `07-walk.jpg` (figure shot from behind, no face visible)
- Prompts with neutral physical descriptions and no neurological/medical language
The solution for segment 6 (Trinity's "upload" moment with eyes fluttering) was to use I2V from the trinity-phone still — a different scene's still — and describe the transition in the prompt. This worked because the input image didn't have a frontal close-up face.
Over the course of production, roughly 80+ predictions were fired across ~10 iterative runs, with the generation script resuming from state on each pass.
### Prompt engineering for video
All prompts shared a common style preamble describing the visual aesthetic, with these hard constraints in every prompt:
```
No green tint. No cyberpunk. No subtitles. Absolutely no text on screen.
No words or letters visible anywhere in the frame. No signs.
```
The word "Asteroid City" was deliberately excluded from all prompts — naming the source film caused the model to generate that text on signs in the background.
For audio, Seedance generates synchronized audio from the prompt. The dialogue lines are included directly in the prompts: "He says: Can you fly that thing?", "She says: Not yet.", etc. Male voice descriptions were added after early results produced female voices for characters intended to be male.
### The music
Background music was generated using **Suno AI** with a prompt designed to evoke 1940s hillbilly/country music. The key was being specific about what to exclude as much as what to include:
```
1940s hillbilly music, Hank Williams Sr., Carter Family, 78rpm record,
shellac recording, pre-war country, acoustic guitar, fiddle,
no drums, no reverb, dry recording, nasal male vocals
```
The lyrics tell the story of a man discovering the world around him is a simulation and choosing to unplug — Matrix references reframed through the idiom of a Hank Williams song about the plight of the soul.
A separate shellac crackle audio file was layered underneath the generated clips using ffmpeg with a dynamic volume envelope: quiet background throughout, rising swell around t=34s, louder during the final walk segment, then carrying through to the end title card.
### Post-production
Final assembly was done entirely with ffmpeg:
1. Each output video was generated by writing a concat list of chosen prediction IDs and running `ffmpeg -f concat -safe 0 -i concat.txt -c copy output.mp4`
2. Multiple composite versions (`output-000.mp4` through `output-004.mp4`) were assembled as different segment combinations were evaluated
3. The final render applied:
- Original audio ducked to 20% during the last segment (walk) to let the crackle/music come forward
- Crackle volume envelope: 15% → 30% swell at t=34s → back to 15% → ramps to 50% at t=55s → fades out over title card
- Video fade to black over the last 1.78s of the walk segment
- 10-second title card (`npx skills add zeke/helicopter-skill`) with 2-second cinematic fade-in
- Title card font: American Typewriter, 36pt, centered on black
The title card PNG was generated with ImageMagick:
```bash
magick -size 1280x720 xc:black \
-font "/System/Library/Fonts/Supplemental/AmericanTypewriter.ttc" \
-pointsize 36 -fill white -gravity center \
-annotate 0 "npx skills add zeke/helicopter-skill" \
data/title-card.png
```
### Running the video pipeline
Requires Node.js 18+, ffmpeg, and a Replicate API token.
```bash
cd video
cp .env.example .env # add your REPLICATE_API_TOKEN
npm install
npm run fetch-refs # download Asteroid City style reference images
npm run images # generate scene stills via nano-banana-2
npm run dev # start dashboard at http://localhost:3000
npm run videos # fire all video predictions (concurrent, resumable)
```
The `npm run videos` command is fully resumable — re-running it will skip any already-succeeded predictions and only retry failed ones.
## The aircraft
### Bell 212 (UH-1N "Twin Huey")
The helicopter from The Matrix. Twin-engine medium utility helicopter.
- Engine: Pratt & Whitney Canada PT6T-3 Twin-Pac (two coupled turboshafts)
- Max speed: 130 kt / 240 km/h
- Service ceiling: 17,400 ft / 5,300 m
- Capacity: 14 passengers + pilot
- The real helicopter used in filming was shot in Sydney, Australia
In a continuity error, Tank's loading screen shows a B-206 image while the text reads "B-212."
### Bell 47 (H-13 Sioux)
The bubble-canopy helicopter depicted in the short film. The world's first certified civilian
helicopter (1946), famous from M*A*S*H, and one of the most recognizable aircraft ever built.
- Engine: Lycoming TVO-435 (turbocharged, 270–280 hp) on the definitive 47G-3B
- Max speed: 91 kt / 105 mph
- Service ceiling: ~10,500–11,000 ft
- Capacity: pilot + 2 passengers (or 2 external litter patients in medevac config)
- Distinctive feature: manually coordinated throttle — no auto-correlation
- Production run: 1946–1974, over 5,600 built worldwide
## More Skills
Browse more skills at [zeke/skills](https://github.com/zeke/skills).
## License
MIT