flydubai Squad Playbook
How the squad builds the flydubai design system in Figma with Claude Code, one shared Git repo and a set of commands that remember every rule we've agreed.
How to use this
- New to the squad? Read sections 2 to 4 (15 minutes), then do the setup in section 3. Allow about 20 minutes, plus waiting for fonts.
- About to build or fix a component? Section 6 tells you which command to run, section 7 which files it reads.
- Something failed? Section 11 lists the errors we've already hit and the fix for each.
- Want to automate something new? Sections 9 and 10 show how to write a prompt, turn it into a command and share it.
The method came from the TA build, so parts will feel familiar. flydubai has its own repo, file, tokens and rules; TA decisions don't apply here.
Why we work this way
Until November, Sneha, Nikita and Zeeshan each used Claude differently, in separate streams. Every rule a reviewer gave lived in one person's chat and was lost to the others. The repo fixes that: Claude reads the same rules, logs and commands in every session, for everyone.
Shared memory
Every rule Sneha gives ("use the spacing scale only", "mobile never truncates") is written to a file once and loaded into every teammate's session automatically.
Resume anywhere
Each component has a build-state file with node ids, tokens, decisions and open items, so anyone can pick up where the last session stopped.
Same steps every time
Slash commands such as /fd-component run the agreed build: reference first, sign-off before writing, Grid Builder plugin, QA.
History and backup
A hook commits after every Claude turn. You push from GitHub Desktop, and anything can be traced or restored.
Commercial terms (project-instructions.md), client meeting notes (project-docs/) and licensed fonts (_local/) are git-ignored. The commit hook also blocks any file containing contract figures or API tokens.
Set up your Mac
Everything runs in Claude Code on your own Mac. Cloud sessions can't load the flydubai fonts or drive the hidden browser, so they can't write text into Figma.
Install Claude Code
Desktop app or CLI, signed in with your Horizontal account.
Clone the repo with GitHub Desktop
File › Clone repository ›
bmaniya1/flydubai-design-squad. Save it at exactly this path; the scripts expect it:~/Desktop/flydubai-design-squadInstall the fonts
Ask Sneha for Effra (Light, Regular, Medium) and Frutiger LT Arabic (45, 55, 65). Double-click each › Install. Keep the Figma font agent running. They are licensed: never put them in Git.
Install Chrome Beta and Node 18+
Chrome Beta is the hidden browser that writes text into Figma, captures the live site and runs the Grid Builder plugin. Download it from google.com/chrome/beta and Node from nodejs.org.
Run the setup script
It copies the commands, checks Node, Chrome Beta and the fonts, installs the browser library, logs the runner into Figma once, starts it and runs a test. Safe to re-run.
zsh ~/Desktop/flydubai-design-squad/bin/setup.shConnect Figma in Claude Code
In Claude Code type
/plugin, choose figma and log in with your Horizontal Figma account. Check it with: "Run Figma whoami". You should see the Horizontal Enterprise plan.Let the auto-sync push for you (optional)
Without this, the hook commits and you push from GitHub Desktop. With it, every turn also pushes. In Claude Code, run:
! gh auth login! gh auth setup-gitTest
Open Claude Code inside the repo folder and ask:
Run a ping job through scripts/fz-bg.mjs that loads Effra and returns the current page name.A page name back means you're ready. Then try
/fd-visual-ref Footer FD-12 ↳ Footer ✅.
How the automation fits together
When you open Claude Code in the repo, it loads CLAUDE.md. That pulls in the project context, the build template, the method and every standing rule. A command then drives two routes into Figma:
flowchart LR
A[You in Claude Code] --> B[CLAUDE.md loads context, template, rules]
B --> C{Slash command}
C --> D[Figma MCP: read, structure, tokens, uploads]
C --> E[Hidden Chrome Beta runner: text in Effra and Frutiger, Grid Builder plugin, live captures]
D --> F[(MASTER Figma file)]
E --> F
C --> G[Build-state files, rules, gotchas]
G --> H[Stop hook: scan, commit]
H --> I[GitHub Desktop: push]
I --> J[(Shared repo)]
J --> B
| Route | Use it for | It can't |
|---|---|---|
Figma MCP (use_figma, screenshots, metadata) | Reading the file, checking layers, creating and aliasing tokens (it can reach the Foundations library), uploading images | Load Effra or Frutiger, so it can't create or edit text |
Hidden runner (scripts/fz-bg.mjs <job>) | Any write that touches text, building variants, the Component Grid Builder plugin, live-site captures, contrast measured from a render | Reach the team library (no figma.teamLibrary); no undo, so jobs must be safe to re-run |
Never open a visible browser over someone's apps, and never type keys on the Figma canvas. Typing once triggered shortcuts and dropped a rectangle into a doc table.
A working day
Start
Pull in GitHub Desktop, start the hidden runner, then open Claude Code in the repo folder.
~/Desktop/flydubai-design-squad/scripts/fz-bg-start.shPick up
Ask Claude what's open: it reads
open-items-next-session.mdand the component's build-state file.Build
Run one command per component (section 6). Claude captures live references first, then asks you to sign off the variant count before it writes anything. Answer that question; Figma writes can't be undone.
Review in Figma
Give corrections in plain words ("no truncation", "keep the height when the header is off"). Claude fixes it and records the rule so it isn't repeated.
Close
Run
/fd-learn(rules into the right files), then/fd-wrap-session(handoff). Push in GitHub Desktop.
Which command, when
| When you want to… | Run | What it does |
|---|---|---|
| Build a new component | /fd-component <Component> <FD-ID> <Page> | Sources (FigJam, concept, live, MASTER) → reference frame → states list → your sign-off → sets, tokens, Grid Builder → doc frames → QA → build-state file |
| Bring an existing component onto the template | /fd-conform <Component> <FD-ID> <Page> | Copies the built sets into the template (never moves them), amends the copies, rebuilds the docs |
| Capture the live site only | /fd-visual-ref <Component> <FD-ID> <Page> | Every state at 1440 / 768 / 375 in the hidden browser, placed in the Reference (Design) frame with linked sources, set to 0% opacity |
| Save what you learned today | /fd-learn | Routes each lesson: build rule, standing rule, gotcha, build state or open item |
| End the session | /fd-wrap-session [focus] | Writes only what's missing, checks it, prints a handoff block |
Helper scripts Claude runs for you
| Script | Purpose |
|---|---|
scripts/fz-bg-start.sh | Starts the hidden Chrome Beta runner (port 9333) |
scripts/fz-bg.mjs jobs/<job>.js | Runs a Figma job in the runner with the flydubai fonts loaded |
scripts/fz-grid-open.mjs <setId> open · fz-grid-axis.mjs <Property> <X|Y> · fz-organize.mjs <setId> | Opens the Component Grid Builder plugin, sets each property's axis, clicks Organize |
scripts/fz-reload.mjs | Reloads the runner's Figma tab after token values change through MCP |
bin/sync-fd.sh | The end-of-turn hook: scans for private terms, commits, tries to push |
Files Claude reads (and you should know)
| File | What it holds | When |
|---|---|---|
CLAUDE.md | Entry point; loads everything below | Every session, automatically |
flydubai-claude-context/component-doc-template.md | The page format: 9 doc frames, type and spacing, matrix rules | Every build |
flydubai-claude-context/component-build-method-2026-10-23.md | Set naming, token tiers, Zeeshan's 10-check QA | Every build |
memory/fd-*.md | Standing rules, one per file, with the reason and how to apply it | Every session, automatically |
flydubai-claude-context/<component>-build-state.md | Node ids, tokens, decisions and open items for one component | Before touching that component |
flydubai-claude-context/open-items-next-session.md | Everything left to do or decide | Start of a session |
reference/ds-automation-pack/01-figma-plugin-api-gotchas.md | Error → cause → fix, by symptom | Before any Figma write, and when something fails |
flydubai-claude-context/prompts/01–03 | The long-form prompts behind the commands | When writing your own |
TEAMMATE-SETUP.md | Setup detail behind section 3 | Once |
Rules every build follows
These come from Sneha's reviews and live in memory/ and the build commands. Claude applies them automatically. Knowing them helps you review.
- The Reference (Design) frame with live captures comes first, before any token or set.
- Priti's FigJam is the functional spec; the concept decides placement, copy and button styles.
- Merge or split FD-IDs only as the concept groups them, and ask first.
- Sign off the variant count before any write.
- Always run the Component Grid Builder plugin; never script the matrix.
- Use atoms (Button, Icon Button, Input) as designed; copy sets, never move them.
- Every spacing value aliases the Foundations scale (0 · 2 · 4 · 8 · 12 · 16 · 20 · 24 · 32 …). No invented values.
- Never borrow another component's token; own colours get their own token or style.
- Main set frame: #F5F5F5, no outline, radius 12.
- No truncation unless asked: text wraps and the component grows.
- Heroes follow the concept's viewport rule (range → lower end), drawn at 1440 × 900 and 360 × 640.
- Header and booking widget stay placeholders until FD-13 / FD-30 are designed; hiding the header never changes the height.
Short Breadcrumb Min format: one line per property, ~6 Do / Don't pairs, Usecases only for what the variants can't show. Write the brand as "flydubai", always lowercase.
Write your own prompt
Good prompts here read like a short brief to a colleague. The build prompts all follow the same shape:
Scope in one line
What, which FD-ID, which page or node link. Paste the Figma link; Claude reads the node id from it.
Sources to read
FigJam section, concept frame, live URL, the build-state file.
The first write
Usually the reference capture, so the design is checked against live.
A gate
"Ask me to sign off … before any Figma change." This stops costly rebuilds.
Rules and checks
Point to the files instead of repeating them; add only what is special to this task.
Where to save the result
Usually the component's build-state file.
Check every hero for text that runs under the header placeholder at x-sm. Read inner-page-hero-build-state.md first. Report the cases; don't change anything until I say so.Quote the reviewer's exact words and the date when a rule comes from them. Give one correction at a time. If a result is wrong, say what's wrong in a sentence ("the header moved"); Claude records the cause as a gotcha.
Turn a prompt into a command or skill
A slash command is a Markdown file. Put it in the repo's commands/ folder so the whole squad gets it, and in ~/.claude/commands/ so your Claude Code sees it. The setup script copies the repo's commands for everyone.
---
description: Audit a flydubai component's tokens and spacing against the scale
argument-hint: <Component> <Page link>
---
# flydubai — token audit
**In scope:** $ARGUMENTS
1. Read memory/fd-spacing-scale-only.md and the component's build-state file.
2. List every padding and gap that is unbound or off the scale.
3. Report only; ask before fixing.| You want | Make | Where |
|---|---|---|
| A repeatable task with arguments | Slash command (fd-<name>.md) | commands/ + ~/.claude/commands/ |
| A rule that should apply in every session | Memory file (memory/fd-<slug>.md: rule, Why, How to apply) | Plus one @../memory/fd-<slug>.md line in flydubai-claude-context/CLAUDE.md |
| A step inside the build | One line in fd-component.md at the step it governs | ~/.claude/commands/fd-component.md (the hook copies it into the repo) |
| A bigger reusable workflow with its own files | A skill (folder with SKILL.md) | Ask Claude: "turn this into a skill"; keep it in the repo |
Work through a task once with Claude, then say "turn what we just did into an /fd- command". Run /fd-learn afterwards so any new rule lands in the right file.
Errors we've already hit
| You see | Cause | Fix |
|---|---|---|
unloaded font "Effra Regular" | The MCP can't load the licensed fonts | Text writes go through the hidden runner (fz-bg.mjs) |
Browser context management is not supported | The hidden Chrome has no open tab | curl -X PUT "http://127.0.0.1:9333/json/new?about:blank" |
| New token values don't show; heights unchanged | The runner's tab has a stale copy of the file | node scripts/fz-reload.mjs, then re-measure |
| New tokens silently not bound | Created through MCP seconds earlier; the runner hadn't synced | Reload, re-bind, read boundVariables back |
flydubai NOT committed - private terms found | A file matches the contract-figure check | Remove the figure; never weaken the check without asking Sneha |
could not read Username for 'https://github.com' | The command line isn't logged into GitHub | Push from GitHub Desktop, or gh auth login + gh auth setup-git |
| Grid Builder axis won't change | Mouse click missed after the panel moved | node scripts/fz-grid-axis.mjs <Property> <X|Y> |
| Hero stays 900 at xl / lg | A fill-height child inside a hug-height frame never shrinks | Bind the frame's height to the viewport token |
The full list, by symptom, is in reference/ds-automation-pack/01-figma-plugin-api-gotchas.md.
flydubai at a glance
| Thing | Where |
|---|---|
| Design system (build here) | Figma "Design system - MASTER" N3BmCXRDK6mbgyA6ZewqH9 |
| Functional spec | Priti's FigJam "Components Analysis" oCKyJubheVvcgOlObrVaq6, page 3b Component annotations |
| Concept designs | Figma "flydubai - Design Concept" Gq8Al7kdWTJQH8myvpdanl |
| Template of record | "Breadcrumb Min" 6150:25776 on ↳ Breadcrumb ✅ |
| Brand modes | flydubai · Training · Holidays · Skywards Blue / Silver / Gold / Diamonds |
| Breakpoints | x-sm · sm · md · lg · xl · 2xl · 3xl (variants built at 2xl, md, x-sm) |
| Languages | English and Arabic as variants; Russian checked in Usecases |
| Who decides | Sneha (design system) · Priti (FigJam / UX) · Nikita (sets, tokens, theming) · Zeeshan (QA) · Liliane (scope, PM) |
New components, merges or variants that change the component count go to Liliane before they're logged as scope. Claude will flag these; pass them on.