Skip to content

Commit 3dd4237

Browse files
ryzizubclaude
andauthored
feat: add create-project skill (#40)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a2f9243 commit 3dd4237

4 files changed

Lines changed: 103 additions & 0 deletions

File tree

.claude-plugin/plugin.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"bloc",
1919
"bloc-test",
2020
"code-quality",
21+
"create-project",
2122
"dart",
2223
"deep-linking",
2324
"flutter",

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ hooks/
1818
analyze.sh # Runs dart analyze on modified .dart files
1919
format.sh # Runs dart format on modified .dart files
2020
skills/
21+
create-project/SKILL.md
2122
accessibility/SKILL.md
2223
accessibility/reference.md
2324
bloc/SKILL.md

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ You should see `very-good-ai-flutter-plugin` in the output.
4545

4646
| Skill | Description |
4747
| ----- | ----------- |
48+
| [**Create Project**](skills/create-project/SKILL.md) | Scaffold new Dart/Flutter projects from Very Good CLI templates — `flutter_app`, `dart_package`, `flutter_plugin`, `dart_cli`, `flame_game`, and more |
4849
| [**Accessibility**](skills/accessibility/SKILL.md) | WCAG 2.1 AA compliance — semantics, screen reader support, touch targets, focus management, color contrast, text scaling, and motion sensitivity |
4950
| [**Testing**](skills/testing/SKILL.md) | Unit, widget, and golden testing — `mocktail` mocking, `pumpApp` helpers, test structure & naming, coverage patterns, and `dart_test.yaml` configuration |
5051
| [**Navigation**](skills/navigation/SKILL.md) | GoRouter routing — `@TypedGoRoute` type-safe routes, deep linking, redirects, shell routes, and widget testing with `MockGoRouter` |
@@ -82,6 +83,7 @@ For example:
8283
You can also invoke skills directly as slash commands:
8384

8485
```bash
86+
/vgv-create-project
8587
/vgv-accessibility
8688
/vgv-bloc
8789
/vgv-internationalization

skills/create-project/SKILL.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
name: vgv-create-project
3+
description: Scaffold a new Dart or Flutter project from a Very Good CLI template. Use when user says "create a new project", "start a new flutter app", "scaffold a package", "initialize a dart cli", "new flame game", or "generate a plugin". Supports flutter_app, dart_package, flutter_package, flutter_plugin, dart_cli, flame_game, and docs_site templates.
4+
allowed-tools: mcp__very-good-cli__create,mcp__very-good-cli__packages_get
5+
argument-hint: "[template] [project-name]"
6+
---
7+
8+
# Create Project
9+
10+
Scaffold a new Dart or Flutter project using Very Good CLI templates.
11+
12+
---
13+
14+
## Core Standards
15+
16+
- **Use the Very Good CLI MCP server** to scaffold projects and install dependencies
17+
- **Infer the template from context** — determine the right template based on what the user wants to build, not by asking them to pick a subcommand name
18+
- **Use `AskUserQuestion` only for information you cannot infer** — project name and organization are the most common missing pieces
19+
- **Install dependencies after creation**
20+
21+
---
22+
23+
## Workflow
24+
25+
### Step 1: Understand What the User Wants to Build
26+
27+
Infer the subcommand from the user's description — the available subcommands and their descriptions are defined by the Very Good CLI MCP server. Do NOT ask users to pick a subcommand name — figure it out from context.
28+
29+
If the intent is ambiguous, use `AskUserQuestion` to clarify with a high-level question about what they're building — not which subcommand they want.
30+
31+
### Step 2: Gather Missing Parameters
32+
33+
Use `AskUserQuestion` to collect only what you cannot infer. Batch questions into a single call when possible. Do NOT ask for optional parameters (description, output directory, application ID, etc.) unless the user brings them up.
34+
35+
### Step 3: Create and Set Up
36+
37+
1. Create the project using the Very Good CLI MCP server
38+
2. Install dependencies using the Very Good CLI MCP server
39+
40+
---
41+
42+
## Key Domain Knowledge
43+
44+
- Use `dart_package` (not `flutter_package`) for data layer and repository layer packages in the **layered-architecture** pattern — these must not depend on Flutter SDK
45+
- If a user provides a project name with dashes, convert to underscores — Dart package names only allow lowercase letters, numbers, and underscores
46+
- Templates that produce apps, plugins, or games require an organization name — do not skip this or it defaults to a placeholder value
47+
48+
---
49+
50+
## Examples
51+
52+
### User says "Create a new Flutter app"
53+
54+
1. Infer: `flutter_app`
55+
2. Ask for project name and organization
56+
3. Create and install dependencies
57+
58+
### User says "I need a package for my weather API client, put it in packages/"
59+
60+
1. Infer: "API client" → pure Dart → `dart_package`, name `weather_api_client`, output `packages/`
61+
2. Everything is clear — no questions needed
62+
3. Create and install dependencies
63+
64+
### User says "I want to build something for iOS and Android with bluetooth"
65+
66+
1. Ambiguous: app or plugin? Ask to clarify
67+
2. Gather remaining parameters based on answer
68+
3. Create and install dependencies
69+
70+
### User says "Create a new package"
71+
72+
1. Ambiguous: Flutter or pure Dart? Ask to clarify
73+
2. Ask for project name
74+
3. Create and install dependencies
75+
76+
---
77+
78+
## Troubleshooting
79+
80+
### Invalid project name error
81+
82+
- Names must be valid Dart package names: lowercase letters, numbers, underscores only
83+
- Dashes are not allowed — convert `my-app` to `my_app`
84+
85+
### Dependencies fail to install after creation
86+
87+
- Verify the Dart SDK is installed and on PATH
88+
- Try running from the project root directory
89+
90+
---
91+
92+
## Anti-Patterns
93+
94+
| Anti-Pattern | Problem | Correct Approach |
95+
| --- | --- | --- |
96+
| Asking user to pick a template name | Users think in terms of what they're building, not CLI subcommands | Infer the template from context |
97+
| Over-asking for optional parameters | Slows down the workflow | Only ask for what you cannot infer |
98+
| Using `flutter_package` for a data layer | Adds unnecessary Flutter SDK dependency | Use `dart_package` for data and repository layer packages |
99+
| Skipping organization name for apps/plugins | Defaults to a placeholder value | Ask when the template requires it |

0 commit comments

Comments
 (0)