Agent skill

Fjson Dart Bean Generator

by K3vinb5 in K3vinb5/unyo-app

Generate Dart bean classes from JSON and regenerate serialization helpers using the fjson CLI.

BSD-3-ClauseAuto-check passedMobile

Install Fjson Dart Bean Generator

skills CLI
$ npx skills add K3vinb5/unyo-app --skill fjson-dart-bean-generator -a claude-code

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

GitHub CLI
$ gh skill install K3vinb5/unyo-app fjson-dart-bean-generator --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/K3vinb5/unyo-app.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/fjson-dart-bean-generator .claude/skills/fjson-dart-bean-generator && 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
fjson-dart-bean-generator
GitHub stars
662
Token cost
~2.2k tokens
SKILL.md length
764 words
Files
2
Skills in repo
7
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Generate Dart bean classes from JSON and regenerate serialization helpers using the fjson CLI.

  • Works in 4 steps: Regenerates each .g.dart file in… → Rebuilds… → Rebuilds… → …
  • The user needs to create Dart models from API JSON responses
  • SKILL.md covers Two Commands, fjson bean — Generate a new…, fjson gen — Regenerate all… and Generated File Layout in unyo, plus 3 more sections
  • Calls java and flutter

What it does

Fjson Dart Bean Generator is an agent skill from K3vinb5/unyo-app. Generate Dart bean classes from JSON and regenerate serialization helpers using the fjson CLI. Use this skill whenever the user needs to create Dart models from API JSON responses, generate @JsonSerializable entity classes, or regenerate .g.dart helper files. Also use when the user mentions FlutterJsonBeanFactory, fjson, jsontodart, JSON serialization, @JSONField, @JsonSerializable, or needs to add new API response DTOs to the unyo project.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.

It sits in Mobile, covering Cross-platform mobile apps. It works with Dart. The repository describes itself as: 🐙 Anime streaming and Manga reader desktop app without ads. The licence is BSD-3-Clause.

When your agent uses it

  • The user needs to create Dart models from API JSON responses
  • Generate @JsonSerializable entity classes
  • Regenerate .g.dart helper files
  • The user mentions FlutterJsonBeanFactory

Example prompts

  • “/fjson-dart-bean-generator”

Workflow steps

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

  1. Regenerates each .g.dart file in lib/generated/json/
  2. Rebuilds lib/generated/json/base/json_field.dart (annotation definitions)
  3. Rebuilds lib/generated/json/base/json_convert_content.dart (the JsonConvert runtime and JsonConvertClassCollection registry with all…
  4. Deletes any stale .g.dart files for entities that no longer exist

What it can do on your machine

Read from SKILL.md and the folder at commit 0a44722. 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

    Shell commands in SKILL.md call:

    • java
    • flutter

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

  • Network

    No URLs in SKILL.md.

    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

Fjson Dart Bean Generator loads about 2.2k tokens when it runs. Until then it costs about 118 tokens; SKILL.md has 764 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~118
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from K3vinb5/unyo-app at commit 0a44722, republished under its BSD-3-Clause licence (© K3vinb5). 764 words, ~2,153 tokens.

Download SKILL.mdSave it as .claude/skills/fjson-dart-bean-generator/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
fjson-dart-bean-generator
description
Generate Dart bean classes from JSON and regenerate serialization helpers using the fjson CLI. Use this skill whenever the user needs to create Dart models from API JSON responses, generate @JsonSerializable entity classes, or regenerate .g.dart helper files. Also use when the user mentions FlutterJsonBeanFactory, fjson, json_to_dart, JSON serialization, @JSONField, @JsonSerializable, or needs to add new API response DTOs to the unyo project.

fjson CLI — Dart Bean Generator

The fjson CLI generates @JsonSerializable Dart entity classes from JSON responses and regenerates .g.dart serialization helpers, json_field.dart, and json_convert_content.dart. It replaces the FlutterJsonBeanFactory IntelliJ plugin for CLI/agent workflows.

The bundled JAR lives inside this skill directory: fjson-cli.jar. Invoke it as:

bash
java -jar <path-to-skill>/fjson-cli.jar <command> [options]

When running from the unyo project root, the skill is at .agents/skills/fjson-dart-bean-generator/:

bash
java -jar .agents/skills/fjson-dart-bean-generator/fjson-cli.jar <command> [options]

If you need to rebuild the JAR (rare — only after modifying fjson-cli source):

bash
cd ../fjson-cli && ./gradlew jar
# Then copy the new JAR into the skill:
cp ../fjson-cli/build/libs/fjson-cli.jar .agents/skills/fjson-dart-bean-generator/fjson-cli.jar

Two Commands

CommandPurposeWhen to use
fjson beanCreate a new entity .dart file from JSONUser provides a class name + JSON (string or file)
fjson genRegenerate all .g.dart helpers, json_field.dart, json_convert_content.dartAfter adding/modifying any @JsonSerializable class

Important: fjson bean automatically runs fjson gen when invoked inside a Flutter project (one with a pubspec.yaml). You do NOT need to run gen separately after bean.

fjson bean — Generate a new entity from JSON

Required flags
FlagDescriptionExample
--class <Name>Root class name (use the API response root name)--class MediaResponse
--json <string>Raw JSON string--json '{"id":1,"title":"..."}'
--file <path>Path to a .json file (alternative to --json)--file response.json
Optional flags
FlagDescriptionDefaultWhen to use
--output <path>Directory for the generated .dart file./libDirect entity to correct DTO subfolder
--suffix <text>Suffix appended to generated class namesentityLeave as default for unyo
--nullableMake fields nullable (Type?)offRarely needed in unyo
--set-defaultAssign default values to primitive fieldsoffAlways use this for unyo DTOs
--project <path>Flutter project root.Usually not needed from unyo root
Typical unyo invocation
bash
java -jar .agents/skills/fjson-dart-bean-generator/fjson-cli.jar bean \
  --class MediaCollectionResponse \
  --json '<paste JSON here>' \
  --output ./lib/core/services/api/dto/anilist/ \
  --set-default

Or from a file:

bash
java -jar .agents/skills/fjson-dart-bean-generator/fjson-cli.jar bean \
  --class AnizipEpisodeInfo \
  --file ./response.json \
  --output ./lib/core/services/api/dto/anizip/ \
  --set-default
What gets generated

The command produces a .dart file containing:

  • A root @JsonSerializable() class with --suffix appended (e.g., MediaCollectionResponse → MediaCollectionResponseEntity)
  • Nested @JsonSerializable() classes for each nested JSON object (e.g., MediaCollectionResponseDtoPage)
  • @JSONField(name: 'original_key') annotations for keys whose Dart naming differs from JSON
  • late fields with default values (if --set-default)
  • fromJson() factory and toJson() method stubs
  • import of json_field.dart and the matching .g.dart
  • export of the matching .g.dart

The generated entity also auto-triggers fjson gen, so the matching .g.dart, json_field.dart, and json_convert_content.dart are all regenerated immediately.

fjson gen — Regenerate all helpers

bash
java -jar .agents/skills/fjson-dart-bean-generator/fjson-cli.jar gen --project .

This scans lib/**/*.dart for every @JsonSerializable class and:

  1. Regenerates each <entity>.g.dart file in lib/generated/json/
  2. Rebuilds lib/generated/json/base/json_field.dart (annotation definitions)
  3. Rebuilds lib/generated/json/base/json_convert_content.dart (the JsonConvert runtime and JsonConvertClassCollection registry with all entity imports)
  4. Deletes any stale .g.dart files for entities that no longer exist

Run this after any manual edit to an entity file (adding/removing/renaming fields).

Generated File Layout in unyo

unyo/
├── lib/core/services/api/dto/
│   └── anilist/
│       └── media_response_entity.dart          ← fjson bean output
└── lib/generated/json/
    ├── media_response_entity.g.dart             ← auto-generated helpers
    ├── media_collection_graphql_entity.g.dart   ← existing
    ├── ...                                      ← all other .g.dart
    └── base/
        ├── json_field.dart                     ← annotations
        └── json_convert_content.dart            ← registry + runtime
Entity file naming convention in unyo
  • Snake_case filenames: e.g., media_details_graphql_entity.dart
  • PascalCase class names: e.g., MediaDetailsGraphqlEntity
  • fjson converts PascalCase --class names to snake_case filenames automatically
  • Always place entities in the correct DTO subfolder: lib/core/services/api/dto/<provider>/
    • Providers: anilist/, anizip/, aniskip/, extensions/
Default unyo settings that fjson matches
  • --set-default is always used → all fields get = '', = 0, = false, etc.
  • --suffix entity (default) → class names end with Entity
  • flutter_json.generated_path is generated/json in pubspec.yaml
Show full SKILL.md (305 more words)Show less

Workflow: Adding a new API response model

  1. Get the JSON — Either from the user, from a file, or from a GraphQL response
  2. Determine the provider (anilist, anizip, aniskip, extensions)
  3. Run fjson bean with --class, --json/--file, --output, and --set-default:
    bash
    java -jar .agents/skills/fjson-dart-bean-generator/fjson-cli.jar bean \
      --class NewApiResponse \
      --json '<the JSON>' \
      --output ./lib/core/services/api/dto/anilist/ \
      --set-default
  4. Verify the output — Open the generated .dart file and check:
    • Class names and field types are correct
    • Nested objects are properly generated as sub-classes
    • @JSONField(name: ...) mappings are correct for non-matching keys
  5. Update json_convert_content.dart — Already done automatically by fjson gen (triggered by fjson bean). Verify the new entity's import is present.
  6. Run analysis — flutter analyze to ensure no issues
  7. If fields need adjustment — Edit the entity file directly, then re-run fjson gen:
    bash
    java -jar .agents/skills/fjson-dart-bean-generator/fjson-cli.jar gen --project .

Common Pitfalls

  • Wrong --output path: Entity files must go to the correct provider subfolder (lib/core/services/api/dto/<provider>/) for the import in json_convert_content.dart and .g.dart files to resolve correctly.
  • Forgetting --set-default: Without it, fields use late without defaults. In unyo, all DTO fields have defaults (except dynamic).
  • Running in wrong directory: Commands assume the current working directory is the unyo project root (where pubspec.yaml lives). The --project flag overrides this.
  • Class name collision: If a class name already exists in another entity file, the generated .g.dart will have duplicate function names, causing compile errors. Check for existing names before running.
  • JSON with empty arrays: fjson handles this but cannot infer the element type of an empty List. The field will be typed List<dynamic> and must be corrected manually.
  • After running bean in a non-Flutter directory: fjson gen is skipped. You must manually run it from the project root.

Cross-references

  • unyo project structure and entity patterns: See unyo-domain-data-layer skill
  • DTO conventions and GraphQL response mapping: See unyo-domain-data-layer skill
  • Rebuilding fjson-cli from source: See ../fjson-cli/README.md

© K3vinb5, BSD-3-Clause. 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 1 other file in .agents/skills/fjson-dart-bean-generator of K3vinb5/unyo-app.

  • SKILL.md
  • fjson-cli.jar

Open the folder on GitHubat commit 0a44722

Compare with similar skills

Fjson Dart Bean Generator 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.

Fjson Dart Bean Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fjson Dart Bean Generator this skillK3vinb5/unyo-app662—~2.2kAutomated safety check: PassBSD-3-Clause
Flutter Riverpod State Managementandrewyng/context-hub14k—~1.1kAutomated safety check: PassMIT
BlocVeryGoodOpenSource/vgv-ai-flutter-plugin170—~2kAutomated safety check: PassMIT
Dart Best Practiceskevmoo/dash_skills147—~709Automated safety check: PassApache-2.0
Dart Doc Validationkevmoo/dash_skills147—~822Automated safety check: PassApache-2.0
Flutter Dart Code Reviewaffaan-m/ECC276k2 repos~5.8kAutomated safety check: NotesMIT

Similar skills

  • Guides Flutter state management with Riverpod: choosing provider types, wiring ConsumerWidgets, handling async state and lifecycle, and overriding providers in tests.

    14k GitHub stars~1.1k tokensUpdated 4 mo ago
    MobileAuto-check passed
  • Bloc

    VeryGoodOpenSource/vgv-ai-flutter-plugin

    Best practices for Bloc state management in Flutter/Dart, covering Cubit versus Bloc, event and state naming, sealed classes with Equatable, the Page/View split with BlocProvider, BlocBuilder…

    170 GitHub stars~2k tokensUpdated 3 days ago
    MobileAuto-check passed
  • Dart Best Practices

    kevmoo/dash_skills

    General best practices for Dart development. An agent skill from kevmoo/dash_skills.

    147 GitHub stars~709 tokensUpdated yesterday
    MobileAuto-check passed
  • Dart Doc Validation

    kevmoo/dash_skills

    Best practices for validating Dart documentation comments. An agent skill from kevmoo/dash_skills.

    147 GitHub stars~822 tokensUpdated yesterday
    MobileAuto-check passed
  • Library-agnostic Flutter/Dart code review checklist covering widget best practices, state management patterns (BLoC, Riverpod, Provider, GetX, MobX, Signals), Dart idioms, performance…

    276k GitHub starsUsed in 2 repos~5.8k tokens
    MobileAuto-check: notes
  • Dart Matcher Best Practices

    kevmoo/dash_skills

    Best practices for using expect and package:matcher. An agent skill from kevmoo/dash_skills.

    147 GitHub stars~1.6k tokensUpdated yesterday
    MobileAuto-check passed

More from K3vinb5/unyo-app

  • How to create cubits, define states, use the EffectMixin pattern, and handle side effects in the Unyo Flutter app.

    662 GitHub stars~3.2k tokensUpdated 3 mo ago
    Auto-check passed
  • How to register and resolve dependencies using GetIt in the Unyo Flutter app.

    662 GitHub stars~2.4k tokensUpdated 3 mo ago
    Auto-check passed
  • Unyo Domain Data Layer

    K3vinb5/unyo-app

    How to create domain entities, data models, and repositories in the Unyo Flutter app.

    662 GitHub stars~2.9k tokensUpdated 3 mo ago
    Auto-check passed
  • Unyo Reactive Notifiers

    K3vinb5/unyo-app

    How to create and use RxDart BehaviorSubject notifiers for cross-cubit communication in the Unyo Flutter app.

    662 GitHub stars~2.8k tokensUpdated 3 mo ago
    Auto-check passed
  • Unyo Routing Navigation

    K3vinb5/unyo-app

    How to add routes, configure navigation, and use AutoRoute in the Unyo Flutter app.

    662 GitHub stars~2.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Unyo UI Presentation

    K3vinb5/unyo-app

    How to build screens, widgets, and handle effects in the Unyo Flutter app's presentation layer.

    662 GitHub stars~3k tokensUpdated 3 mo ago
    Auto-check passed

Works with

Categories

Questions about Fjson Dart Bean Generator

What does Fjson Dart Bean Generator do?

Generate Dart bean classes from JSON and regenerate serialization helpers using the fjson CLI. Fjson Dart Bean Generator is an agent skill from K3vinb5/unyo-app. Generate Dart bean classes from JSON and regenerate serialization helpers using the fjson CLI.

When should I use Fjson Dart Bean Generator?

Fjson Dart Bean Generator fits situations like: the user needs to create Dart models from API JSON responses; generate @JsonSerializable entity classes; regenerate .g.dart helper files; the user mentions FlutterJsonBeanFactory.

How do I install Fjson Dart Bean Generator in Claude Code?

Run `npx skills add K3vinb5/unyo-app --skill fjson-dart-bean-generator -a claude-code`. Or copy the skill folder (.agents/skills/fjson-dart-bean-generator in K3vinb5/unyo-app) into .claude/skills/fjson-dart-bean-generator in your project. Claude Code loads it when a task matches its description.

How do I install Fjson Dart Bean Generator in Codex?

Run `npx skills add K3vinb5/unyo-app --skill fjson-dart-bean-generator -a codex`. Or copy the skill folder (.agents/skills/fjson-dart-bean-generator in K3vinb5/unyo-app) into .agents/skills/fjson-dart-bean-generator in your project. Codex loads it when a task matches its description.

Can I use Fjson Dart Bean Generator 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 K3vinb5/unyo-app --skill fjson-dart-bean-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fjson-dart-bean-generator, .gemini/skills/fjson-dart-bean-generator, .github/skills/fjson-dart-bean-generator and .opencode/skills/fjson-dart-bean-generator in your project.

What does Fjson Dart Bean Generator need to run?

Going by SKILL.md and its folder, Fjson Dart Bean Generator needs the command-line tools its instructions call (java and flutter).

Does Fjson Dart Bean Generator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Fjson Dart Bean Generator 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. Review the folder before installing.

What licence does Fjson Dart Bean Generator use?

Fjson Dart Bean Generator is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fjson Dart Bean Generator use?

About 2.2k tokens (SKILL.md is roughly 8.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Fjson Dart Bean Generator?

Skills that share tags, products or a category with Fjson Dart Bean Generator: Flutter Riverpod State Management (andrewyng/context-hub, 14k stars), Bloc (VeryGoodOpenSource/vgv-ai-flutter-plugin, 170 stars), Dart Best Practices (kevmoo/dash_skills, 147 stars) and Dart Doc Validation (kevmoo/dash_skills, 147 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fjson Dart Bean Generator?

K3vinb5 (a GitHub user) maintains it in K3vinb5/unyo-app, which has 662 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on June 12, 2026.

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