Skip to content

Commit cc71518

Browse files
ryzizubclaude
andcommitted
feat: add create-project skill
Adds a new skill that scaffolds Dart/Flutter projects using the Very Good CLI MCP server. The skill infers the right template from user intent, gathers only missing parameters via AskUserQuestion, and installs dependencies after creation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 48aa661 commit cc71518

4 files changed

Lines changed: 120 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` |
@@ -81,6 +82,7 @@ For example:
8182
You can also invoke skills directly as slash commands:
8283

8384
```bash
85+
/vgv-create-project
8486
/vgv-accessibility
8587
/vgv-bloc
8688
/vgv-internationalization

skills/create-project/SKILL.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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: AskUserQuestion,mcp__very-good-cli__create,mcp__very-good-cli__packages_get,Read,Glob,Grep
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 create projects and install dependencies** — never run CLI commands via shell
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 template from the user's description. Do NOT ask users to pick a template name — figure it out from context:
28+
29+
| User intent | Template |
30+
| --- | --- |
31+
| Building a mobile/web/desktop app | `flutter_app` |
32+
| Building a reusable library that uses Flutter widgets | `flutter_package` |
33+
| Building a reusable library with pure Dart (no Flutter) | `dart_package` |
34+
| Building a plugin that wraps platform-specific APIs | `flutter_plugin` |
35+
| Building a command-line tool | `dart_cli` |
36+
| Building a 2D game | `flame_game` |
37+
| Building a documentation site | `docs_site` |
38+
39+
If the intent is ambiguous, use `AskUserQuestion` to clarify with a high-level question about what they're building — not which template they want.
40+
41+
### Step 2: Gather Missing Parameters
42+
43+
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.
44+
45+
### Step 3: Create and Set Up
46+
47+
1. Create the project using the Very Good CLI MCP server
48+
2. Install dependencies using the Very Good CLI MCP server
49+
3. Suggest relevant follow-up skills (**layered-architecture**, **bloc**, **testing**, etc.)
50+
51+
---
52+
53+
## Key Domain Knowledge
54+
55+
- 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
56+
- If a user provides a project name with dashes, convert to underscores — Dart package names only allow lowercase letters, numbers, and underscores
57+
- Templates that produce apps, plugins, or games require an organization name — do not skip this or it defaults to `com.example.verygoodcore`
58+
59+
---
60+
61+
## Examples
62+
63+
### User says "Create a new Flutter app"
64+
65+
1. Infer: `flutter_app`
66+
2. Ask for project name and organization
67+
3. Create, install dependencies, suggest **layered-architecture** and **bloc**
68+
69+
### User says "I need a package for my weather API client, put it in packages/"
70+
71+
1. Infer: "API client" → pure Dart → `dart_package`, name `weather_api_client`, output `packages/`
72+
2. Everything is clear — no questions needed
73+
3. Create and install dependencies
74+
75+
### User says "I want to build something for iOS and Android with bluetooth"
76+
77+
1. Ambiguous: app or plugin? Ask to clarify
78+
2. Gather remaining parameters based on answer
79+
3. Create and install dependencies
80+
81+
### User says "Create a new package"
82+
83+
1. Ambiguous: Flutter or pure Dart? Ask to clarify
84+
2. Ask for project name
85+
3. Create and install dependencies
86+
87+
---
88+
89+
## Troubleshooting
90+
91+
### MCP server not connected
92+
93+
- Verify the Very Good CLI MCP server is running
94+
- Confirm `very_good` is installed: `dart pub global activate very_good_cli`
95+
- Confirm `very_good` is on PATH
96+
97+
### Invalid project name error
98+
99+
- Names must be valid Dart package names: lowercase letters, numbers, underscores only
100+
- Dashes are not allowed — convert `my-app` to `my_app`
101+
102+
### Dependencies fail to install after creation
103+
104+
- Verify the Dart SDK is installed and on PATH
105+
- Try running from the project root directory
106+
107+
---
108+
109+
## Anti-Patterns
110+
111+
| Anti-Pattern | Problem | Correct Approach |
112+
| --- | --- | --- |
113+
| Asking user to pick a template name | Users think in terms of what they're building, not CLI subcommands | Infer the template from context |
114+
| Over-asking for optional parameters | Slows down the workflow | Only ask for what you cannot infer |
115+
| Using `flutter_package` for a data layer | Adds unnecessary Flutter SDK dependency | Use `dart_package` for data and repository layer packages |
116+
| Skipping organization name for apps/plugins | Defaults to `com.example.verygoodcore` | Ask when the template requires it |

0 commit comments

Comments
 (0)