fec-api-integration SKILL.md skillA
fec-api-integration from bovinphang/frontend-craft is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add bovinphang/frontend-craft/fec-api-integration@git:20260611.9d7f5e4Pins git:20260611.9d7f5e4 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- bovinphang/frontend-craft
- Path
localized/zh-CN/skills/fec-api-integration/SKILL.md- Versions recorded
- 1
- Latest version
- git:20260611.9d7f5e4, committed Jun 11, 2026
- Size
- 4,904 bytes
- Repository stars
- 22
- License
- MIT
用于设计、实现或审查前后端 API 集成、类型化 API client、REST/tRPC/OpenAPI 客户端选型、认证刷新、API 错误映射、上传流程、SSE/WebSocket/轮询选择、CORS 相关前端行为或跨边界 loading/error 状态。不要用于纯后端服务架构或仅 TanStack Query 缓存策略;中文触发词包括 API 集成、前后端联调、typed API client、接口错误处理、SSE、WebSocket。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# API 集成 适用于前端与后端边界的类型、错误、鉴权、上传、实时通信和用户状态设计。需要具体代码模式时加载 [integration-patterns.md](references/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 或服务端会话。 …
Read the whole file at its exact version.
How to install
mdr add bovinphang/frontend-craft/fec-api-integration@sha256:588f547a08f682f2The line at the top of this page pins the label git:20260611.9d7f5e4, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_ddjrxxvldmdaehsy)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Jun 11, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (4904 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
bovinphang/frontend-craft · 22 stars · license MIT · pushed 2026-09-26 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_ddjrxxvldmdaehsy GET https://markdownregistry.com/api/v1/resolve?ref=bovinphang/frontend-craft/fec-api-integration GET https://markdownregistry.com/api/v1/blob/588f547a08f682f25d2026670bc49f1a6bc32da70140b3aa6af7fecb3d0e9257
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from bovinphang/frontend-craft
Every file in bovinphang/frontend-craft