Agent skill

Remote API Development

by FNOSP in FNOSP/FlyNarwhal

A skill your agent uses when adding, modifying, or refactoring any remote/HTTP API call in this Flutter project.

MITAuto-check passedMobile

Install Remote API Development

skills CLI
$ npx skills add FNOSP/FlyNarwhal --skill remote-api-development -a claude-code

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

GitHub CLI
$ gh skill install FNOSP/FlyNarwhal remote-api-development --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/FNOSP/FlyNarwhal.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/remote-api-development .claude/skills/remote-api-development && 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
remote-api-development
GitHub stars
495
Token cost
~1.3k tokens
SKILL.md length
171 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when adding, modifying, or refactoring any remote/HTTP API call in this Flutter project.

  • Works in 5 steps: 在 ApiEndpoints 添加路径常量(或路径参数方法)。 → 在对应 RemoteDataSource 添加方法,用 converter… → 需要实体映射时在 Repository 添加方法并 map。 → …
  • Refactoring any remote/HTTP API call in this Flutter project
  • SKILL.md covers When to Use This Skill, 分层架构(必须遵守), 核心规则 and 反模式(禁止), plus 2 more sections
  • Calls flutter

What it does

Remote API Development is an agent skill from FNOSP/FlyNarwhal. Use when adding, modifying, or refactoring any remote/HTTP API call in this Flutter project. Invoke for new endpoints, data sources, repositories, providers, or when removing hardcoded URLs and inline response parsing.

Its SKILL.md is about 1.3k 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, REST APIs and Refactoring. It works with Flutter. The repository describes itself as: 基于 Flutter 框架开发的适用于飞牛影视的跨平台客户端. The licence is MIT.

When your agent uses it

  • Refactoring any remote/HTTP API call in this Flutter project
  • Tasks that involve Cross-platform mobile apps
  • Tasks that involve REST APIs

Example prompts

  • “/remote-api-development”

Workflow steps

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

  1. 在 ApiEndpoints 添加路径常量(或路径参数方法)。
  2. 在对应 RemoteDataSource 添加方法,用 converter 解析,返回 ApiResult。
  3. 需要实体映射时在 Repository 添加方法并 map。
  4. 在 providers.dart 添加/复用 xxxRemoteDataSourceProvider,业务 Provider 委托调用。
  5. 验证:运行 flutter analyze,确认无 unused/undefined;涉及 UI 时按 flutter-tester 规范补充测试或 mcp UI 验证。

What it can do on your machine

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

    • 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

Remote API Development loads about 1.3k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 171 words of instructions outside code blocks.

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

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 FNOSP/FlyNarwhal at commit c94d847, republished under its MIT licence (© FNOSP). 171 words, ~1,283 tokens.

Download SKILL.mdSave it as .claude/skills/remote-api-development/SKILL.md (or your agent's skills folder).
name
remote-api-development
description
Use when adding, modifying, or refactoring any remote/HTTP API call in this Flutter project. Invoke for new endpoints, data sources, repositories, providers, or when removing hardcoded URLs and inline response parsing.
license
MIT
metadata.version
1.0.0
metadata.domain
networking
metadata.triggers
API, endpoint, remote call, DioClient, data source, repository, provider, userInfo, ApiEndpoints
metadata.role
specialist
metadata.scope
implementation
metadata.output-format
code
metadata.related-skills
flutter-expert, flutter-tester

Remote API Development Standards

本 skill 定义 fly-narwhal-flutter 项目远程接口调用的统一开发规范。新增或修改任何 HTTP 接口调用时必须遵循。

When to Use This Skill

  • 新增一个后端接口调用
  • 重构内联在 Provider/Widget 中的硬编码 URL 或内联解析逻辑
  • 新增/修改 RemoteDataSource、Repository、Provider
  • 排查“同一个接口存在多处重复实现”的问题

分层架构(必须遵守)

请求自上而下分层,禁止跨层或在上层内联实现下层职责:

UI (Widget / Screen)
  └─ Provider (FutureProvider / Notifier)      // 仅编排,不写 URL/解析
       └─ Repository (可选,做实体映射 / 多源聚合)
            └─ RemoteDataSource                 // 唯一发起请求 + 解析响应的地方
                 └─ DioClient (core/network)    // 统一网络层
                      └─ ApiEndpoints           // 唯一的 URL 常量来源

核心规则

规则 1:URL 必须集中在 ApiEndpoints
  • 所有接口路径只能定义在 lib/core/constants/app_constants.dart 的 ApiEndpoints 类中。
  • 严禁在 DataSource/Provider/Widget 中出现硬编码字符串路径(如 '/v/api/v1/user/info')。
  • 带路径参数的接口用静态方法,如 static String itemByGuid(String guid) => '$itemPrefix/$guid';。
dart
// app_constants.dart
class ApiEndpoints {
  const ApiEndpoints._();
  static const String userInfo = '/v/api/v1/user/info';
}
规则 2:请求与解析必须封装在 RemoteDataSource
  • 所有 _dioClient.get/post/... 调用只能出现在 lib/data/datasources/remote/ 下的 DataSource 中。
  • 用 converter 回调解析响应,统一通过 FnBaseResponse<T> 处理。
  • 业务错误码判断使用 ResponseCodes.success(即 0),失败时 throw Exception(baseResponse.msg)。
  • 返回类型统一为 ApiResult<T>,禁止直接返回原始 Response。
  • DataSource 依赖 core 版 DioClient(lib/core/network/dio_client.dart),不要用 legacy 版(lib/data/network/dio_client.dart)。
dart
class UserRemoteDataSource {
  final DioClient _dioClient;
  UserRemoteDataSource(this._dioClient);

  // Get current user info
  Future<ApiResult<UserInfo>> getUserInfo() async {
    return _dioClient.get<UserInfo>(
      ApiEndpoints.userInfo,
      converter: _parseUserInfoResponse,
    );
  }

  // Parse FnBaseResponse and unwrap data
  UserInfo _parseUserInfoResponse(dynamic data) {
    final baseResponse = FnBaseResponse<UserInfo>.fromJson(
      data,
      (json) => UserInfo.fromJson(
        json is Map<String, dynamic>
            ? json
            : Map<String, dynamic>.from(json as Map),
      ),
    );
    if (baseResponse.code != ResponseCodes.success) {
      throw Exception(baseResponse.msg);
    }
    return baseResponse.data ?? UserInfo(guid: '', username: '', isAdmin: 0);
  }
}
规则 3:Provider 只做编排,不写请求细节
  • Provider 中禁止出现 URL、FnBaseResponse 解析、错误码判断。
  • 先定义 xxxRemoteDataSourceProvider,再让业务 Provider 委托它。
  • 用 ApiResult.getOrThrow() 把失败转为异常,交给 AsyncValue.error 处理;对外类型保持稳定(如 FutureProvider<UserInfo>)。
dart
// DataSource provider —— 用 core 版 DioClient 构造
final userRemoteDataSourceProvider = Provider<UserRemoteDataSource>((ref) {
  final prefsManager = ref.watch(preferencesManagerProvider);
  final dioClient = core_network.DioClient.withCallbacks(
    getToken: () => prefsManager.getToken() ?? '',
    getCookie: () => prefsManager.getCookie() ?? '',
    getAuthCode: () => prefsManager.getAuthCode() ?? '',
    getBaseUrl: () => prefsManager.getBaseUrl() ?? '',
  );
  return UserRemoteDataSource(dioClient);
});

// Business provider —— 只编排,不写请求细节
final userInfoProvider = FutureProvider<UserInfo>((ref) async {
  final dataSource = ref.read(userRemoteDataSourceProvider);
  final result = await dataSource.getUserInfo();
  return result.getOrThrow();
});
规则 4:Repository 层(按需)
  • 当需要做 model→entity 映射或聚合多个数据源时,新增 Repository(lib/data/repositories/)实现 lib/domain/repositories/ 接口。
  • Repository 通过 ApiResult.map 转换数据,保持 ApiResult<T> 链路。
dart
@override
Future<ApiResult<UserEntity>> getUserInfo() async {
  final result = await _remoteDataSource.getUserInfo();
  return result.map((data) => UserMapper.toEntity(data));
}

反模式(禁止)

  • ❌ 在 Provider/Widget 里写 dioClient.dio.get('/v/api/v1/...') 硬编码 URL。
  • ❌ 在 Provider/Widget 里内联 FnBaseResponse.fromJson 解析。
  • ❌ 同一接口在多处重复实现请求与解析逻辑。
  • ❌ DataSource 使用 legacy DioClient(lib/data/network/dio_client.dart)。
  • ❌ 直接返回 Response,绕过 ApiResult。

新增接口操作清单

  1. 在 ApiEndpoints 添加路径常量(或路径参数方法)。
  2. 在对应 RemoteDataSource 添加方法,用 converter 解析,返回 ApiResult<T>。
  3. 需要实体映射时在 Repository 添加方法并 map。
  4. 在 providers.dart 添加/复用 xxxRemoteDataSourceProvider,业务 Provider 委托调用。
  5. 验证:运行 flutter analyze,确认无 unused/undefined;涉及 UI 时按 flutter-tester 规范补充测试或 mcp UI 验证。

参考实现

  • URL 常量:lib/core/constants/app_constants.dart
  • DataSource:lib/data/datasources/remote/user_remote_data_source.dart
  • 网络层:lib/core/network/dio_client.dart、lib/core/network/api_result.dart
  • Provider:lib/providers/providers.dart(userInfoProvider、userRemoteDataSourceProvider)

© FNOSP, 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/remote-api-development of FNOSP/FlyNarwhal.

Open the folder on GitHubat commit c94d847

Compare with similar skills

Remote API Development 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.

Remote API Development compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Remote API Development this skillFNOSP/FlyNarwhal495—~1.3kAutomated safety check: PassMIT
Fullstack Webapprevfactory/harness-1001.3k—~1.8kAutomated safety check: PassApache-2.0
Flutter Retrofit NetworkingHoangNguyen0403/agent-skills-standard570—~561Automated safety check: PassMIT
Liquid Glass Widgetssdegenaar/liquid_glass_widgets711—~3.8kAutomated safety check: PassMIT
Squadron Workerd-markey/squadron138—~1.6kAutomated safety check: PassMIT
RefactorVB10/vexana154—~516Automated safety check: PassNone

Similar skills

  • Fullstack Webapp

    revfactory/harness-100

    A full development pipeline where an agent team collaborates to develop fullstack web apps through requirements analysis, design, frontend, backend, testing, and deployment.

    1.3k GitHub stars~1.8k tokensUpdated 6 mo ago
    MobileAuto-check passed
  • Flutter Retrofit Networking

    HoangNguyen0403/agent-skills-standard

    Build type-safe HTTP networking with Dio and Retrofit including auth interceptors in Flutter.

    570 GitHub stars~561 tokensUpdated yesterday
    MobileAuto-check passed
  • Liquid Glass Widgets

    sdegenaar/liquid_glass_widgets

    Mastery guide and architectural rules for liquidglasswidgets.

    711 GitHub stars~3.8k tokensUpdated yesterday
    MobileAuto-check passed
  • Squadron Worker

    d-markey/squadron

    A skill your agent uses when building, writing, or refactoring Squadron workers, worker pools, worker services, or using squadronbuilder annotations (@SquadronService, @SquadronMethod) for…

    138 GitHub stars~1.6k tokensUpdated 14 days ago
    MobileAuto-check passed
  • Refactor

    VB10/vexana

    Migrate a Flutter project that already uses an older vexana (4.x or 5.x) to vexana 6.x — bumps the dependency, rewrites removed imports and immutable-model mutations, and flags call sites whose…

    154 GitHub stars~516 tokensUpdated 8 days ago
    MobileAuto-check passed
  • Layered Architecture

    VeryGoodOpenSource/vgv-ai-flutter-plugin

    VGV layered monorepo architecture in Flutter: four layers Data, Repository, Business Logic, and Presentation, unidirectional dependency rules, and model transformation across layers.

    169 GitHub stars~4.6k tokensUpdated yesterday
    MobileAuto-check passed

More from FNOSP/FlyNarwhal

All 8 skills in this repo
  • GitHub Actions Creator

    FNOSP/FlyNarwhal

    A skill your agent uses when the user wants to create, generate, or set up a GitHub Actions workflow.

    495 GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • Automate GitHub workflows with AI assistance. An agent skill from FNOSP/FlyNarwhal.

    495 GitHub starsUsed in 7 repos~5.4k tokens
    Auto-check passed
  • Flutter Tester

    FNOSP/FlyNarwhal

    A skill your agent uses when creating, writing, fixing, or reviewing tests in a Flutter project.

    495 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Flutter Expert

    FNOSP/FlyNarwhal

    A skill your agent uses when building cross-platform applications with Flutter 3+ and Dart.

    495 GitHub starsUsed in 2 repos~758 tokens
    Auto-check passed
  • Release Publishing

    FNOSP/FlyNarwhal

    A skill your agent uses when publishing a new release of FlyNarwhal desktop.

    495 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Swift Expert

    FNOSP/FlyNarwhal

    A skill your agent uses when building iOS/macOS applications with Swift 5.9+, SwiftUI, or async/await concurrency.

    495 GitHub stars~813 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Remote API Development

What does Remote API Development do?

A skill your agent uses when adding, modifying, or refactoring any remote/HTTP API call in this Flutter project. Remote API Development is an agent skill from FNOSP/FlyNarwhal. Use when adding, modifying, or refactoring any remote/HTTP API call in this Flutter project.

When should I use Remote API Development?

Remote API Development fits situations like: refactoring any remote/HTTP API call in this Flutter project; tasks that involve Cross-platform mobile apps; tasks that involve REST APIs.

How do I install Remote API Development in Claude Code?

Run `npx skills add FNOSP/FlyNarwhal --skill remote-api-development -a claude-code`. Or copy the skill folder (.agents/skills/remote-api-development in FNOSP/FlyNarwhal) into .claude/skills/remote-api-development in your project. Claude Code loads it when a task matches its description.

How do I install Remote API Development in Codex?

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

Can I use Remote API Development 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 FNOSP/FlyNarwhal --skill remote-api-development -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/remote-api-development, .gemini/skills/remote-api-development, .github/skills/remote-api-development and .opencode/skills/remote-api-development in your project.

What does Remote API Development need to run?

Going by SKILL.md and its folder, Remote API Development needs the command-line tools its instructions call (flutter).

Does Remote API Development 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 Remote API Development 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 Remote API Development use?

Remote API Development is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Remote API Development use?

About 1.3k tokens (SKILL.md is roughly 5.1k 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 Remote API Development?

Skills that share tags, products or a category with Remote API Development: Fullstack Webapp (revfactory/harness-100, 1.3k stars), Flutter Retrofit Networking (HoangNguyen0403/agent-skills-standard, 570 stars), Liquid Glass Widgets (sdegenaar/liquid_glass_widgets, 711 stars) and Squadron Worker (d-markey/squadron, 138 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Remote API Development?

FNOSP (a GitHub organization) maintains it in FNOSP/FlyNarwhal, which has 495 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 6, 2026.

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