flet-extension

flet-extension is a command for Claude Code from brunobrown/claude-flet-plugin. It costs 16 tokens per session (1,150 once invoked), scanned A, original, MIT.

A guided workflow for packaging a Flutter library as a Flet extension, which lets Python apps use Flutter components or services.

In plain words
What is it for?
Use it to create Flet extensions for background services or visual controls, including their properties, methods, events, and package setup.
Why use it?
It breaks the work into planning, code structure, type conversion, and packaging steps so the Python interface matches the Flutter library.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the flet plugin — 6 skills, 3 commands, 2 agents shipped together

Good fit Use it to create Flet extensions for background services or visual controls, including their properties, methods, events, and package setup.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/brunobrown/claude-flet-plugin/flet-extension
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/brunobrown/claude-flet-plugin

Made for: Claude Code.

Or install flet, the plugin that ships this one along with the rest of its 6 skills, 3 commands, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for flet-extension

README.md
[![agentmods](https://agentmods.dev/badge/commands/brunobrown/claude-flet-plugin/flet-extension/github.svg)](https://agentmods.dev/commands/brunobrown/claude-flet-plugin/flet-extension)
Your own site
<a href="https://agentmods.dev/commands/brunobrown/claude-flet-plugin/flet-extension"><img src="https://agentmods.dev/badge/commands/brunobrown/claude-flet-plugin/flet-extension/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for flet-extension

Your own site · 80×15
<a href="https://agentmods.dev/commands/brunobrown/claude-flet-plugin/flet-extension"><img src="https://agentmods.dev/badge/commands/brunobrown/claude-flet-plugin/flet-extension.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,150 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.01150
Opus 5 $0.00008 $0.00575
Sonnet 5 $0.00003 $0.00230
Haiku 4.5 $0.00002 $0.00115

Measured 9d ago against content hash 7577cd158a27, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

flet-extension scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/flet-extension.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/flet-extension — Create a Flet Extension

You are guiding the user through creating a Flet extension package step by step. Follow these 6 phases in order.

Before starting, ask the user what Flutter package they want to wrap and whether it's a Service (no UI) or UI Control (visual widget).


Phase 1: Planning

  1. Identify the Flutter package — name on pub.dev, latest version
  2. Determine extension type:
    • Service (ft.Service) — for SDKs, background services, platform APIs
    • UI Control (ft.LayoutControl) — for widgets that render on screen
  3. Review the Flutter API — key classes, methods, events, callbacks
  4. Plan the Python API:
    • Properties (sent to Flutter)
    • Methods (invoke Flutter methods)
    • Events (receive from Flutter)
    • Sub-modules (if complex SDK with namespaces)
  5. Plan type mappings — Dart types → Python types

Summarize the plan before proceeding.


Phase 2: Scaffold

Use flet-pkg CLI to generate the project skeleton:

# Auto-analyze the Flutter package (recommended)
flet-pkg create my-extension --analyze

# Or manually if flet-pkg is not available

If scaffolding manually, create:

flet-my-extension/
├── pyproject.toml
└── src/
    ├── flet_my_extension/
    │   ├── __init__.py
    │   ├── my_control.py
    │   └── types.py
    └── flutter/flet_my_extension/
        ├── pubspec.yaml
        └── lib/
            ├── flet_my_extension.dart
            └── src/
                ├── extension.dart
                └── my_service.dart

Ensure pyproject.toml includes:

[tool.setuptools.package-data]
"flutter.flet_my_extension" = ["**/*"]

Phase 3: Review Generated Code

Check and fix the generated code:

  1. Type mappings — verify Dart→Python type conversions are correct
  2. Method namescamel_to_snake conversion from Dart
  3. Invoke keys_invoke_method("key") must match Dart switch cases
  4. Event namestriggerEvent("name")on_name: EventHandler
  5. @ft.control name — must match control.type switch in Dart
  6. Enum values — string values that match Dart representations
  7. Platform validation — service-only or cross-platform?

Read the full file on GitHub · 144 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 144 lines · 16 tokens per session scan A 7577cd158a27

Subscribe to this mod's changes

flet-extension is a command published in the GitHub repository brunobrown/claude-flet-plugin (3 stars, last pushed 4mo ago), licensed MIT. It adds 16 tokens to every session and 1,150 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.