PromptGenerator
Stop asking teammates for context. Stop being afraid of unfamiliar codebases. Let AI understand your Flutter project instantly.
A Flutter package that bridges the gap between your codebase and AI assistants by intelligently collecting and formatting your Flutter project code for Claude, ChatGPT, DeepSeek, Grok, and other AI tools.
Why PromptGenerator?
Ever joined a new project and felt lost? Got a task from a senior developer but felt embarrassed to ask "simple" questions? Wanted to discuss your architecture decisions with an expert without bothering your team?
PromptGenerator solves this. It extracts your project's relevant code into a single AI-ready format that you can paste directly into any AI assistant. No more manual file searching, no more incomplete context, no more embarrassment.
What It Does
- Instant AI Context: Create a complete snapshot of your codebase in seconds
- Smart Selection: Precisely configure which files and folders matter
- AI-Optimized: Outputs in a format AI assistants understand perfectly
- Privacy First: Automatically skips generated files (.g.dart, .freezed.dart) and sensitive data
- Zero Setup: Simple YAML configuration, launch with a single command
Who It's For
- 🆕 Joining Unfamiliar Projects - Understand architecture without bothering teammates
- 🤖 AI-Assisted Development - Get expert-level advice on your own codebase
- 📚 Code Reviews - Share context-rich code snippets with AI for analysis
- 🏗️ Architecture Discussion - Discuss refactoring strategies with full project context
- 📖 Documentation - Generate comprehensive overviews of your codebase
- 👥 Team Collaboration - Share project structure with new developers
- 🔍 Code Analysis - Let AI identify patterns, issues, or improvement opportunities
Getting Started
Add prompt_generator to your pubspec.yaml:
dev_dependencies:
prompt_generator: ^latest_version
Usage
1. Create a Configuration File
Create a prompt_generator.yaml file in your project root:
skipFiles: [
'.freezed.dart',
'.g.dart',
'.gr.dart',
'.config.dart',
'/.',
]
includePaths: [
lib/presentation,
lib/domain,
]
2. Generate Your Prompt
Run this command in your project directory:
dart run prompt_generator:generate
The result is automatically copied to your clipboard, ready to paste into any AI assistant.
3. Share with AI
Paste directly from your clipboard into Claude, ChatGPT, DeepSeek, Grok, or any other AI assistant. Now you can:
- Ask architecture questions about YOUR project
- Request refactoring suggestions based on YOUR actual code
- Get implementation help that understands YOUR context
- Debug issues with full project awareness
Configuration Parameters
| Parameter | Type | Description |
|---|---|---|
skipFiles |
list | File patterns to exclude (supports wildcards) |
includePaths |
list | Files and folders to include in the output |
Note: Paths in
skipFilesandincludePathscan be written with or without quotes (lib/main.dartor'lib/main.dart') — both work.
Configuration Examples
Minimal Setup - Just a single file:
skipFiles: ['.g.dart', '.freezed.dart']
includePaths: [lib/main.dart]
Feature-Focused - Only specific features:
skipFiles: [
'.freezed.dart',
'.g.dart',
'.gr.dart',
'_test.dart',
]
includePaths: [
lib/features/auth,
lib/features/profile,
]
Full Project - Comprehensive review:
skipFiles: [
'.freezed.dart',
'.g.dart',
'.gr.dart',
'.config.dart',
'/.',
'.html',
'.png',
'.jpg',
'.jpeg',
firebase_options.dart,
]
includePaths: [
lib/presentation,
lib/domain,
lib/data,
lib/core,
]
Real-World Scenarios
Scenario 1: New to the Team
You joined a project with complex state management. Instead of bothering the tech lead, generate the prompt, paste it into Claude, and ask: "Explain this project's state management architecture and where I should add a new feature."
Scenario 2: Stuck on a Task
A senior dev assigned you a refactoring task in an unfamiliar module. Generate the prompt for that specific path, ask AI: "How should I refactor this according to clean architecture principles?"
Scenario 3: Preparing for Code Review
Before submitting a PR, generate your feature code, ask AI: "Review this implementation for potential issues, edge cases, and best practice violations."
Features
- Single-command code collection
- Flexible path configuration
- Smart file filtering
- Automatic clipboard copy
- Works with all AI assistants
Tips for Best Results
- Be Specific: Include only relevant folders for your question
- Clean First: Skip generated and test files to reduce noise
- Ask Clearly: Frame your question with context when pasting into AI
- Iterate: Regenerate with different paths for different questions
- Combine Tools: Use alongside your AI assistant's other capabilities for maximum benefit
Contributing
Contributions are welcome! Feel free to submit issues and pull requests.
Stop hesitating. Start shipping. Let AI be your senior developer, architect, and code reviewer — all with full knowledge of YOUR project.