networking

networking is a skill for Claude Code, Codex from sonature-lab/timsquad. It costs 47 tokens per session (1,073 once invoked), scanned A, original, MIT.

A guide to network communication in Flutter apps, using HTTP clients, generated API code, interceptors, connectivity checks, error handling, and caching.

In plain words
What is it for?
Use it to set up API clients, authentication and retry layers, convert network errors into app errors, detect offline status, queue retries, and cache responses.
Why use it?
It gives network failures a consistent path through the app and accounts for unreliable or missing internet connections.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sonature-lab/timsquad/networking
Any agent
npx skills add sonature-lab/timsquad --skill networking
Clone the repo
git clone --depth 1 https://github.com/sonature-lab/timsquad

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for networking

README.md
[![agentmods](https://agentmods.dev/badge/skills/sonature-lab/timsquad/networking.svg)](https://agentmods.dev/skills/sonature-lab/timsquad/networking)
Your own site
<a href="https://agentmods.dev/skills/sonature-lab/timsquad/networking"><img src="https://agentmods.dev/badge/skills/sonature-lab/timsquad/networking.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,073 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00047 $0.01073
Opus 5 $0.00023 $0.00536
Sonnet 5 $0.00009 $0.00215
Haiku 4.5 $0.00005 $0.00107

Measured 5d ago against content hash 57af5ac09ceb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

networking scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

templates/base/skills/tsq-flutter/networking/SKILL.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Networking

Flutter Dio + Retrofit + Interceptor + Connectivity 통합 가이드. HTTP 클라이언트 설정부터 오프라인 캐시까지, API 통신 전체 파이프라인.

Philosophy

  • API 클라이언트는 서비스 — Feature-first 구조에서 core/networking/ 중앙화
  • 에러는 도메인 타입 — DioException을 앱 도메인 에러(NetworkFailure)로 변환
  • 오프라인은 기본 — connectivity 감지 + 캐시 + 재시도를 기본 탑재
  • 인터셉터는 레이어 — 인증, 재시도, 로깅, 에러 변환을 체인으로 분리

Resources

6개 규칙 + 1개 참조. 네트워크 통신 전체를 커버.

Priority Type Resource Description
CRITICAL rule dio-setup Dio 싱글톤, BaseOptions, Riverpod Provider
CRITICAL rule interceptors Interceptor chain 순서: Auth → Retry → Logging → Error
CRITICAL rule error-handling DioException → NetworkFailure sealed class, Result 패턴
HIGH rule retrofit-patterns @RestApi, 코드 생성, freezed 모델 연동
HIGH rule connectivity connectivity_plus, 오프라인 큐, 자동 재시도
MEDIUM rule caching dio_cache_interceptor, ETag, 오프라인 fallback
ref api-client-architecture 디렉토리 구조, Provider 구성, Repository 연동, Mock 테스트

Quick Rules

Dio 설정

  • Dio(BaseOptions(...)) 싱글톤 — Riverpod Provider로 전역 관리
  • connectTimeout: 15s, receiveTimeout: 15s 기본값
  • baseUrl 은 환경별 분리 (dev/staging/prod)
  • contentType: 'application/json' 기본 헤더

인터셉터 체인

  • 순서: Auth → Retry → Logging → Error Transform
  • Auth: 토큰 주입 + 401 시 리프레시
  • Retry: 지수 백오프, 최대 3회, 5xx/timeout만
  • Logging: debug 빌드에서만 활성화

에러 핸들링

  • DioExceptionNetworkFailure sealed class 변환
  • connectionTimeout/sendTimeoutTimeoutFailure
  • badResponseServerFailure(statusCode, message)
  • connectionErrorNoConnectionFailure
  • Repository에서 Result<T, Failure> 패턴 반환

Retrofit 코드 생성

  • @RestApi(baseUrl: '') — baseUrl은 Dio에서 관리
  • 응답 모델은 freezed + json_serializable
  • build_runner watch 로 개발 중 자동 생성

연결 상태

  • connectivity_plus → 네트워크 상태 실시간 감지
  • 오프라인 시 요청 큐잉, 연결 복구 시 자동 재시도
  • UI에 오프라인 배너 표시

Read the full file on GitHub · 89 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 89 lines · 47 tokens per session scan A 57af5ac09ceb

Subscribe to this mod's changes

networking is a skill published in the GitHub repository sonature-lab/timsquad (11 stars, last pushed 7d ago), licensed MIT. It adds 47 tokens to every session and 1,073 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

update-store

ストア情報の更新自動化 — スクリーンショット撮影(シミュレーター × モック画面 × Marionette MCP)とメタデータテキスト更新。ストア更新、スクショ更新、App Store / Google Play のメタデータ更新、リリースノート作成の際に使用すること。.

K9i-0/ccpocket · 80 tokens

mobile-automation

MCP (dart-mcp + Marionette) を使ったFlutterアプリのE2E自動化・UI検証ガイド。シミュレーターでのUI動作確認、モックプレビュー検証、Bridge経由のE2Eテスト、スクリーンショット撮影など、アプリの動作検証が必要なときに使う。「動作確認して」「UIを検証して」「E2Eテスト」「シミュレーターで確認」「モックで確認」と言われたときや、UI変更後の検証フェーズで使用すること。.

K9i-0/ccpocket · 138 tokens

submit-store-review

App Store Connect・Google Playの現在の公開版をAPIで調べ、既存の最新安定ビルドとの差分から4言語のリリースノートを作成し、CLI/APIで審査へ提出・再提出する。新しいビルドを作るrelease-appとは分離し、「最新を審査提出して」「ストア審査へ提出して」「App Reviewに出して」「Google Playの審査を進めて」「却下対応して再提出して」と依頼されたときに使用する。.

K9i-0/ccpocket · 126 tokens

release-app

アプリのリリース(バージョンbump + CHANGELOG + タグ → GH Actions で自動ビルド・配布)。iOS / Android / macOS / Linux / Windows の任意の組み合わせでリリースできる。「リリース」「バージョン上げて」「リリースして」と言われたときに使う。.

K9i-0/ccpocket · 87 tokens

flutter-upgrade

Flutter SDKバージョンアップグレード対応。新バージョンのリリースノート・Breaking Changes調査、コードベース影響分析、mise/CI/Shorebird含むプロジェクト全体の対応タスクリスト作成と実行。「Flutterアップグレード」「Flutter X.Y.Zがリリースされた」「Flutter最新化」「Flutter更新」と言われたとき、またはFlutterの新バージョンについて言及されたときに使用する。.

K9i-0/ccpocket · 113 tokens

test-flutter

Flutter App のテスト実行・静的解析・フォーマット・テスト記述ガイド.

K9i-0/ccpocket · 26 tokens