/lean-flitz:publish-flitz-bundle [project dir]from Lean Flitz
Publish a Flitz bundle of the Flutter app in the current project with `flitz publish` and return the install link. Use when someone asks for a Flitz bundle, preview build, or install link of the app, in Claude Tag or locally.
Ships in Lean Flitz. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run flitz publish in the project directory, as it is, and hand back the link. Do not clone,
check out, stash, or otherwise change the working tree: the bundle is built from whatever is in
the directory, uncommitted changes included.
The project is the directory holding flitz.yaml; the CLI reads the pinned SDK from there. Use
the current directory when it has one. Otherwise look for flitz.yaml in the repository: with one
match, use it; with several, pick the one the request names, or ask. With none, the app has not
been set up with flitz sdk use; say so, point at https://docs.flitz.dev/getting-started, and
stop.
cd <project dir> && flitz publish --yes --json
--yes lets a fresh machine download the pinned SDK without a terminal to confirm on.--json makes stdout one JSON document, so the link is never parsed from progress output.--target lib/main_dev.dart --dart-define=ENV=dev. Write a dart-define with = or
-D KEY=VALUE with a space, because the CLI reads a v inside an attached -DKEY=value as
--verbose.When flitz is not on PATH, install it with curl -fsSL https://download.flitz.dev/install.sh | sh
(it lands in ~/.local/bin). The installer verifies the binary's SHA-256.
Claude Tag: the Agent Proxy swaps the organization API key into requests to api.flitz.dev
after they leave the sandbox, but the CLI refuses to send anything without a non-empty
FLITZ_APIKEY. When FLITZ_APIKEY is unset and there is no stored flitz login
(~/.config/flitz/credentials.json, or under $XDG_CONFIG_HOME when that is set), prefix the
command with FLITZ_APIKEY=injected-by-agent-proxy. Never set it over a real login: inside the
CLI a set FLITZ_APIKEY wins over the login.
A first publish on a machine downloads the pinned SDK (several hundred MB) and resolves pub
packages, so it takes a few minutes; a warm one takes about a minute. Run it with a timeout of at
least 15 minutes. In a local Claude Code sandbox the run writes to ~/.local/bin,
~/.cache/flitz, and ~/.pub-cache, and reaches *.flitz.dev and pub.dev; when the sandbox
refuses one of those, re-run outside it.
On success, stdout is one JSON document: id, page_url, deeplink, bundle_url. Lead with
page_url: it opens in any browser and shows the QR code and an install button, which is what a
teammate on a phone needs. Add the deeplink only when someone asks for it.
The link does not expire and cannot be revoked, and anyone holding it can download the bundle. Post it where it was asked for, not somewhere wider.
| Exit | Meaning | What to do |
|---|---|---|
| 1 | Bad input or project state, such as a missing pubspec.yaml | Fix it from the message; nothing was published |
| 2 | Local or unexpected: filesystem permissions, a held lock, an interrupted run, or a malformed flitz.yaml | Report the message; in a local sandbox, check the paths above are writable |
| 3 | Credential or license | With the placeholder key (Claude Tag), the channel's bundle has no working Flitz connector; tell the requester, since it is an admin fix. With a key from the environment, unset it to fall back to the login. Otherwise flitz login. An inactive license is for the organization's Owner to restore |
| 4 | Flitz service or network, including the 30-second upload limit | Re-run once; a re-run starts a fresh publish |
| 5 | The app does not compile | Report the compiler error; it is the code, not the setup |
The full contract is at https://docs.flitz.dev/cli/exit-codes. A failed publish never prints JSON, so never guess a link from partial output.
Do not ask anyone for the API key or accept one pasted into a chat: Slack keeps it forever.
Credential setup belongs to the plugin README.md.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub leancodepl/ai-plugins --plugin lean-flitz2 skills in this plugin
Other plugins' skills for the same job