Agent skill

Flutter Implement JSON Serialization

by abdulmominsakib in abdulmominsakib/localmind

Create model classes with fromJson and toJson methods using dart:convert.

MITAuto-check passedMobile

Install Flutter Implement JSON Serialization

skills CLI
$ npx skills add abdulmominsakib/localmind --skill flutter-implement-json-serialization -a claude-code

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

GitHub CLI
$ gh skill install abdulmominsakib/localmind flutter-implement-json-serialization --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/abdulmominsakib/localmind.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/flutter-implement-json-serialization .claude/skills/flutter-implement-json-serialization && 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
flutter-implement-json-serialization
GitHub stars
265
Used in
1 other repo
Token cost
~1.4k tokens
SKILL.md length
407 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

Create model classes with fromJson and toJson methods using dart:convert.

  • Works in 4 steps: Define the Model: Create a class with… → Implement fromJson: Extract values from… → Implement toJson: Return a Map mapping… → …
  • Manually mapping JSON keys to class properties for simple data structures
  • SKILL.md covers Contents, Core Guidelines, Workflow: Implementing a… and Workflow: Fetching and Parsing…, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Flutter Implement JSON Serialization is an agent skill from abdulmominsakib/localmind. Create model classes with fromJson and toJson methods using dart:convert. Use when manually mapping JSON keys to class properties for simple data structures.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Cross-platform mobile apps. It works with Flutter and Dart. The repository describes itself as: A mobile application designed to provide a beautiful, fast, and privacy-respecting interface for on device LLM and local LLM servers and cloud providers. The licence is MIT.

When your agent uses it

  • Manually mapping JSON keys to class properties for simple data structures
  • Tasks that involve Cross-platform mobile apps

Example prompts

  • “/flutter-implement-json-serialization”

Workflow steps

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

  1. Define the Model: Create a class with properties matching the JSON keys.
  2. Implement fromJson: Extract values from the Map and cast them to the appropriate Dart types. Use pattern matching or explicit casting.
  3. Implement toJson: Return a Map mapping the class properties back to their JSON string keys.
  4. Validate: Execute unit tests to ensure type safety, autocompletion, and compile-time exception handling function correctly.

What it can do on your machine

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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are dart).

    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

Flutter Implement JSON Serialization loads about 1.4k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 407 words of instructions outside code blocks.

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

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 abdulmominsakib/localmind at commit 9ff3f94, republished under its MIT licence (© abdulmominsakib). 407 words, ~1,413 tokens.

Download SKILL.mdSave it as .claude/skills/flutter-implement-json-serialization/SKILL.md (or your agent's skills folder).
name
flutter-implement-json-serialization
description
Create model classes with `fromJson` and `toJson` methods using `dart:convert`. Use when manually mapping JSON keys to class properties for simple data structures.
metadata.model
models/gemini-3.1-pro-preview
metadata.last_modified
Tue, 21 Apr 2026 21:44:50 GMT

Serializing JSON Manually in Flutter

Contents

Core Guidelines

  • Import dart:convert: Utilize Flutter's built-in dart:convert library for manual JSON encoding (jsonEncode) and decoding (jsonDecode).
  • Enforce Type Safety: Always cast the dynamic result of jsonDecode() to the expected type, typically Map<String, dynamic> for objects or List<dynamic> for arrays.
  • Encapsulate Serialization Logic: Define plain model classes containing properties corresponding to the JSON structure. Implement a fromJson factory constructor and a toJson method within the model.
  • Handle Background Parsing: If parsing large JSON documents (execution time > 16ms), offload the parsing logic to a separate isolate using Flutter's compute() function to prevent UI jank.
  • Throw Exceptions on Failure: When handling HTTP responses, throw an exception if the status code is not successful (e.g., not 200 OK or 201 Created). Do not return null.

Workflow: Implementing a Serializable Model

Use this checklist to implement manual JSON serialization for a data model.

Task Progress:

  • Define the plain model class with final properties.
  • Implement the factory Model.fromJson(Map<String, dynamic> json) constructor.
  • Implement the Map<String, dynamic> toJson() method.
  • Write unit tests for both serialization methods.
  • Run validator -> review type mismatch errors -> fix casting logic.
  1. Define the Model: Create a class with properties matching the JSON keys.
  2. Implement fromJson: Extract values from the Map and cast them to the appropriate Dart types. Use pattern matching or explicit casting.
  3. Implement toJson: Return a Map<String, dynamic> mapping the class properties back to their JSON string keys.
  4. Validate: Execute unit tests to ensure type safety, autocompletion, and compile-time exception handling function correctly.
Show full SKILL.md (142 more words)Show less

Workflow: Fetching and Parsing JSON

Use this conditional workflow when retrieving and parsing JSON from a network request.

Task Progress:

  • Execute the HTTP request.
  • Validate the response status code.
  • Determine parsing strategy (Synchronous vs. Isolate).
  • Decode and map the JSON to the model.
  1. Execute Request: Use the http package to perform the network call.
  2. Validate Response:
    • If response.statusCode == 200 (or 201 for POST), proceed to parsing.
    • If the status code indicates failure, throw an Exception.
  3. Determine Parsing Strategy:
    • If parsing a small payload (e.g., a single object), parse synchronously on the main thread.
    • If parsing a large payload (e.g., an array of thousands of objects), use compute(parseFunction, response.body) to parse in a background isolate.
  4. Decode and Map: Pass the decoded JSON to your model's fromJson constructor.

Examples

High-Fidelity Model Implementation
dart
import 'dart:convert';

class User {
  final int id;
  final String name;
  final String email;

  const User({
    required this.id,
    required this.name,
    required this.email,
  });

  // Factory constructor for deserialization
  factory User.fromJson(Map<String, dynamic> json) {
    return switch (json) {
      {
        'id': int id,
        'name': String name,
        'email': String email,
      } => 
        User(
          id: id,
          name: name,
          email: email,
        ),
      _ => throw const FormatException('Failed to load User.'),
    };
  }

  // Method for serialization
  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'name': name,
      'email': email,
    };
  }
}
Synchronous Parsing (Small Payload)
dart
import 'dart:convert';
import 'package:http/http.dart' as http;

Future<User> fetchUser(http.Client client, int userId) async {
  final response = await client.get(
    Uri.parse('https://api.example.com/users/$userId'),
    headers: {'Accept': 'application/json'},
  );

  if (response.statusCode == 200) {
    // Decode returns dynamic, cast to Map<String, dynamic>
    final Map<String, dynamic> jsonMap = jsonDecode(response.body) as Map<String, dynamic>;
    return User.fromJson(jsonMap);
  } else {
    throw Exception('Failed to load user');
  }
}
Background Parsing (Large Payload)
dart
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:http/http.dart' as http;

// Top-level function required for compute()
List<User> parseUsers(String responseBody) {
  final parsed = (jsonDecode(responseBody) as List<dynamic>).cast<Map<String, dynamic>>();
  return parsed.map<User>((json) => User.fromJson(json)).toList();
}

Future<List<User>> fetchUsers(http.Client client) async {
  final response = await client.get(
    Uri.parse('https://api.example.com/users'),
    headers: {'Accept': 'application/json'},
  );

  if (response.statusCode == 200) {
    // Offload expensive parsing to a background isolate
    return compute(parseUsers, response.body);
  } else {
    throw Exception('Failed to load users');
  }
}

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

Files

Just SKILL.md in .agents/skills/flutter-implement-json-serialization of abdulmominsakib/localmind.

Open the folder on GitHubat commit 9ff3f94

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in abdulmominsakib/localmind, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Flutter Implement JSON Serialization 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.

Flutter Implement JSON Serialization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Flutter Implement JSON Serialization this skillabdulmominsakib/localmind2651 repos~1.4kAutomated safety check: PassMIT
Engine Whats Newflutter/flutter179k—~978Automated safety check: PassBSD-3-Clause
Flutter Cherry Pickflutter/flutter179k—~1.8kAutomated safety check: PassBSD-3-Clause
Upgrade Browserflutter/flutter179k—~1.1kAutomated safety check: PassBSD-3-Clause
Bump Dartflutter/flutter179k—~1.2kAutomated safety check: PassBSD-3-Clause
Run Devicelab With Ledflutter/flutter179k—~786Automated safety check: PassBSD-3-Clause

Similar skills

  • 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
  • Flutter Cherry Pick

    flutter/flutter

    How to land a formal cherry-pick of a merged PR for the flutter/flutter repo stable or beta channel.

    179k GitHub stars~1.8k tokensUpdated today
    MobileAuto-check passed
  • Upgrade Browser

    flutter/flutter

    Upgrade browser versions (Chrome or Firefox) in the Flutter Web Engine and/or Framework tests.

    179k GitHub stars~1.1k tokensUpdated today
    MobileAuto-check passed
  • Bump Dart

    flutter/flutter

    Do not trigger automatically; only run when a user runs /bump-dart.

    179k GitHub stars~1.2k tokensUpdated today
    MobileAuto-check passed
  • Run Devicelab With Led

    flutter/flutter

    Run DeviceLab tests for Flutter PRs using LUCI's led CLI tool.

    179k GitHub stars~786 tokensUpdated today
    MobileAuto-check passed
  • Shepherd PRs

    flutter/flutter

    Automate shepherding, checking status, updating branches, and landing open PRs or approved third-party contributor PRs in the flutter/flutter repository using the gh CLI.

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

More from abdulmominsakib/localmind

All 13 skills in this repo
  • Flutter Add Widget Preview

    abdulmominsakib/localmind

    Adds interactive widget previews to the project using the previews.dart system.

    265 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Flutter Feature Based Architecture

    abdulmominsakib/localmind

    Design, implement, refactor, and review Flutter apps that use feature-based vertical slices, handwritten Dart models/providers, componentized StatelessWidget UI, Riverpod state management, and a…

    265 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Flutter Add Widget Test

    abdulmominsakib/localmind

    Implement a component-level test using WidgetTester to verify UI rendering and user interactions (tapping, scrolling, entering text).

    265 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Architects a Flutter application using the recommended layered approach (UI, Logic, Data).

    265 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Flutter Build Responsive Layout

    abdulmominsakib/localmind

    Use LayoutBuilder, MediaQuery, or Expanded/Flexible to create a layout that adapts to different screen sizes.

    265 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Flutter Fix Layout Issues

    abdulmominsakib/localmind

    Fixes Flutter layout errors (overflows, unbounded constraints) using Dart and Flutter MCP tools.

    265 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed

Works with

Categories

Questions about Flutter Implement JSON Serialization

What does Flutter Implement JSON Serialization do?

Create model classes with fromJson and toJson methods using dart:convert. Flutter Implement JSON Serialization is an agent skill from abdulmominsakib/localmind. Create model classes with fromJson and toJson methods using dart:convert.

When should I use Flutter Implement JSON Serialization?

Flutter Implement JSON Serialization fits situations like: manually mapping JSON keys to class properties for simple data structures; tasks that involve Cross-platform mobile apps.

How do I install Flutter Implement JSON Serialization in Claude Code?

Run `npx skills add abdulmominsakib/localmind --skill flutter-implement-json-serialization -a claude-code`. Or copy the skill folder (.agents/skills/flutter-implement-json-serialization in abdulmominsakib/localmind) into .claude/skills/flutter-implement-json-serialization in your project. Claude Code loads it when a task matches its description.

How do I install Flutter Implement JSON Serialization in Codex?

Run `npx skills add abdulmominsakib/localmind --skill flutter-implement-json-serialization -a codex`. Or copy the skill folder (.agents/skills/flutter-implement-json-serialization in abdulmominsakib/localmind) into .agents/skills/flutter-implement-json-serialization in your project. Codex loads it when a task matches its description.

Can I use Flutter Implement JSON Serialization 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 abdulmominsakib/localmind --skill flutter-implement-json-serialization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/flutter-implement-json-serialization, .gemini/skills/flutter-implement-json-serialization, .github/skills/flutter-implement-json-serialization and .opencode/skills/flutter-implement-json-serialization in your project.

What does Flutter Implement JSON Serialization need to run?

SKILL.md names no scripts, command-line tools or credentials: Flutter Implement JSON Serialization is instructions for the agent only.

Does Flutter Implement JSON Serialization 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 Flutter Implement JSON Serialization 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 Flutter Implement JSON Serialization use?

Flutter Implement JSON Serialization 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 Flutter Implement JSON Serialization use?

About 1.4k tokens (SKILL.md is roughly 5.7k 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 Flutter Implement JSON Serialization?

Skills that share tags, products or a category with Flutter Implement JSON Serialization: Engine Whats New (flutter/flutter, 179k stars), Flutter Cherry Pick (flutter/flutter, 179k stars), Upgrade Browser (flutter/flutter, 179k stars) and Bump Dart (flutter/flutter, 179k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Flutter Implement JSON Serialization?

abdulmominsakib (a GitHub user) maintains it in abdulmominsakib/localmind, which has 265 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on October 8, 2026.

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