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.
npx skills add bovinphang/frontend-craft --skill fec-api-integrationgit clone --depth 1 https://github.com/bovinphang/frontend-craftWrote 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.
[](https://agentmods.dev/skills/bovinphang/frontend-craft/fec-api-integration)<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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
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.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00120 | $0.01407 |
| Opus 5.5 | $0.00048 | $0.00563 |
| Sonnet 5.5 | $0.00024 | $0.00281 |
| Haiku 4.5 | $0.00012 | $0.00141 |
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 25d 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.
How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API 集成
适用于前端与后端边界的类型、错误、鉴权、上传、实时通信和用户状态设计。需要具体代码模式时加载 integration-patterns.md。
用途
规范前端 API 集成边界,让请求、错误、鉴权和实时数据可维护。
流程
-
明确接口所有权
- 同团队 TypeScript 全栈可考虑 tRPC 或共享 schema。
- 多语言或多消费者 API 优先 OpenAPI/GraphQL codegen。
- 小型内部应用可用 typed fetch wrapper,但类型必须集中维护。
- 不在组件里散落
fetch、URL、header、错误解析和 token 逻辑。 - 公共接口需要明确版本、兼容窗口、废弃字段策略和调用方范围。
-
建立客户端边界
- 用一个 API client 处理 base URL、credentials、JSON 解析、超时、取消和统一错误。
- 环境变量只读取公开前缀,私密 token 不进入客户端 bundle。
- 组件只消费 domain 函数或 query/mutation hook,不直接拼接接口路径。
- 204、空响应、非 JSON 错误和网络断开要有明确行为。
- TypeScript contract 必须覆盖请求、响应、错误形状和分页/游标元数据。
-
映射用户可理解的错误
- 401:刷新失败后引导登录。
- 403:说明权限不足,不重复重试。
- 404:展示缺失状态或返回上级入口。
- 409:提示冲突和下一步操作。
- 422:映射字段级错误。
- 429/5xx/网络错误:先区分安全读取与提交状态不明的写入。只有操作契约允许安全重放(必要时使用服务端支持的幂等键及相同意图),才在单层、有上限的退避/截止时间预算内重试;否则展示待确认状态并查询核对,不能仅凭断网重复写入。
- 未识别错误要落到统一 fallback,不把原始后端异常暴露给用户。
- 所有错误都应归一到用户可恢复动作:重试、重新登录、修改输入、返回上级、联系支持或稍后再试。
- 错误对象要保留面向日志的 trace id / request id,但 UI 不暴露内部堆栈、SQL、服务名或敏感字段。
-
管理接口演进
- 兼容新增字段;删除或改名字段必须走迁移期、适配层或双写/双读策略。
- 用 schema、类型生成物或 contract test 捕捉破坏性变更。
- 对前后端协作项记录状态码、错误码、幂等性、重试语义和时区/金额/枚举规则。
-
处理鉴权刷新
- Access token 生命周期短,refresh 优先放在 httpOnly cookie 或服务端会话。
- 401 后只允许单次刷新队列,避免多个请求同时刷新。
- 刷新失败要清理本地身份状态并跳转登录。
- 不把 bearer token 放在 URL、localStorage 或日志里。
-
选择上传与实时方案
- 小文件可用 multipart;大文件优先预签名直传或分片上传。
- 只需要服务端推送时用 SSE;双向协作、聊天或多人状态用 WebSocket。
- 简单状态刷新、低频任务进度可用 polling,并设置停止条件。
- 上传和实时连接都需要取消、重连、超时和错误 UI。
-
验证集成质量
- 检查 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 服务器转发大文件,除非有明确合规或扫描需求。
- 不在公共接口里直接暴露临时字段、数据库字段名或后端内部错误结构。
What ships with it
2 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.
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.
- 25d ago Changed · +4 lines a1afafea99ed
- 3mo ago First seen · 79 lines · 120 tokens per session scan A 588f547a08f6
fec-api-integration is a skill published in the GitHub repository bovinphang/frontend-craft (24 stars, last pushed 18d ago), licensed MIT. It adds 120 tokens to every session and 1,407 once invoked, about $0.0005 per session on Opus 5.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.
fec-api-integration compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| fec-api-integrationbovinphang/frontend-craft | Skill | 24 | 18d ago | MIT | A | 120 | Claude Code |
| adhdszarkans/multi | Skill | 26 | 2d ago | MIT | A | 124 | Claude Code |
| validate-apijohnkozaris/jko-claude-plugins | Skill | 11 | 29d ago | MIT | A | 20 | Claude Code |
| backend-architecturejohnkozaris/jko-claude-plugins | Skill | 11 | 29d ago | MIT | A | 119 | Claude Code |
| validate-wsjohnkozaris/jko-claude-plugins | Skill | 11 | 29d ago | MIT | A | 19 | Claude Code |
| brand-designrfxlamia/pocketto | Skill | 8 | 1mo ago | MIT | B | 146 | Claude Code |
| dotnet-backend-expertmathisk2095/jko-claude-plugins | Skill | 3 | 1mo ago | MIT | A | 181 | Claude Code |