Agent skill

Solid

by nank1ro in nank1ro/solid

PRIORITY — read this skill FIRST before writing Dart code when pubspec.yaml declares solidannotations or solidgenerator.

MITAuto-check passedMobile

Install Solid

skills CLI
$ npx skills add nank1ro/solid --skill solid -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nank1ro/solid solid --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nank1ro/solid.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/solid .claude/skills/solid && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
solid
GitHub stars
165
Token cost
~3.1k tokens
SKILL.md length
1,327 words
Files
38 (incl. scripts, references, assets)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

PRIORITY — read this skill FIRST before writing Dart code when pubspec.yaml declares solidannotations or solidgenerator.

  • Works in 5 steps: flutter pub add solid_annotations… → dart pub add --dev solid_generator… → Create build.yaml at the project root… → …
  • ANY of these appear: solidannotations/solidgenerator in pubspec
  • SKILL.md covers Step 0 — Is this project Solid?, Cardinal rule, Decision shortcuts and Third-party packages:…, plus 9 more sections
  • Runs Dart scripts from its folder; calls dart and flutter

What it does

Solid is an agent skill from nank1ro/solid. PRIORITY — read this skill FIRST before writing Dart code when pubspec.yaml declares solidannotations or solidgenerator. In these projects Flutter conventions are inverted: lib/ is buildrunner output from source/; editing lib/ is destroyed on next build. Without this skill you WRITE TO THE WRONG DIRECTORY and silently lose work. Use whenever ANY of these appear: solidannotations/solidgenerator in pubspec; @SolidState/@SolidEffect/@SolidQuery/@SolidEnvironment/.untracked in the user's message or code; "my lib/…

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 45 other files, including scripts, reference files and assets (for example `assets/AGENTS.md`, `evals/evals.json` and `evals/files/eval-1/analysis_options.yaml`).

It sits in Mobile, covering Cross-platform mobile apps and Project scaffolding. It works with Flutter and Dart. The repository describes itself as: A tiny framework built on top of Flutter, zero boilerplate, fine-grained reactivity. The licence is MIT.

When your agent uses it

  • ANY of these appear: solidannotations/solidgenerator in pubspec
  • @SolidState/@SolidEffect/@SolidQuery/@SolidEnvironment/.untracked in the users message
  • My lib/ edits keep disappearing
  • Add/scaffold a widget/page/route/model/controller in such a project

Example prompts

  • “s message or code;”
  • “add/scaffold a widget/page/route/model/controller”
  • “when X changes fetch Y”
  • “/solid”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. flutter pub add solid_annotations flutter_solidart provider
  2. dart pub add --dev solid_generator build_runner
  3. Create build.yaml at the project root (or extend the existing one)
  4. In analysis_options.yaml, add analyzer.errors.must_be_immutable: ignore (your source widgets are mutable; the generated ones are immutable).
  5. Run dart run build_runner watch during development.

What it can do on your machine

Read from SKILL.md and the folder at commit c6a15d3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Dart, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • dart
    • flutter

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • solid.mariuti.com
    • pub.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Solid loads about 3.1k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 254 tokens; SKILL.md has 1,327 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~254
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~11k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from nank1ro/solid at commit c6a15d3, republished under its MIT licence (© nank1ro). 1,327 words, ~3,075 tokens.

Download SKILL.mdSave it as .claude/skills/solid/SKILL.md (or your agent's skills folder). This skill also uses 37 other files; get the full folder from GitHub.
name
solid
description
PRIORITY — read this skill FIRST before writing Dart code when `pubspec.yaml` declares `solid_annotations` or `solid_generator`. In these projects Flutter conventions are inverted: `lib/` is build_runner output from `source/`; editing `lib/` is destroyed on next build. Without this skill you WRITE TO THE WRONG DIRECTORY and silently lose work. Use whenever ANY of these appear: `solid_annotations`/`solid_generator` in pubspec; `@SolidState`/`@SolidEffect`/`@SolidQuery`/`@SolidEnvironment`/`.untracked` in the user's message or code; "my lib/ edits keep disappearing"; "add/scaffold a widget/page/route/model/controller" in such a project; reactive patterns (debounce, "when X changes fetch Y", "make reactive"); or installing pub packages (go_router, freezed, riverpod, drift, json_serializable) whose docs say `lib/` — substitute `source/`. Annotation contract (`@SolidQuery` no params, `@SolidEnvironment` needs `late`) is non-obvious. NOT for SolidJS/Solid.js or Flutter projects without those packages.

Solid (Flutter)

Solid is a tiny framework on top of Flutter. You write reactive state directly on a StatelessWidget in source/; the solid_generator build_runner builder transpiles each source/<x>.dart into lib/<x>.dart, turning your class into a StatefulWidget with Signal/Computed/Effect/Resource plumbing from flutter_solidart. Inspired by SwiftUI (@Environment) and SolidJS (fine-grained reactivity).

User-facing docs: https://solid.mariuti.com.

Step 0 — Is this project Solid?

Before doing anything, decide if the project actually uses Solid. The user may not say "Solid" anywhere — and an existing lib/ directory plus solid_annotations/solid_generator not being in pubspec means this is not a Solid project.

Run this check first:

bash
grep -E '^\s*(solid_annotations|solid_generator):' pubspec.yaml
  • Match found → this is a Solid project. Follow this skill.
  • No match → not a Solid project. Don't apply Solid conventions. Skip this skill.

The same check via Read tool works too: read pubspec.yaml and look for either package name under dependencies: or dev_dependencies:. A Solid setup typically has solid_annotations (runtime) under dependencies and solid_generator plus build_runner under dev_dependencies.

Cardinal rule

Edit source/<x>.dart. Never edit lib/<x>.dart.

In Flutter, lib/ is where you write code. In Solid, lib/ is generated output — every time build_runner runs, it overwrites lib/<x>.dart from source/<x>.dart. Hand-edits to lib/ are lost on the next build. The user-facing entry point is source/main.dart; lib/main.dart is generated.

This inverts Flutter muscle memory. The rest of the Flutter ecosystem (flutter run, pub packages, IDE templates, every tutorial on the internet) assumes lib/ is the source of truth. In this project it isn't. Apply the substitution everywhere.

Decision shortcuts

SituationWhat to do
About to write to a file under lib/Stop. Find or create the matching source/<x>.dart and write there.
User asks to "add a widget / page / button / form"Create source/<snake_name>.dart. Use @SolidState for fields you'll mutate.
User asks to "fetch X when Y changes"@SolidState for the input Y, @SolidQuery (no parameters) for the fetch. Body reads Y to register the dependency.
User asks to install a pub package whose README says "create lib/<x>.dart"Substitute source/ for lib/ in every file-creation step. See references/third-party-packages.md.
User says "I edited lib/foo.dart and the change disappeared"The lib/ write is the bug, not build_runner. Migrate the change to source/foo.dart, then regenerate.
build_runner output looks unpolished (no const, unused imports)Run scripts/verify.sh, which chains dart fix --apply after build_runner.
build_runner failsRun scripts/verify.sh from the package root — it surfaces the first [SEVERE] line.

Third-party packages: substitute source/ for lib/

When the user (or another AI) installs a new pub package, the package's README, examples, and any AI-generated setup instructions will all assume lib/ is the source of truth. In a Solid project that assumption is wrong.

Rule of thumb: the package itself stays in pubspec.yaml as the docs describe. Only the files you write that import it move from lib/ to source/. Examples:

  • go_router README says "create lib/router.dart" → create source/router.dart instead, and import it from source/main.dart via a relative path.
  • freezed says "create lib/models/user.dart" → create source/models/user.dart. Freezed's own *.freezed.dart generated output still lands wherever build.yaml puts it (typically next to the source file under lib/, since freezed reads from lib/); but in a Solid project you want freezed to read from source/ too. Add source/** to freezed's build.yaml sources list (Solid's setup already does this — keep it).
  • riverpod generator says "create lib/providers/..." → create source/providers/....
  • drift says "create lib/database.dart" → create source/database.dart.

For the full list and per-package gotchas, read references/third-party-packages.md.

The key thing to tell yourself: "the docs say lib/. In this project, that means source/."

Same-package imports must be relative

Inside a source/ file, reference other source files via relative paths (../controllers/foo.dart), never via package:<self>/foo.dart. The package: form resolves to lib/ (the generated realm), pointing your source file at lowered Signal types — the generator now rejects it at build time. Cross-package imports (flutter, solid_annotations, provider, third-party) keep the package: form as usual.

Annotation cheat sheet

Each annotation goes on a class member of a StatelessWidget (or any class — @SolidEnvironment also works in State<X>). The generator turns the widget into a StatefulWidget under the hood.

  • @SolidState() — reactive state. Docs: https://solid.mariuti.com/guides/state.

    • Valid on: instance field with initializer, late non-nullable instance field, nullable instance field, instance getter (derived state).
    • Invalid: final, const, static, setter, method, top-level.
    • Example: @SolidState() int counter = 0; or @SolidState() int get doubleCounter => counter * 2;.
  • @SolidEffect() — side effect that re-runs whenever its tracked dependencies change. Docs: https://solid.mariuti.com/guides/effect.

    • Valid on: instance method returning void.
    • Example: @SolidEffect() void logCounter() { print('Counter: $counter'); }.
  • @SolidQuery() — reactive async/stream resource. Docs: https://solid.mariuti.com/guides/query.

    • Valid on: instance method returning Future<T> or Stream<T>. No parameters.
    • Call site fetchData() returns a Resource<T> exposing .when(ready:, loading:, error:), .maybeWhen(...), .isRefreshing, .refresh().
    • Options: debounce: Duration(...), useRefreshing: false.
    • Read @SolidState fields from the body to make the query react to them.
  • @SolidEnvironment() — inject a value from the widget tree (SwiftUI-style). Docs: https://solid.mariuti.com/guides/environment.

    • Valid on: late field on a StatelessWidget or State<X>.
    • Bound on first access to the nearest ancestor Provider<T>.
    • Provide via .environment<T>() extension shipped by solid_annotations, or Provider<T> from package:provider.

For full target rules per annotation, read references/annotation-contract.md. For canonical idioms, read references/patterns.md.

Show full SKILL.md (513 more words)Show less

Untracked reads

By default every read of a @SolidState field inside build, @SolidEffect, or @SolidQuery registers a dependency. Two opt-outs:

  • Automatic: reads inside callback parameters whose name starts with on (onPressed, onTap, onChanged, …) are untracked — Solid recognizes user-interaction handlers and doesn't subscribe.
  • Manual read: append .untracked to the field. Common use: key: ValueKey(counter.untracked).

In string interpolations, only the long form works: '${counter.untracked}'. The short form '$counter.untracked' parses as ${counter} followed by a literal suffix (still tracked).

To write a signal inside a @SolidEffect without the write re-triggering the effect (required for collection signals, whose element-writes self-subscribe), read the deps first, then wrap the write in the untracked(() => …) function: final c = counter; untracked(() => history = [...history, c]);. Don't wrap the whole body — that untracks the dependency reads too. See references/patterns.md §8.

Docs: https://solid.mariuti.com/guides/untracked.

Setup checklist (fresh project)

If pubspec.yaml doesn't yet declare Solid, install it:

  1. flutter pub add solid_annotations flutter_solidart provider
  2. dart pub add --dev solid_generator build_runner
  3. Create build.yaml at the project root (or extend the existing one):
    yaml
    targets:
      $default:
        sources:
          - source/**
          - lib/**
          - $package$
  4. In analysis_options.yaml, add analyzer.errors.must_be_immutable: ignore (your source widgets are mutable; the generated ones are immutable).
  5. Run dart run build_runner watch during development.

Verify your changes

After writing or editing source/, regenerate lib/ and apply lint fixes:

  • scripts/verify.sh — run from any package root. Runs dart run build_runner build, then dart fix --apply on the package (adds const, removes unused imports, applies relative-import lints). Prints PASS/FAIL plus the first [SEVERE] error on failure. Exit code reflects build_runner success; dart fix failure is non-fatal.

Why dart fix --apply matters: the generator prioritises correct, runnable code over polish. The emitted lib/ may miss const opportunities, leave unused imports, or pick a non-preferred import form. dart fix --apply cleans this up using the project's lint rules (prefer_const_constructors, unnecessary_import, prefer_relative_imports, …). Always run it after generation — in CI too.

Hot reload

flutter run does not auto-reload when build_runner rewrites lib/ (no IDE save event fires for filesystem changes). Two workflows:

  • Press r in the flutter run terminal after build_runner emits.
  • Use dashmonx — wraps flutter run and triggers hot reload on lib/ changes. Any flutter run flag passes through, e.g. dashmonx -d chrome.

Common mistakes

  • Writing to a file under lib/. Always under source/. (The single hardest rule to internalise.)
  • Following a pub-package README literally when it says lib/. Substitute source/. See references/third-party-packages.md.
  • Adding final or static to a @SolidState field. The generator rejects it.
  • Giving @SolidQuery parameters. Use @SolidState fields as inputs — the query re-runs when they change.
  • Importing same-package files via package:<self>/... from inside source/. Use relative paths.
  • Expecting flutter run to pick up build_runner output without r or dashmonx.
  • Treating must_be_immutable lint as a real error — your widgets are mutable; the generated ones are immutable. Set must_be_immutable: ignore.

Helper scripts

  • scripts/verify.sh — described above.
  • scripts/scaffold-widget.sh <PascalName> [--state|--query|--env] — writes a starter source/<snake_case>.dart with the right boilerplate. Refuses to overwrite.

Where to read more

  • Canonical docs: https://solid.mariuti.com
  • Annotation valid/invalid targets: references/annotation-contract.md
  • Canonical idioms (counter, computed, effect, query, environment, untracked): references/patterns.md
  • Error symptom → cause → fix: references/troubleshooting.md
  • Third-party package redirect catalogue: references/third-party-packages.md
  • Working example: https://github.com/nank1ro/solid/tree/main/example/source

© nank1ro, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 37 other files (scripts, references, assets) in skills/solid of nank1ro/solid.

  • SKILL.md
  • assets/AGENTS.md
  • evals/evals.json
  • evals/files/eval-1/analysis_options.yaml
  • evals/files/eval-1/build.yaml
  • evals/files/eval-1/pubspec.yaml
  • evals/files/eval-1/source/main.dart
  • evals/files/eval-2/analysis_options.yaml
  • evals/files/eval-2/build.yaml
  • evals/files/eval-2/pubspec.yaml
  • evals/files/eval-2/source/main.dart
  • evals/files/eval-2/source/posts_page.dart
  • evals/files/eval-3/analysis_options.yaml
  • … and 25 more

Open the folder on GitHubat commit c6a15d3

Compare with similar skills

Solid next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Solid compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Solid this skillnank1ro/solid165—~3.1kAutomated safety check: PassMIT
Flutter Appccplugins/awesome-claude-code-plugins968—~1.1kAutomated safety check: NotesApache-2.0
Core API Changelibnativeapi/nativeapi161—~2.5kAutomated safety check: PassMIT
Frb Upgrade Flutterfzyzcjy/flutter_rust_bridge5.4k—~1.7kAutomated safety check: PassMIT
Create ProjectVeryGoodOpenSource/vgv-ai-flutter-plugin169—~1.2kAutomated safety check: PassMIT
Update Dependenciessesori-ai/sesori_apps_monorepo126—~7.8kAutomated safety check: PassCustom licence

Similar skills

  • Flutter App

    ccplugins/awesome-claude-code-plugins

    Bootstrap a new Flutter mobile app with clean architecture, Riverpod, FVM-pinned SDK, current packages, and no deprecated APIs.

    968 GitHub stars~1.1k tokensUpdated 1 mo ago
    MobileAuto-check: notes
  • Core API Change

    libnativeapi/nativeapi

    Carry a change to the C++ public API in core/ all the way downstream — design check, header edit, six platform implementations, C ABI + Rust/Dart/C/JS/Python regeneration, per-binding verification…

    161 GitHub stars~2.5k tokensUpdated today
    MobileAuto-check passed
  • Frb Upgrade Flutter

    fzyzcjy/flutter_rust_bridge

    Upgrade flutterrustbridge to a new Flutter stable release. An agent skill from fzyzcjy/flutter_rust_bridge.

    5.4k GitHub stars~1.7k tokensUpdated today
    MobileAuto-check passed
  • Create Project

    VeryGoodOpenSource/vgv-ai-flutter-plugin

    Scaffold a new Dart or Flutter project from a Very Good CLI template, covering the flutterapp, dartpackage, flutterpackage, flutterplugin, dartcli, flamegame, and docssite templates, inferring the…

    169 GitHub stars~1.2k tokensUpdated 2 days ago
    MobileAuto-check passed
  • Update Dependencies

    sesori-ai/sesori_apps_monorepo

    Weekly dependency update workflow for Sesori Apps Monorepo. An agent skill from sesori-ai/sesori_apps_monorepo.

    126 GitHub stars~7.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Engine Whats New

    flutter/flutter

    Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44).

    179k GitHub stars~978 tokensUpdated today
    MobileAuto-check passed

Works with

Categories

Questions about Solid

What does Solid do?

PRIORITY — read this skill FIRST before writing Dart code when pubspec.yaml declares solidannotations or solidgenerator. Solid is an agent skill from nank1ro/solid.yaml declares solidannotations or solidgenerator.

When should I use Solid?

Solid fits situations like: ANY of these appear: solidannotations/solidgenerator in pubspec; @SolidState/@SolidEffect/@SolidQuery/@SolidEnvironment/.untracked in the users message; my lib/ edits keep disappearing; add/scaffold a widget/page/route/model/controller in such a project.

How do I install Solid in Claude Code?

Run `npx skills add nank1ro/solid --skill solid -a claude-code`. Or copy the skill folder (skills/solid in nank1ro/solid) into .claude/skills/solid in your project. Claude Code loads it when a task matches its description.

How do I install Solid in Codex?

Run `npx skills add nank1ro/solid --skill solid -a codex`. Or copy the skill folder (skills/solid in nank1ro/solid) into .agents/skills/solid in your project. Codex loads it when a task matches its description.

Can I use Solid in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nank1ro/solid --skill solid -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/solid, .gemini/skills/solid, .github/skills/solid and .opencode/skills/solid in your project.

What does Solid need to run?

Going by SKILL.md and its folder, Solid needs Dart for the scripts in its folder and the command-line tools its instructions call (dart and flutter).

Does Solid access the network?

SKILL.md names 2 domains. As links in the text: solid.mariuti.com and pub.dev. This is read from the text; nothing was executed.

Is Solid safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Solid use?

Solid is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Solid use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.6k tokens, read only when the agent opens those files.

What are the alternatives to Solid?

Skills that share tags, products or a category with Solid: Flutter App (ccplugins/awesome-claude-code-plugins, 968 stars), Core API Change (libnativeapi/nativeapi, 161 stars), Frb Upgrade Flutter (fzyzcjy/flutter_rust_bridge, 5.4k stars) and Create Project (VeryGoodOpenSource/vgv-ai-flutter-plugin, 169 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Solid?

nank1ro (a GitHub user) maintains it in nank1ro/solid, which has 165 GitHub stars. The repository was last updated on September 1, 2026.

Source: nank1ro/solid on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.