
flutter-networking
Implement, fix, debug, review, or refactor Flutter networking code for HTTP/REST APIs, WebSocket realtime flows, authentication and token refresh, request headers, timeouts, retries, JSON parsing, caching, background isolates, repositories, services, and adaptation to existing http, Dio, Retrofit, Chopper, or custom API clients. Use when asked to add network requests, investigate network errors, harden API clients, handle auth, or validate Flutter network behavior.
- Installs
- 723
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/madteacher/mad-agents-skills --skill flutter-networking- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads flutter-networking automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Flutter Networking
You are a networking agent for Flutter apps. Turn existing project facts into concrete API calls, clients, services, repositories, error handling, auth flows, and validation steps. Do not treat this skill as a tutorial: inspect, adapt, implement or review, and verify.
Core Contract
- Confirm the target is a Flutter or Dart package by inspecting
pubspec.yaml,lib/, and existing networking, architecture, state-management, DI, auth, persistence, and test conventions. - Preserve the project's current client stack unless there is no networking
stack yet or the user explicitly asks to migrate. Adapt this skill's
httpexamples to existing Dio, Retrofit, Chopper, generated clients, or custom wrappers instead of adding a parallel client. - For implementation tasks, prefer small injectable clients/services with typed decode functions, clear timeouts, explicit status handling, cancellable or disposable resources where available, and testable boundaries.
- For review and debugging tasks, report broken status handling, leaked clients or subscriptions, unsafe token storage, missing timeouts, generic exceptions, UI-thread parsing of large responses, duplicate in-flight requests, and missing tests before broad style advice.
- Keep UI networking thin. Widgets may trigger commands or observe state, but services own endpoint calls, repositories own data policies, and state objects/ViewModels own UI state transitions.
- Validate with the repo's normal commands. Prefer
flutter analyze, focusedflutter test, and template-onlydart format --output=none --set-exit-if-changedchecks for copied Dart assets. Explain skipped checks.
Clarification Rules
Ask the user only when a high-impact decision cannot be inferred from the project:
- API contract, endpoint base URL, auth mechanism, or token lifecycle is absent;
- realtime behavior needs product semantics such as reconnect policy, ordering, delivery guarantees, or offline behavior;
- cache freshness, optimistic updates, pagination, or retry policy would change user-visible data correctness;
- the project already has multiple networking stacks and the intended target is ambiguous.
If the project is unavailable or is not a Flutter project, give an implementation plan or review based on the provided context, do not invent repository facts, and state that code validation could not be performed.
Resource Routing
Read only the references and assets needed for the current task:
| Need | Read | Use for |
|---|---|---|
| Basic HTTP CRUD or JSON models | http-basics.md | GET/POST/PUT/DELETE, query parameters, typed parsing, FutureBuilder examples |
| Auth headers, token storage, login, refresh, OAuth | authentication.md | Bearer/basic/API key auth, secure token handling, refresh flow, auth retry |
| Status codes, exceptions, timeouts, retries, UI errors | error-handling.md | API exception model, timeout/connection handling, retry policy, user-facing errors |
| Large JSON, caching, pagination, dedupe, timing | performance.md | compute(), cache TTLs, request deduplication, pagination, instrumentation |
| WebSocket connection, JSON messages, reconnect, auth | websockets.md | Channels, stream subscriptions, connection status, reconnection, secure sockets |
| Reusable HTTP service template | http_service.dart | Copy only after adapting base URL, decode functions, timeout, auth, and DI fit |
| Repository/cache template | repository_template.dart | Copy only when the app lacks an equivalent repository/cache boundary |
| Standalone examples | examples | Use as illustrative snippets, then adapt imports, state management, disposal, and errors |
Every copied asset must be adapted to the target app's package name, lints, client stack, state-management style, and architecture before validation.
Networking Defaults
- Use
http: ^1.6.0andweb_socket_channel: ^3.0.3only for new simple clients. For existing Dio, Retrofit, Chopper, or generated clients, follow the established stack. - Inject clients instead of constructing them deep inside services. Close owned
http.Client, WebSocket channels, stream subscriptions, timers, and text controllers. - Treat
200..299as success only when the endpoint contract allows it. Handle204as empty and model methods as nullable orvoidinstead of using unsafe casts. - Decode JSON into typed models at service/repository boundaries. Use background isolates for large responses, but avoid isolate overhead for small payloads.
- Add request timeouts and retry only transient failures. Do not retry unsafe mutations unless the API is idempotent or the user confirms the product policy.
- Store sensitive tokens with
flutter_secure_storage: ^10.0.0or the app's existing secure storage. Do not store access tokens in source code,shared_preferences, logs, or crash reports. - Use
wss://for WebSockets. Custom WebSocket headers viaIOWebSocketChannelare IO-only; provide a browser-compatible alternative for Flutter web. - Do not manually set
Accept-Encodingas a default withpackage:http; let the platform/client negotiate compression unless the project has a measured need.
Validation
Before finishing an implementation or review:
- Check that endpoint calls are behind testable services or repositories and that UI code does not own raw HTTP/WebSocket details.
- Check that every request has status handling, timeout/error handling, and typed parsing or an explicitly raw response contract.
- Check that auth secrets are stored and refreshed according to the app's existing secure storage and lifecycle rules.
- Check that clients, channels, subscriptions, controllers, and timers are disposed when owned by the code being changed.
- Run the closest available validation:
flutter analyze- focused
flutter testsuites for changed network/auth/repository code dart format --output=none --set-exit-if-changedfor copied Dart assets- this skill's
scripts/verify-examples.shwhen changing bundled examples or templates
- Report commands run, failures, skipped checks, and residual networking risks.
FAQ
What does the flutter-networking skill do?
Implement, fix, debug, review, or refactor Flutter networking code for HTTP/REST APIs, WebSocket realtime flows, authentication and token refresh, request headers, timeouts, retries, JSON parsing, caching, background isolates, repositories, services, and adaptation to existing http, Dio, Retrofit, Chopper, or custom API clients. Use when asked to add network requests, investigate network errors, harden API clients, handle auth, or validate Flutter network behavior.
How do I install flutter-networking?
Run npx skills add https://github.com/madteacher/mad-agents-skills --skill flutter-networking in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/flutter-networking/ (personal) or .claude/skills/flutter-networking/ (project).
Which AI agents can use flutter-networking?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is flutter-networking safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains flutter-networking?
It is published by madteacher in madteacher/mad-agents-skills. It has 723 recorded installs.
More from madteacher/mad-agents-skills
flutter-animations
madteacher/mad-agents-skills
Add, fix, refactor, debug, test, or explain Flutter animations and motion effects. Use when working with implicit animations such as AnimatedContainer, AnimatedOpacity, AnimatedSwitcher, and TweenAnimationBuilder; explicit animations using AnimationController, Tween, CurvedAnimation, AnimatedWidget, AnimatedBuilder, and built-in transitions; Hero/shared-element route transitions; staggered or sequenced animations; physics-based motion, gestures, springs, flings, scroll physics, curves, performance, accessibility, reduced motion, and animation lifecycle bugs.
flutter-adaptive-ui
madteacher/mad-agents-skills
Build, fix, review, and validate adaptive or responsive Flutter UIs for mobile, tablet, desktop, web, large screens, foldables, and mixed input devices. Use when creating breakpoint-driven layouts, responsive navigation, adaptive dialogs/lists/grids, keyboard/mouse/touch behavior, window-size decisions with MediaQuery or LayoutBuilder, or Capability and Policy patterns for platform-specific behavior.
flutter-architecture
madteacher/mad-agents-skills
Design, refactor, review, or implement Flutter app architecture using MVVM, layered UI/Data/optional Domain boundaries, feature-first or layer-first project structure, repositories, services, dependency injection, Result and Command patterns, offline-first or optimistic UI flows. Use when asked to add a Flutter feature, audit layer dependencies, fix cross-feature imports, migrate to feature-first, choose architecture for a Flutter project, or create scalable maintainable Flutter code organization.
flutter-testing
madteacher/mad-agents-skills
Write, fix, review, debug, and validate Flutter tests for apps, packages, and plugins. Use when adding unit tests, widget tests, integration tests, MethodChannel or plugin mocks, Mockito or mocktail test doubles, golden or accessibility checks, CI test commands, test failures, MissingPluginException, pump or pumpAndSettle problems, finder errors, buildrunner mock generation, device integration testing, web integration testing, or flaky Flutter tests.
flutter-drift
madteacher/mad-agents-skills
Implement, fix, review, migrate, test, or debug Drift persistence in Flutter apps using SQLite, driftflutter, type-safe Dart queries, generated tables, StreamBuilder or Riverpod StreamProvider UI, write operations, transactions, schema migrations, web assets, isolate sharing, and local database testing. Use when a Flutter task mentions drift, local database storage, SQLite, reactive database streams, CRUD, schemaVersion, buildrunner, driftdev make-migrations, migration tests, or Flutter-specific database setup across mobile, web, or desktop.
flutter-navigation
madteacher/mad-agents-skills
Implement, fix, refactor, review, migrate, or validate Flutter navigation and routing. Use when working with Navigator, MaterialPageRoute, Router API, gorouter, route guards, redirects, ShellRoute or StatefulShellRoute, nested Navigators, passing and returning route data, deep links, Android App Links, iOS Universal Links, custom URI schemes, Flutter web URL strategy, browser history, 404 routing, route tests, or navigation-state bugs.
Popular mobile skills
design-mobile-apps
designed-by-ai/skills
Design mobile app screens with Sleek, edit Sleek projects, and implement their designs in React Native or HTML.
ios-design
uizze.sh
Design and review iOS UI/UX for iPhone apps in SwiftUI, UIKit, or React Native. Use for mobile app design, screen redesigns, navigation flows, typography, forms, keyboard and safe-area layout, and accessibility checks. Apply Apple Human Interface Guidelines and consult real product references through the optional Uizze connection.
vercel-react-native-skills
vercel-labs/agent-skills
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
animate-expo
emilkowalski/skills
Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use animate.
xcode-project-setup
firebase/agent-skills
Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).
firebase-remote-config-basics
firebase/agent-skills
Manages Firebase Remote Config templates, feature flags, loading strategies, and SDKs (Android, iOS). Use when downloading/deploying remoteconfig JSON templates, managing version history/feature flags, setting in-app defaults, fetchAndActivate(), real-time listeners, or SDK setup. Don't use for Firebase Hosting, Auth, Firestore, Data Connect, Crashlytics, or App Hosting.