backend-server

backend-server is a skill for Claude Code, Codex from wangjianqi/AppStore. It costs 58 tokens per session (4,225 once invoked), scanned A, original, MIT.

A guide for building backend services, the server-side code and data systems that support an app. It covers APIs, databases, authentication, deployment, and services such as Supabase, Cloudflare Workers, Vapor, and Firebase.

In plain words
What is it for?
Use it when creating APIs, choosing a backend platform, designing database access policies, adding authentication, or deploying server and serverless code.
Why use it?
It compares common backend approaches and sets rules for protecting database access and keeping server credentials out of the app.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Install

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.

agentmods
npx agentmods add skills/wangjianqi/appstore/10-backend-server
Any agent
npx skills add wangjianqi/AppStore --skill 10-backend-server
Clone the repo
git clone --depth 1 https://github.com/wangjianqi/AppStore

Made for: Claude Code, Codex.

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.

agentmods badge for backend-server

README.md
[![agentmods](https://agentmods.dev/badge/skills/wangjianqi/appstore/10-backend-server.svg)](https://agentmods.dev/skills/wangjianqi/appstore/10-backend-server)
Your own site
<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>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,225 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 6d ago against content hash b1237c486532, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

ios-claude-skills/10-backend-server/SKILL.md · 463 lines

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,禁止 public schema 表无策略暴露
  • 策略命名:{操作}_{表名}_{角色},如 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_role key 到客户端,仅限服务端 / 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 })
  }

  // 业务逻辑...
})

Read the full file on GitHub · 463 lines

Changes

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.

  1. 6d ago First seen · 463 lines · 58 tokens per session scan A b1237c486532

Subscribe to this mod's changes

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.

Related

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.

bybren-llc/safe-agentic-workflow · 57 tokens

migration-helper

Guide safe database and code migrations with zero-downtime strategies.

nguyenthienthanh/aura-frog · 16 tokens

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 步流程。.

Grid0723/skills · 51 tokens

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.

wshobson/agents · 33 tokens

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…

forcedotcom/sf-skills · 194 tokens

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…

melandlabs/openloomi · 106 tokens