Skip to content

AgenticFish/creating-clean-flutter

Repository files navigation

creating-clean-flutter

A Claude Code skill that creates minimal, production-ready Flutter projects with clean code and CI/CD.

✨ Features

  • 🎯 Simple & Clean - Minimal app.dart with empty Scaffold (no template boilerplate)
  • 🚫 No Comments - Clean Dart and YAML files without clutter
  • 📏 Strict Linting - prefer_single_quotes and avoid_print rules
  • 🧪 Ready to Test - Includes placeholder_test.dart for CI/CD
  • 🔄 GitHub Actions - Pre-configured CI workflow (main.yml)
  • Validated - Passes format, analyze, and test checks

🚀 Installation

macOS / Linux

bash install.sh

Windows (PowerShell)

.\install.ps1

After installation, restart Claude Code if needed.

💬 Usage

Ask Claude (Auto-invocation)

Simply ask Claude to create a Flutter project:

Create a Flutter app called my_app
Generate a new Flutter project with org com.example
Build a Flutter application for Android and iOS

Manual invocation

/creating-clean-flutter my_app

Command line

python3 ~/.claude/skills/creating-clean-flutter/clean_flutter.py my_app --org com.example --platforms android,ios

📦 What it creates

my_app/
├── .github/
│   └── workflows/
│       └── main.yml             # CI: format, analyze, test (named after project)
├── lib/
│   ├── main.dart                # Clean entry point (no comments)
│   └── app.dart                 # Simple App with empty Scaffold
├── test/
│   └── placeholder_test.dart    # Simple 1+1=2 test (not widget_test)
├── analysis_options.yaml        # Linting rules (no comments)
├── pubspec.yaml                 # Clean, no comments
└── README.md

📄 Generated Code

lib/main.dart

import 'package:flutter/material.dart';

import 'app.dart';

void main() {
  runApp(const App());
}

lib/app.dart

import 'package:flutter/material.dart';

class App extends StatelessWidget {
  const App({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(),
    );
  }
}

test/placeholder_test.dart

import 'package:flutter_test/flutter_test.dart';

void main() {
  test('placeholder: 1 + 1 = 2', () {
    expect(1 + 1, 2);
  });
}

🛠️ Options

Parameter Description Default
name Project name (snake_case) Required
--org Organization (e.g., com.example) com.example
--platforms Platforms (comma-separated) All platforms
--overwrite Overwrite existing directory false

Examples

# Mobile only
python3 ~/.claude/skills/creating-clean-flutter/clean_flutter.py my_app --platforms android,ios

# Custom organization
python3 ~/.claude/skills/creating-clean-flutter/clean_flutter.py my_app --org com.mycompany

# Overwrite existing
python3 ~/.claude/skills/creating-clean-flutter/clean_flutter.py my_app --overwrite

⚙️ Requirements

  • Flutter SDK (on PATH)
  • Python 3.6+

Check Flutter installation:

flutter --version

🎯 Design Philosophy

This skill creates minimal, production-ready Flutter projects by:

  1. Using the latest Flutter template as a base
  2. Removing all unnecessary code (MyHomePage, comments)
  3. Setting up clean architecture from day one
  4. Including CI/CD configuration
  5. Ensuring all checks pass before completion

Result: A clean slate to start building, not a tutorial app to clean up.

📝 What's Different

Aspect Flutter Default This Skill
app.dart Complex counter app with MyHomePage Simple empty Scaffold
Comments Verbose tutorial comments None
Debug banner Visible Hidden (debugShowCheckedModeBanner: false)
Tests widget_test.dart (fails without MyHomePage) placeholder_test.dart (always passes)
YAML files Lots of comments Clean, no comments
CI/CD Not included GitHub Actions (main.yml)

🤝 Contributing

Issues and PRs welcome! This skill is designed to create clean, minimal Flutter projects without unnecessary boilerplate.

📄 License

MIT

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors