Skip to content

Commit 9aede73

Browse files
committed
Add AI agent skill files for flutter_it ecosystem
1 parent 94d6fe6 commit 9aede73

File tree

5 files changed

+1388
-0
lines changed

5 files changed

+1388
-0
lines changed

skills/SKILLS.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Claude Code Skills for command_it
2+
3+
This directory contains **Claude Code skill files** that help AI assistants (like Claude Code, Cursor, GitHub Copilot) generate correct command_it code efficiently.
4+
5+
## What are Skills?
6+
7+
Skills are concise reference guides optimized for AI consumption. They contain:
8+
- Critical rules and constraints
9+
- Common usage patterns
10+
- Anti-patterns with corrections
11+
- Integration examples
12+
13+
**Note**: These are NOT replacements for comprehensive documentation. For detailed guides, see https://flutter-it.dev/documentation/command_it/
14+
15+
## Available Skills
16+
17+
This directory includes:
18+
19+
1. **`command_it-expert.md`** - Command patterns, error handling, restrictions, reactive states
20+
2. **`listen_it-expert.md`** - ValueListenable operators (command_it depends on listen_it)
21+
3. **`flutter-architecture-expert.md`** - High-level app architecture guidance
22+
23+
**Note**: For the ecosystem overview, see `/skills/flutter_it.md` in the monorepo root.
24+
25+
## Installation
26+
27+
To use these skills with Claude Code:
28+
29+
### Option 1: Copy to Global Skills Directory (Recommended)
30+
31+
```bash
32+
# Copy all skills to your global Claude Code skills directory
33+
cp skills/*.md ~/.claude/skills/
34+
```
35+
36+
### Option 2: Symlink (Auto-updates when package updates)
37+
38+
```bash
39+
# Create symlinks (Linux/Mac)
40+
ln -s $(pwd)/skills/command_it-expert.md ~/.claude/skills/command_it-expert.md
41+
ln -s $(pwd)/skills/listen_it-expert.md ~/.claude/skills/listen_it-expert.md
42+
ln -s $(pwd)/skills/flutter-architecture-expert.md ~/.claude/skills/flutter-architecture-expert.md
43+
```
44+
45+
### Option 3: Manual Copy (Windows)
46+
47+
```powershell
48+
# Copy files manually
49+
copy skills\*.md %USERPROFILE%\.claude\skills\
50+
```
51+
52+
## Using the Skills
53+
54+
Once installed, Claude Code will automatically have access to these skills when working on Flutter projects.
55+
56+
**For other AI assistants**:
57+
- **Cursor**: Copy to project root or reference in `.cursorrules`
58+
- **GitHub Copilot**: Copy to `.github/copilot-instructions.md`
59+
60+
## Verification
61+
62+
After installation, you can verify by asking Claude Code:
63+
64+
```
65+
Can you help me create an async command with loading states?
66+
```
67+
68+
Claude should reference the skill and provide correct command patterns with error handling.
69+
70+
## Contents Overview
71+
72+
### command_it-expert.md (~1200 tokens)
73+
74+
Covers:
75+
- Command types (sync vs async)
76+
- **CRITICAL**: Sync commands don't support isRunning
77+
- Restrictions (counterintuitive semantics: `true` = disabled)
78+
- Error handling strategies and filters
79+
- Results handling
80+
- listen_it operators on commands
81+
- Debounced commands pattern
82+
- Integration with watch_it
83+
- Common anti-patterns
84+
85+
### listen_it-expert.md (~1000 tokens)
86+
87+
Covers:
88+
- ValueListenable operators (commands implement ValueListenable)
89+
- Operator chaining (debounce, map, where, etc.)
90+
- **CRITICAL**: Operators return NEW objects (must capture)
91+
- Use listen() instead of addListener()
92+
- Reactive collections
93+
- Common patterns
94+
95+
### flutter-architecture-expert.md (~800 tokens)
96+
97+
Covers:
98+
- Command integration in app architecture
99+
- State management patterns
100+
- Error handling at architecture level
101+
102+
## Why command_it Skills Are Important
103+
104+
command_it has **important constraints** that can cause runtime errors:
105+
106+
1. **Sync commands don't support isRunning** - Will throw assertion error
107+
2. **Restriction semantics are counterintuitive** - `true` means disabled, not enabled
108+
3. **Operator results must be captured** - Debounce returns new command object
109+
4. **Error filters prevent double reporting** - Global vs local listeners
110+
111+
## Documentation Links
112+
113+
- **Comprehensive docs**: https://flutter-it.dev/documentation/command_it/
114+
- **Package README**: https://pub.dev/packages/command_it
115+
- **GitHub**: https://github.com/escamoteur/command_it
116+
- **Discord**: https://discord.gg/ZHYHYCM38h
117+
118+
## Contributing
119+
120+
Found an issue or have suggestions for improving these skills?
121+
- Open an issue on GitHub
122+
- Join the Discord community
123+
- Submit a PR with improvements
124+
125+
---
126+
127+
**Note**: These skills are designed for AI consumption. For human-readable documentation, please visit https://flutter-it.dev

0 commit comments

Comments
 (0)