Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
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.
[](https://agentmods.dev/skills/aide-family/moon-web/update-api)<a href="https://agentmods.dev/skills/aide-family/moon-web/update-api"><img src="https://agentmods.dev/badge/skills/aide-family/moon-web/update-api.svg" alt="Measured on agentmods" height="20"></a>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.00079 | $0.02018 |
| Opus 5 | $0.00039 | $0.01009 |
| Sonnet 5 | $0.00016 | $0.00404 |
| Haiku 4.5 | $0.00008 | $0.00202 |
Grade A, and why
update-api 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 6d 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 — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.
更新 API(Update API)
根据后端服务的 OpenAPI 文档,同步更新前端 src/api/ 下的请求与类型。代码风格遵循 React 与 TypeScript 规范。
项目约定
- API 目录:
src/api/下每个一级目录对应一个后端服务:account— 认证与用户marksman— 策略与数据源rabbit— 消息与发送
- 文档地址:每个后端服务在根路径下提供
/doc/swagger/openapi.yaml,需从对应服务的 base URL 获取(如https://api.example.com/account/doc/swagger/openapi.yaml)。 - 请求封装:统一使用
src/api/common/request.ts的http(get/post/put/delete/patch),baseURL 为/v1;路径写相对路径如/datasources、/user/${uid}。 - 模块结构:每个子模块(如
marksman/datasource)包含:index.ts— 导出请求函数与 re-export 类型types.ts— 请求/响应/枚举的 TypeScript 类型定义
工作流程
-
确认目标服务与文档 URL
- 若用户未指定服务,询问要更新哪个服务(account / marksman / rabbit)或“全部”。
- 确认该服务对应的 OpenAPI 文档完整 URL(例如
{服务 base URL}/doc/swagger/openapi.yaml)。若项目中有配置(如.env、文档),优先使用;否则向用户确认。
-
获取并解析 OpenAPI
- 使用 GET 请求或读取本地/网络文件获取
openapi.yaml(或openapi.json)。 - 解析
paths与components.schemas,得到接口路径、方法、请求体/查询参数、响应 schema。
- 使用 GET 请求或读取本地/网络文件获取
-
映射到前端路径
- 前端 baseURL 为
/v1,若 OpenAPI 中 path 已含/v1或前缀,生成请求路径时去掉重复前缀,只保留与/v1后一致的部分(如/v1/datasources→ 请求路径/datasources)。 - 按现有习惯:一个 OpenAPI tag 或资源名对应
src/api/<服务>/<子模块>/一个目录;若已有对应目录则更新,没有则新建并补全index.ts、types.ts。
- 前端 baseURL 为
-
更新 types.ts
- 根据
components.schemas生成 TypeScript 接口/类型;枚举与后端一致时使用export enum,否则用string联合类型或string。 - 命名与现有风格一致:列表项
XxxItem、列表参数XxxListParams或ListXxxParams、列表响应XxxListResponse或ListXxxResponse、创建/更新参数CreateXxxParams、UpdateXxxParams等。 - 所有字段可选用
?,除非业务上明确必填;与后端一致的注释可保留简短说明。
- 根据
-
更新 index.ts
- 从
../../index或../../common/request引入http(与现有模块一致,见src/api/marksman/datasource/index.ts、src/api/account/user/index.ts)。 - 每个 path + method 对应一个导出函数:使用
http.get<T>()、http.post<T>()、http.put<T>()、http.delete<T>()、http.patch<T>(),泛型T为响应类型。 - 路径参数(如
uid)用模板字符串`/path/${uid}`;query 作为第二参数传入;body 作为 post/put/patch 的第二参数。 - 函数上方用 JSDoc 注释说明接口用途及路径,例如:
/** 获取数据源列表 GET /v1/datasources */。 - 文件末尾统一
export type { ... } from './types'以及需要的export { EnumName } from './types',与现有模块一致。
- 从
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.
- 6d ago First seen · 121 lines · 79 tokens per session scan A 65aa0d0b6cb3
update-api is a skill published in the GitHub repository aide-family/moon-web (12 stars, last pushed 2mo ago), licensed MIT. It adds 79 tokens to every session and 2,018 once invoked, about $0.0004 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.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…