Claude Code Skills for building offline-capable AI features with Gemma 4 on-device LLM inference in Flutter applications.
A complete scaffold guide for integrating Gemma 4 into Flutter projects. Covers:
- Project setup with
flutter_gemma, Riverpod 2.0, and GoRouter - iOS, Android, Web, and Desktop platform configuration
- Model installation and loading
- Basic inference and streaming responses
- Function calling with structured output
- Multimodal input (image understanding)
- Complete example application
A comprehensive guide for building reusable AI capabilities on top of flutter_gemma. Covers:
- Designing function schemas for structured output
- Implementing Skill classes with system instructions
- Building execution engines
- Creating result parsers and prompt builders
- Publishing AI skill packages
Copy the skill directories to your Claude Code skills folder:
# Clone the repo
git clone https://github.com/houyongsheng/flutter_gemma_skill.git
# Copy skills to Claude Code
cp -r flutter_gemma_skill/flutter-gemma-scaffold ~/.claude/skills/
cp -r flutter_gemma_skill/flutter-gemma-skill ~/.claude/skills/After installation, Claude Code will automatically use these skills when you mention:
- "integrate Gemma", "on-device LLM", "flutter_gemma"
- "build AI capability", "function calling", "Gemma skill development"
| Model | Size | Memory | Best For |
|---|---|---|---|
| Gemma 4 E2B Q4_K_M | ~3.5GB | <1.5GB | General purpose |
| Gemma 4 E4B Q4_K_M | ~6.5GB | <2.5GB | Stronger reasoning |
| FunctionGemma 270M | ~284MB | <300MB | Function calling only |
Check out the example/ directory for a complete Flutter app demonstrating:
- Real-time chat with Gemma 4 streaming responses
- Multiple AI skills (translation, summarization)
- Riverpod 2.0 state management
- Feature-based architecture
cd example
flutter runSee flutter-gemma-scaffold/SKILL.md for a complete chat application example:
- Riverpod 2.0 for state management
- Feature-based project structure
- Streaming responses
- Proper error handling
Contributions welcome! Please open an issue or PR.
MIT