Uniapp Request Skill logo

Uniapp Request Skill

Community
jiushiwon
uniapp-request-skill

当用户在 uniapp 项目中需要设计或审查请求层(request.ts 封装、拦截器、去重、Mock、错误处理、文件上传、SSE 流式请求、Token 刷新、游客拦截、防抖)时触发。本 skill 是 `frontend-request-skill` 在 uniapp 场景的入口,权威规范位于 `frontend-request-skill/references/uniapp-spec.md`。

Overview

Publisherjiushiwon
Repositorywg-skills
Skill nameuniapp-request-skill
Stars
123
Forks
38
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by jiushiwon on GitHub. Read the source before you install it.

Installation

Install the Uniapp Request Skill AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/jiushiwon/wg-skills/tree/main/vibeCoding/frontend/uniapp/uniapp-request-skill
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jiushiwon/wg-skills.git /tmp/wg-skills
mkdir -p .claude/skills
cp -r /tmp/wg-skills/vibeCoding/frontend/uniapp/uniapp-request-skill .claude/skills/uniapp-request-skill
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Uniapp Request Skill in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Uniapp Request Skill on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Uniapp Request Skill is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

UniApp Request Layer Skill

定位

只聚焦 uniapp 请求层设计:基于 uni.request / uni.uploadFile / uni.downloadFile 建立统一、健壮、可维护的请求体系。

权威规范位于 frontend-request-skill/references/uniapp-spec.md。本 skill 是其在 uniapp 场景的入口与触发词聚合。

When to Use

触发词:

  • "uniapp 请求封装"
  • "uniapp request.ts"
  • "uniapp 接口拦截"
  • "uniapp Token 刷新"
  • "uniapp 游客模式拦截"
  • "uniapp Mock 数据"
  • "uniapp 接口防抖"
  • "uniapp 错误处理"
  • "uniapp 文件上传"
  • "uniapp SSE 流式"
  • "uniapp AI 聊天流式回复"
  • "uniapp 跨端请求层"

不触发场景

  • 通用 Web/Vue/React 请求设计(用 frontend-request-skill)
  • 完整登录鉴权体系(用 uniapp-auth-skill)
  • 跨平台兼容性审计(用 uniapp-crossplatform-audit-skill)

Workflow

Phase 1: 现状评估
   读取项目 src/utils/request.* / src/api/* / src/services/*
   评估是否已封装、是否接入鉴权、是否处理 SSE

Phase 2: 规范对照
   按 frontend-request-skill/references/uniapp-spec.md 的 11 项要点逐条对照
   输出"差距清单"

Phase 3: 用户确认
   列出"哪些项需要补、哪些项可保持现状"
   用户确认后进入实施

Phase 4: 改造实施
   新建或改造 src/utils/request.ts
   集成 auth、错误处理、Mock、防抖、SSE、上传

Phase 5: 验证
   小程序 / H5 / App 三端联调
   401 刷新流程、SSE 流式、上传进度回归

11 项核心要点(详见 frontend-request-skill/references/uniapp-spec.md)

#要点适用层
1统一入口 request.tsrequest
2响应信封 { code, message, data }response
3鉴权拦截 + Token 注入interceptor
4401 自动刷新 Token + 队列重试interceptor
5游客模式拦截interceptor
6请求防抖 / 重复拦截interceptor
7Mock 数据机制dev
8错误码统一映射与通知interceptor
9文件上传独立封装 + 进度回调upload
10SSE 流式请求 + 打字机效果stream
11网络异常 / 超时重试策略interceptor

跨端差异要点

端网络 API注意点
微信小程序uni.request / uni.uploadFile需配置合法域名;不支持长连接需用 SSE 兼容方案
H5uni.request(包装 fetch)CORS 跨域处理
Appuni.request(plus.net)SSL 证书、离线缓存

完整端间差异参见 uniapp-crossplatform-audit-skill。

输出文件

  • src/utils/request.ts — 请求层入口
  • src/utils/upload.ts — 上传封装
  • src/utils/sse.ts — SSE 流式封装
  • src/api/auth.ts — Token 刷新队列示例

本 skill 不直接修改既有 request.ts,用户确认差距清单后才实施改造。

参考标准

自我审计

本 skill 升级后应核对:

  • 触发词与 README.md 一致
  • 权威规范位置 frontend-request-skill/references/uniapp-spec.md 无死链
  • 不自动改造现有 request.ts

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Uniapp Request Skill AI skill do?

当用户在 uniapp 项目中需要设计或审查请求层(request.ts 封装、拦截器、去重、Mock、错误处理、文件上传、SSE 流式请求、Token 刷新、游客拦截、防抖)时触发。本 skill 是 `frontend-request-skill` 在 uniapp 场景的入口,权威规范位于 `frontend-request-skill/references/uniapp-spec.md`。

Why use Uniapp Request Skill on TypingMind?

Because you install it once and use it with any model. Uniapp Request Skill is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Uniapp Request Skill in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jiushiwon/wg-skills/tree/main/vibeCoding/frontend/uniapp/uniapp-request-skill. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Uniapp Request Skill?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Uniapp Request Skill?

As many as you like. As long as a model supports skills, you can use Uniapp Request Skill with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Uniapp Request Skill AI skill free?

Yes. It is published on GitHub by jiushiwon under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇