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 jiushiwon/wg-skills --skill frontend-request-skillgit clone --depth 1 https://github.com/jiushiwon/wg-skillsWrote 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/jiushiwon/wg-skills/frontend-request-skill)<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/frontend-request-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/frontend-request-skill/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/jiushiwon/wg-skills/frontend-request-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/frontend-request-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to medium
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 →
- medium Tool Misuse · line 72 Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.Fix: Override unsafe defaults with secure settings (verify=True, auth required, restrictive permissions). Review and harden all tool configurations.
- medium Tool Misuse · line 180 Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.Fix: Override unsafe defaults with secure settings (verify=True, auth required, restrictive permissions). Review and harden all tool configurations.
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.00066 | $0.05985 |
| Opus 5.5 | $0.00026 | $0.02394 |
| Sonnet 5.5 | $0.00013 | $0.01197 |
| Haiku 4.5 | $0.00007 | $0.00598 |
Grade A, and why
frontend-request-skill 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 23d 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 — 457 lines — stays where its author put it; the contents beside it link to each section on GitHub.
前端请求层设计 Skill
定位
只聚焦前端请求层设计:从 request.ts 出发,建立统一、健壮、可维护的请求体系。
本 skill 提供两层规范:
- 通用前端规范:面向 Web/H5/React/Vue 等标准前端项目,基于
fetch/axios实现。 - uniapp 适配规范:面向 uni-app 小程序/APP/H5 跨端项目,基于
uni.request实现。
二者核心思想完全一致(统一入口、响应信封、鉴权拦截、错误码映射、Token 刷新队列、SSE、上传),仅底层网络 API 不同。
本 skill 只处理请求相关逻辑,不依赖其他 skill。
前后端契约(强约定)
本 skill 的前端消费流程遵循
references/api-contract.md;响应信封、错误码、JWT、分页的公共定义以backend/shared/为准,业务接口以项目api-contract.md为准。该消费规范只定义前端落地方式:
- 接口存放位置(vue/uniapp/react 统一
src/api/)- 接口存放位置(vue/uniapp/react 统一
src/api/)- 读取项目
api-contract.md的顺序与目录落位- showError 参数语义(默认
false自动弹,true调用方自己处理)- HTTP 500 兜底(强制 swallow 用户 Toast,交给全局错误处理)
强约定:
- 后端新生成业务 → 必须更新后端
api-contract.md - 前端新加接口 → 必须读取契约,按契约定义路径/字段/code
- 契约变更必须前后端同步
解决的问题
| 痛点 | 后果 | 本技能方案 |
|---|---|---|
| 每个页面各自调原生请求 | 鉴权/错误处理重复 | 统一 request.ts |
| Token 过期无感知 | 用户操作失败 | 响应拦截器识别 401,统一交给 auth service 处理 |
| 重复点击导致重复请求 | 数据异常/资源浪费 | 防抖去重 |
| 后端接口未 ready | 前端阻塞 | Mock 机制 |
| 游客误触敏感接口 | 报错/白屏 | 请求层前置拦截 |
| 错误提示不统一 | 用户体验差 | 统一错误通知 |
| SSE/流式接口不知如何接入 | 聊天/AI 回复无法流式展示 | 跨端 SSE 封装 + 打字机效果 |
| Token 过期后并发请求全部失败 | 用户重复登录、数据丢失 | Token 刷新队列 + 失败请求自动重试 |
When to Use
- "请求封装"
- "request.ts 怎么写"
- "前端请求统一处理"
- "uniapp 请求统一处理"
- "接口拦截"
- "Token 刷新"(请求层衔接部分,详见 references/auth-patterns.md)
- "游客模式拦截"
- "Mock 数据配置"
- "接口防抖"
- "错误处理"
- "文件上传"
- "SSE 流式请求"
- "打字机效果"
- "Server-Sent Events"
- "AI 聊天流式回复"
When NOT to Use
- 需要完整登录鉴权/权限设计 → 本 skill 只提供请求层衔接,完整鉴权体系需单独设计
- 需要项目整体规范化/目录结构诊断 → 不在本 skill 范围内
- 需要跨平台兼容性审计 → 不在本 skill 范围内
两层规范速查
| 规范 | 适用场景 | 底层 API | 参考位置 |
|---|---|---|---|
| 通用前端规范 | Web / H5 / React / Vue 等 | fetch / axios |
references/frontend-spec.md |
| uniapp 适配规范 | 微信小程序 / App / H5 | uni.request / uni.uploadFile |
references/uniapp-spec.md |
What ships with it
9 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.
- 23d ago Changed 27c2ec658fb5
- 25d ago Changed f4e9ca008245
- 1mo ago Changed · +4 lines 924b24230b21
- 2mo ago Changed · +106 lines 7ab572d65d8e
- 3mo ago First seen · 347 lines · 66 tokens per session scan A fede8a5888f5
frontend-request-skill is a skill published in the GitHub repository jiushiwon/wg-skills (154 stars, last pushed 6d ago), licensed Apache-2.0. It adds 66 tokens to every session and 5,985 once invoked, about $0.0003 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.
frontend-request-skill compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| frontend-request-skilljiushiwon/wg-skills | Skill | 154 | 6d ago | Apache-2.0 | A | 66 | Claude Code, Codex |
| mem0-oss-to-platformmem0ai/mem0 | Skill | 70k | 3d ago | Apache-2.0 | A | 217 | Claude Code, Codex |
| tao-run-inference-serviceNVIDIA/skills | Skill | 4.2k | today | Apache-2.0 | A | 92 | Claude Code |
| azure-mgmt-botservice-dotnetmicrosoft/skills | Skill | 3.3k | yesterday | MIT | A | 78 | Claude Code |
| fastapi-router-pymicrosoft/skills | Skill | 3.3k | yesterday | MIT | A | 46 | Claude Code |
| dev-runtimelangwatch/langwatch | Skill | 5.1k | today | Apache-2.0 | A | 172 | Claude Code |
| api-designericrisco/rsc-harness | Skill | 691 | 5d ago | MIT | A | 105 | Claude Code, Codex |