Files
cursor_gen/flutter-cursor-templates/generator
mansi.kansara 3ee83389bd feat(build): add /build skill — universal TDD-first feature implementation command
Adds a Cursor slash command that implements any feature end-to-end:
deep research → TDD (Red/Green/Refactor) → integration test generation
with device pause gate → external setup checklist → verified PR.

Includes a FEATURE_REGISTRY covering 7 feature types (notifications,
auth, payments, deep links, analytics, storage, camera/media) with
per-type test scenarios, external setup steps, and files-to-touch.
Stack-aware: adapts to architecture, state management, backend,
platforms, and e2e tool from project-brief.yaml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 12:13:32 +05:30
..

cursor_gen

CLI that generates project-specific Cursor AI configuration for Flutter projects from a project-brief.yaml file (stack, architecture, routing, backends, testing, and more).

Requirements

  • Dart SDK >=3.3.0 <4.0.0

Install

Install the CLI globally so you can run cursor_gen from any Flutter project.

From pub.dev:

dart pub global activate cursor_gen

From Git:

dart pub global activate --source git https://github.com/company/flutter-cursor-templates --git-path generator

From a local checkout:

cd flutter-cursor-templates/generator
dart pub global activate --source path .

If your shell cannot find cursor_gen, add Dart's global bin directory to your PATH:

export PATH="$PATH":"$HOME/.pub-cache/bin"

For zsh, add that line to ~/.zshrc and restart your terminal.

From a private Pub registry: configure access first, then activate from that registry:

dart pub token add https://your-registry.example.com
dart pub global activate cursor_gen --hosted-url=https://your-registry.example.com

Setup In Your Flutter Project

Create a project-brief.yaml:

cursor_gen --wizard

Or copy the example brief and edit it:

cp path/to/flutter-cursor-templates/example-project/project-brief.yaml .

Validate the brief, then generate .cursor/:

cursor_gen --validate
cursor_gen

Usage

cursor_gen --help
cursor_gen --validate --brief project-brief.yaml
cursor_gen --brief project-brief.yaml --output .cursor
cursor_gen --refresh   # regenerate while preserving custom/ and CURSOR:CUSTOM blocks
cursor_gen --wizard    # interactive project-brief.yaml creator

Minimal project-brief.yaml

project:
  name: MyApp
  package: com.example.myapp
  scale: medium
stack:
  state_management: bloc
  architecture: clean
  routing: gorouter
  platforms: [ios, android]
  backend: firebase
  auth: firebase_auth

Use brief-schema.json in this package for IDE validation and autocomplete of the full schema.

Repository

For full monorepo layout, template library, and architecture notes, see the parent repository README.