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 agentmods add skills/wangjianqi/appstore/10-backend-servernpx skills add wangjianqi/AppStore --skill 10-backend-servergit clone --depth 1 https://github.com/wangjianqi/AppStoreWrote 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/wangjianqi/appstore/10-backend-server)<a href="https://agentmods.dev/skills/wangjianqi/appstore/10-backend-server"><img src="https://agentmods.dev/badge/skills/wangjianqi/appstore/10-backend-server.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.00058 | $0.04225 |
| Opus 5 | $0.00029 | $0.02112 |
| Sonnet 5 | $0.00012 | $0.00845 |
| Haiku 4.5 | $0.00006 | $0.00422 |
Grade A, and why
backend-server 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 — 463 lines — stays where its author put it; the contents beside it link to each section on GitHub.
后端服务开发
方案选型
| 方案 | 语言 | 适合场景 | 免费额度 | 学习成本 |
|---|---|---|---|---|
| Supabase | SQL + TypeScript | 快速出产品、CRUD 为主 | 500MB 数据库 + 1GB 存储 | 低 |
| Cloudflare Workers | TypeScript | 轻量 API、全球加速 | 10 万请求/天 | 中 |
| Vapor | Swift | Swift 全栈、共享 Model | 需自备服务器 | 高 |
| Firebase | TypeScript / Dart | Google 生态、实时同步 | Spark 计划免费 | 中 |
选择原则:
- 独立开发者首选 Supabase(开箱即用,PostgreSQL + RLS 天然适合移动端)
- 追求极致轻量和全球边缘部署选 Cloudflare Workers
- 想前后端共享 Swift 代码选 Vapor
- 已在 Google 生态内选 Firebase
Supabase 规范
项目初始化
npx supabase init
npx supabase login
npx supabase link --project-ref <project-id>
数据库 & RLS
- 所有业务表必须启用 RLS,禁止
publicschema 表无策略暴露 - 策略命名:
{操作}_{表名}_{角色},如select_profiles_authenticated - 禁止在策略中使用
true(即允许所有访问),必须明确条件:
-- ✅ 正确:只允许用户访问自己的数据
CREATE POLICY select_profiles_authenticated ON profiles
FOR SELECT TO authenticated
USING (auth.uid() = user_id);
-- ❌ 禁止:允许所有人访问
CREATE POLICY select_profiles ON profiles
FOR SELECT USING (true);
- 视图必须设置
security_invoker = true:
CREATE VIEW public.user_stats WITH (security_invoker = true) AS
SELECT * FROM stats WHERE user_id = auth.uid();
- 禁止暴露
service_rolekey 到客户端,仅限服务端 / Edge Functions 使用
Edge Functions
- 函数放在
supabase/functions/目录,每个函数一个子目录 - 命名:
kebab-case,如send-push-notification - 必须验证用户身份:
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2'
Deno.serve(async (req) => {
const authHeader = req.headers.get('Authorization')
if (!authHeader) {
return new Response(JSON.stringify({ error: 'Unauthorized' }), { status: 401 })
}
const supabase = createClient(
Deno.env.get('SUPABASE_URL') ?? '',
Deno.env.get('SUPABASE_ANON_KEY') ?? '',
{ global: { headers: { Authorization: authHeader } } }
)
const { data: { user } } = await supabase.auth.getUser()
if (!user) {
return new Response(JSON.stringify({ error: 'Invalid token' }), { status: 401 })
}
// 业务逻辑...
})
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 · 463 lines · 58 tokens per session scan A b1237c486532
backend-server is a skill published in the GitHub repository wangjianqi/AppStore (11 stars, last pushed 3mo ago), licensed MIT. It adds 58 tokens to every session and 4,225 once invoked, about $0.0003 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-31.
Other skills, from other repositories
api-patterns
API route implementation patterns with RLS, validation, and error handling. Use when creating API routes, implementing CRUD endpoints, adding server-side validation, handling webhooks, or implementing error handling patterns. Do NOT use for frontend-only changes or database migrations without API involvement.
migration-helper
Guide safe database and code migrations with zero-downtime strategies.
tdx-dev-guide
TDX 项目新增数据获取器的完整开发流程。Use when implementing a new data fetcher in the TDX project——from defining the data model through registering CLI commands. 遵循 10 步流程。.
event-store-design
Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.
platform-custom-field-generate
Use this skill when users need to create, generate, or validate Salesforce Custom Field metadata. Trigger when users mention custom fields, field types, Roll-up Summary fields, Master-Detail relationships, Lookup relationships, formula fields, picklists, dependent (controlling) picklists, referencing a value set from…
openloomi-api
OpenLoomi ships a local-first HTTP API served from the desktop app (port 3414, fallback 3515). All auth, Memory, AI, RAG, Loop, and Audit data live in a local SQLite database — your data stays on your machine and the OpenLoomi app is the source of truth. The only externally-routed auth path is the Composio OAuth…