fec-api-integration

fec-api-integration is a skill for Claude Code from bovinphang/frontend-craft. It costs 120 tokens per session (1,285 once invoked), scanned A, original, MIT.

A guide for connecting front-end code to back-end APIs, including typed clients, authentication, errors, uploads, and live connections such as SSE or WebSockets.

In plain words
What is it for?
Use it to design API clients, choose REST, tRPC, OpenAPI, or GraphQL approaches, handle retries and authentication refresh, map server errors, and manage uploads or real-time updates.
Why use it?
It prevents request details, token handling, error mapping, and loading states from being scattered across components or exposed unsafely.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the frontend-craft plugin — 56 skills, 11 commands, 14 agents, 5 hooks, 6 MCP servers shipped together

Good fit Use it to design API clients, choose REST, tRPC, OpenAPI, or GraphQL approaches, handle retries and authentication refresh, map server errors, and manage uploads or real-time updates.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bovinphang/frontend-craft/fec-api-integration
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.

Any agent
npx skills add bovinphang/frontend-craft --skill fec-api-integration
Clone the repo
git clone --depth 1 https://github.com/bovinphang/frontend-craft

Made for: Claude Code.

Or install frontend-craft, the plugin that ships this one along with the rest of its 56 skills, 11 commands, 14 agents, 5 hooks, 6 MCP servers.

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 fec-api-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-api-integration.svg)](https://agentmods.dev/skills/bovinphang/frontend-craft/fec-api-integration)
Your own site
<a href="https://agentmods.dev/skills/bovinphang/frontend-craft/fec-api-integration"><img src="https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-api-integration.svg" alt="Measured on agentmods" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,285 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 47
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
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.1 $0.00120 $0.01285
Opus 5 $0.00060 $0.00642
Sonnet 5 $0.00024 $0.00257
Haiku 4.5 $0.00012 $0.00128

Measured 8d ago against content hash 588f547a08f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

fec-api-integration 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 8d 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.

localized/zh-CN/skills/fec-api-integration/SKILL.md · 79 lines

How it starts

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

API 集成

适用于前端与后端边界的类型、错误、鉴权、上传、实时通信和用户状态设计。需要具体代码模式时加载 integration-patterns.md

用途

规范前端 API 集成边界,让请求、错误、鉴权和实时数据可维护。

流程

  1. 明确接口所有权

    • 同团队 TypeScript 全栈可考虑 tRPC 或共享 schema。
    • 多语言或多消费者 API 优先 OpenAPI/GraphQL codegen。
    • 小型内部应用可用 typed fetch wrapper,但类型必须集中维护。
    • 不在组件里散落 fetch、URL、header、错误解析和 token 逻辑。
    • 公共接口需要明确版本、兼容窗口、废弃字段策略和调用方范围。
  2. 建立客户端边界

    • 用一个 API client 处理 base URL、credentials、JSON 解析、超时、取消和统一错误。
    • 环境变量只读取公开前缀,私密 token 不进入客户端 bundle。
    • 组件只消费 domain 函数或 query/mutation hook,不直接拼接接口路径。
    • 204、空响应、非 JSON 错误和网络断开要有明确行为。
    • TypeScript contract 必须覆盖请求、响应、错误形状和分页/游标元数据。
  3. 映射用户可理解的错误

    • 401:刷新失败后引导登录。
    • 403:说明权限不足,不重复重试。
    • 404:展示缺失状态或返回上级入口。
    • 409:提示冲突和下一步操作。
    • 422:映射字段级错误。
    • 429/5xx/网络错误:允许退避重试或展示稍后再试。
    • 未识别错误要落到统一 fallback,不把原始后端异常暴露给用户。
    • 所有错误都应归一到用户可恢复动作:重试、重新登录、修改输入、返回上级、联系支持或稍后再试。
    • 错误对象要保留面向日志的 trace id / request id,但 UI 不暴露内部堆栈、SQL、服务名或敏感字段。
  4. 管理接口演进

    • 兼容新增字段;删除或改名字段必须走迁移期、适配层或双写/双读策略。
    • 用 schema、类型生成物或 contract test 捕捉破坏性变更。
    • 对前后端协作项记录状态码、错误码、幂等性、重试语义和时区/金额/枚举规则。
  5. 处理鉴权刷新

    • Access token 生命周期短,refresh 优先放在 httpOnly cookie 或服务端会话。
    • 401 后只允许单次刷新队列,避免多个请求同时刷新。
    • 刷新失败要清理本地身份状态并跳转登录。
    • 不把 bearer token 放在 URL、localStorage 或日志里。
  6. 选择上传与实时方案

    • 小文件可用 multipart;大文件优先预签名直传或分片上传。
    • 只需要服务端推送时用 SSE;双向协作、聊天或多人状态用 WebSocket。
    • 简单状态刷新、低频任务进度可用 polling,并设置停止条件。
    • 上传和实时连接都需要取消、重连、超时和错误 UI。
  7. 验证集成质量

    • 检查 loading、empty、error、unauthorized、offline、retrying 状态。
    • 用浏览器网络面板确认 base URL、credentials、CORS 和状态码行为。
    • 用 mock 或测试服务覆盖 401、403、422、500、断网和取消请求。
    • 确认客户端 bundle 不包含私密环境变量、服务端密钥或内部地址。
    • 对关键 API client 行为补最小测试,证明超时、取消、错误映射和刷新队列可预期。
    • 验证错误边界与请求层协作:渲染异常进 Error Boundary,请求失败进可恢复 UI,不互相吞掉。

约束

  • 不在页面组件中直接管理 token refresh、错误格式解析或重试策略。
  • 不对 4xx 业务错误做盲目自动重试。
  • 不把后端异常栈、内部错误码或原始 SQL/服务名暴露给用户。
  • 不用 localStorage 存储高价值 token;若遗留系统无法避免,必须联动安全审查。
  • 不用 WebSocket 替代简单轮询,也不用轮询实现高频双向协作。
  • 不让上传经过 API 服务器转发大文件,除非有明确合规或扫描需求。
  • 不在公共接口里直接暴露临时字段、数据库字段名或后端内部错误结构。

Read the full file on GitHub · 79 lines

Files

What ships with it

1 file 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. 8d ago First seen · 79 lines · 120 tokens per session scan A 588f547a08f6

Subscribe to this mod's changes

fec-api-integration is a skill published in the GitHub repository bovinphang/frontend-craft (21 stars, last pushed 6d ago), licensed MIT. It adds 120 tokens to every session and 1,285 once invoked, about $0.0006 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

validate-api

Run the project's Hurl scenarios with an OIDC access token passed as a secret variable.

johnkozaris/jko-claude-plugins · 20 tokens

backend-architecture

This skill should be used for consequential backend architecture decisions: module or service boundaries; modular monoliths versus independent services; service extraction and data migration; data ownership and consistency; synchronous, event-driven, actor/stateful, or pipeline designs; failure isolation…

johnkozaris/jko-claude-plugins · 119 tokens

validate-ws

Run a bounded, protocol-aware WebSocket probe with an OIDC bearer token.

johnkozaris/jko-claude-plugins · 19 tokens

dotnet-backend-expert

This skill should be used when the user is writing, reviewing, debugging, or architecting pure .NET backend code for Kestrel-hosted services. It provides expert critique for REST endpoints, SignalR hubs, TypeScript/React client integration shape, pragmatic Rust interop, application services, AppHost-aware project…

mathisk2095/jko-claude-plugins · 181 tokens

python-backend-expert

This skill should be used when the user is writing, reviewing, debugging, or architecting Python backend code using Litestar or FastAPI with SQLAlchemy or Advanced Alchemy. Provides expert critique covering SOLID principles, hexagonal architecture, repository/service patterns, dependency injection, async correctness…

mathisk2095/jko-claude-plugins · 183 tokens

brand-design

Brand-aware design system generator that acts as Head of Brand. Translates abstract brand language into a mathematically-validated, implementation-ready design system, writes creative-brief.md as the source of truth for all UI/UX in a project, and optionally compiles it to framework tokens (Tailwind v4 @theme, v3…

rfxlamia/pocketto · 146 tokens