Repository navigation
feat: Add package skills for the Flame CLI and Flame best practices - #4223
Merged
Merged
Conversation
Adds two package skills to the flame package, which consumers install with `dart run skills get`: - flame-cli: How to use the flame command to create, run, look at, inspect, control and play a game. - flame-best-practices: Rules for structuring a Flame 2 game, the component lifecycle, input, collisions, assets, effects, overlays, performance, hot reload and testing. The skills are validated by skills_lint in test/skills_lint_test.dart.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The CLI guidance contains incorrect reload and input workflows, unreliable startup and failure handling, and misleading JSON output claims.
7 open issues
Document JSON output exceptions for events and command failures · New Bound startup polling and report failures · New Verify Flame readiness and scene readiness before interaction · New Use a merging reload to capture constructor and onLoad edits · New Keep keys pressed until after stepping the paused game · New Preserve assertion failures while stopping the game · New Avoid machine mode for commands that require normal flame run · New
What changed in this PR
Adds installable AI-agent skills to the flame package, covering Flame 2 development practices and CLI workflows for creating, running, and inspecting games.
Changes:
- Adds best-practices and CLI skills, including a command reference.
- Adds skill validation configuration, a development dependency, and a test.
- Documents skill installation in the root README.
| File | Description |
|---|---|
README.md |
Documents available skills and installation commands. |
packages/flame/test/skills_lint_test.dart |
Validates skill configuration and content. |
packages/flame/skills/flame-cli/SKILL.md |
Describes CLI workflows for development and game inspection. |
packages/flame/skills/flame-cli/references/commands.md |
Provides command, option, and output references. |
packages/flame/skills/flame-best-practices/SKILL.md |
Documents Flame 2 patterns and examples. |
packages/flame/skills_lint.yaml |
Configures skill naming, links, and publication checks. |
packages/flame/pubspec.yaml |
Adds the skills_lint development dependency. |
Review effort: Balanced
Bound the startup wait and wait for a loaded component, document the JSON output exceptions, run the merging reload instead of a plain one, hold keys while stepping, keep the assertion exit code in the end to end check, and stop recommending --machine for flame run.
1 task done
|
It would be great if each package had its own skills, making it easier for both AI and developers to provide context and build faster. |
ufrshubham
approved these changes
Nov 16, 2026
ufrshubham
left a comment
Member
There was a problem hiding this comment.
LGTM! Just needs some points for the culling APIs
LordixDemon
added a commit
to LordixDemon/flame
that referenced
this pull request
Nov 17, 2026
Brings in the upstream fix for findPostProcessFromContext (flame-engine#4221), the package skills (flame-engine#4223) and documentation link fixes (flame-engine#4234, flame-engine#4235). The only conflict was in post_process_component.dart: the fork's own lookup through CameraComponent.currentCamera is replaced by upstream's walk over CameraComponent.currentCameras, and the camera import that the upstream version no longer needs is dropped. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This adds package skills to the
flamepackage, so that AIcoding agents in a Flame project can install them with
dart run skills getand follow them.The skills live in
packages/flame/skills/since a game depends onflamedirectly, whileflame_cliis usually activated globally and would not be picked up by the installer.flame-cli: How to use theflamecommand to create a game and to run, look at, inspect,control and play it. It has rules such as starting the game with
flame runin the background,using
--jsonand the exit codes, pausing before snapshots, usingflame waitinstead ofsleeping and when to use
reload --merge, and walks through the common tasks. A condensedreference of every command and option is in
references/commands.md.flame-best-practices: Rules for building a Flame 2 game, covering the game structure with theworld, camera and viewport, the component lifecycle, input, collision detection, assets with
full paths, effects and timers, overlays and routing, performance (with a section on not
creating objects in
updateandrender), hot reload shadows, testing withflame_test, andthe removed Flame 1 APIs to avoid.
The code examples in the skills use primary constructors, since
flame_lintenablesuse_primary_constructors, and they passflutter analyzewithflame_lint.skills_lintis added as a development dependency offlame, configured inskills_lint.yaml,and run by
test/skills_lint_test.dart. It checks the skill names, the frontmatter, that everyrelative link resolves within its skill, and that
dart pub publishincludes the skills.The root README, which is also the README of the
flamepackage, gets a section about the skillsthat tells agents to install them with
dart run skills@ get.Checklist
docsand added dartdoc comments with///.examplesordocs.Breaking Change?
Related Issues