prprompts-flutter-generator: Command for Claude Code

.claude/commands/refactoring/convert-react-to-flutter.md

convert-react-to-flutter is a command for Claude Code from Kandil7/prprompts-flutter-generator. It costs 0 tokens per session (1,525 once invoked), scanned A, original, MIT.

A command that guides the conversion of React or React Native code into a Flutter application, with selectable architecture and state-management options.

In plain words
What is it for?
Use it to move an existing React project into Flutter, choosing approaches such as Clean Architecture, BLoC, Cubit, or Provider.
Why use it?
It organizes a cross-framework rewrite and collects the source, destination, and conversion preferences before running it. It can also run validation after the conversion.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is Kandil7/prprompts-flutter-generator's own configuration. It tells Claude Code how to work on prprompts-flutter-generator itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything prprompts-flutter-generator configures →

Part of the prprompts-flutter-generator plugin — 25 commands, 4 hooks shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to Kandil7/prprompts-flutter-generator. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Kandil7/prprompts-flutter-generator/master/.claude/commands/refactoring/convert-react-to-flutter.md
Clone the repo
git clone --depth 1 https://github.com/Kandil7/prprompts-flutter-generator

Made for: Claude Code.

Or install prprompts-flutter-generator, the plugin that ships this one along with the rest of its 25 commands, 4 hooks.

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 convert-react-to-flutter

README.md
[![agentmods](https://agentmods.dev/badge/commands/kandil7/prprompts-flutter-generator/convert-react-to-flutter.svg)](https://agentmods.dev/commands/kandil7/prprompts-flutter-generator/convert-react-to-flutter)
Your own site
<a href="https://agentmods.dev/commands/kandil7/prprompts-flutter-generator/convert-react-to-flutter"><img src="https://agentmods.dev/badge/commands/kandil7/prprompts-flutter-generator/convert-react-to-flutter.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 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,525 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00000 $0.01525
Opus 5 $0.00000 $0.00763
Sonnet 5 $0.00000 $0.00305
Haiku 4.5 $0.00000 $0.00153

Measured 6d ago against content hash 63890beb2c1e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

convert-react-to-flutter 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 6d 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.

.claude/commands/refactoring/convert-react-to-flutter.md · 208 lines

How it starts

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

Convert React to Flutter

You are helping convert React/React Native code to Flutter using the PRPROMPTS refactoring system.

Overview

This command guides the user through converting a React application to Flutter with Clean Architecture, BLoC/Cubit state management, and production-ready patterns.

Steps

1. Gather Information

Ask the user for:

  1. React source directory: Where is the React code located?

    • Example: ./src, ./app, ./components
    • Validate that the directory exists
  2. Flutter target directory: Where should the Flutter code be generated?

    • Example: ./flutter-app, ./mobile
    • Will be created if it doesn't exist
  3. Conversion options: What preferences do they have?

    • State management: Auto-detect, BLoC, Cubit, or Provider?
    • Architecture: Clean Architecture (recommended), MVC, or MVVM?
    • AI enhancement: Enable AI code optimization? (slower but higher quality)
    • Validation: Run validation after conversion?

2. Run Conversion

Execute the conversion command:

prprompts refactor <source> <target> --ai claude --validate

Example:

prprompts refactor ./src ./flutter-app --ai claude --validate --state-management bloc --architecture clean

3. Show Progress

As the conversion runs, explain what's happening:

  1. Parsing React files: Analyzing components, hooks, state management
  2. Generating Flutter code: Creating widgets, BLoCs, repositories
  3. AI Enhancement: Optimizing code quality, generating tests
  4. Validation: Checking code quality, security, performance
  5. Writing files: Saving generated Flutter code

4. Display Results

After conversion completes, show:

✅ Conversion Summary:
  • Files converted: 15
  • Components: 12 → 12 widgets
  • Lines of code: 2,450 (React) → 2,850 (Flutter)
  • State management: BLoC (3 files), Cubit (9 files)

📊 Validation Results:
  Overall Score: 85/100 (B)
  ✓ Code Quality: 90/100
  ✓ Security: 100/100
  ! Performance: 75/100 (5 warnings)
  ✗ Accessibility: 65/100 (2 errors)

📁 Generated Files:
  flutter-app/
  ├── lib/
  │   ├── core/            # Shared infrastructure
  │   ├── features/        # Feature modules (Clean Architecture)
  │   └── config/          # App configuration
  └── test/                # Unit & widget tests

Read the full file on GitHub · 208 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. 6d ago First seen · 208 lines · 0 tokens per session scan A 63890beb2c1e

Subscribe to this mod's changes

convert-react-to-flutter is a command published in the GitHub repository Kandil7/prprompts-flutter-generator (11 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,525 tokens. 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-30.