Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

dev-coding-backend开发编码后端

Agent Skill

dev-coding-backend 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

194

周安装

8

GitHub Stars

公开资料未说明

下载量

63
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dev-coding-backend(开发编码后端)
来源仓库:https://github.com/codihaus/claude-skills
仓库路径:skills/dev-coding-backend
安装命令:
npx skills add https://github.com/codihaus/claude-skills --skill dev-coding-backend
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/codihaus/claude-skills --skill dev-coding-backend

简介

dev-coding-backend 专注于后端逻辑、API 接口和数据层实现,提供数据库模式、服务函数和架构设计支持。

  • 当需求涉及 API 契约、Schema 变更或后端业务逻辑时自动激活本技能。
  • 使用前应已定义清晰的接口规范和数据库结构,便于生成一致的服务代码。
  • 生成的代码需通过单元测试和业务校验,确保符合生产环境要求。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

/dev-coding-backend - Backend Implementation

Skill Awareness: See skills/_registry.md for all available skills. - Loaded by: /dev-coding when API/schema work needed - References: Load tech-specific from references/ (directus.md, prisma.md, etc.) - After: Frontend uses API contract documented here

Backend-specific patterns for API, schema, and data layer implementation.

When Loaded

This skill is loaded by /dev-coding when:

  • Spec requires API endpoints
  • Spec requires schema/database changes
  • Spec requires backend logic

Workflow

Step 1: Understand Backend Requirements

From the UC spec, extract:

## Backend Requirements Checklist

[ ] Schema changes needed?
    - New collections/tables
    - New fields on existing
    - Relations to add

[ ] API endpoints needed?
    - Method + Path
    - Request body
    - Response shape
    - Auth required?

[ ] Business logic?
    - Validation rules
    - Calculations
    - Side effects (emails, notifications)

[ ] External integrations?
    - Third-party APIs
    - Webhooks
    - File storage

Step 2: Schema First (if needed)

Order matters: Schema before API

1. Design schema based on spec
2. Create/modify collections or tables
3. Set up relations
4. Configure permissions/roles
5. Verify schema is correct

Verification:

# For Directus - check collection exists
curl "$DIRECTUS_URL/items/{collection}?limit=1" \
  -H "Authorization: Bearer $TOKEN"

# For Prisma - run migration
npx prisma migrate dev

# For SQL - verify table
psql -c "\\d {table_name}"

Step 3: API Implementation

For each endpoint in spec:

1. Create route/handler file
2. Implement request parsing
3. Add validation
4. Implement business logic
5. Handle errors
6. Return response

Follow project patterns (from scout):

  • File location (routes/, api/, controllers/)
  • Naming convention
  • Error handling pattern
  • Response format

Step 4: API Patterns

REST Conventions

GET    /api/{resource}        → List
GET    /api/{resource}/:id    → Get one
POST   /api/{resource}        → Create
PUT    /api/{resource}/:id    → Update (full)
PATCH  /api/{resource}/:id    → Update (partial)
DELETE /api/{resource}/:id    → Delete

Request Validation

// Always validate input
const schema = z.object({
  email: z.string().email(),
  password: z.string().min(8),
});

const result = schema.safeParse(req.body);
if (!result.success) {
  return res.status(400).json({
    error: 'Validation failed',
    details: result.error.issues
  });
}

Error Handling

// Consistent error format
{
  "error": "Error message for client",
  "code": "ERROR_CODE",
  "details": {} // Optional additional info
}

// HTTP status codes
200 - Success
201 - Created
400 - Bad request (validation)
401 - Unauthorized
403 - Forbidden
404 - Not found
409 - Conflict
500 - Server error

Authentication Check

// Verify auth before processing
if (!req.user) {
  return res.status(401).json({ error: 'Unauthorized' });
}

// Check permissions
if (!req.user.permissions.includes('create:posts')) {
  return res.status(403).json({ error: 'Forbidden' });
}

Step 5: Verification

Test each endpoint:

# Test with curl
curl -X POST http://localhost:3000/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"test@test.com","password":"password123"}'

# Expected: 200 with token
# Or: 401 with error message

Verification checklist:

[ ] Endpoint responds
[ ] Correct status codes
[ ] Response matches spec
[ ] Validation rejects bad input
[ ] Auth required endpoints reject anonymous
[ ] Error messages are helpful but not leaky

Step 6: Document for Frontend

After backend complete, document what frontend needs:

## API Ready for Frontend

### POST /api/auth/login
- **Auth**: None (public)
- **Request**: `{ email: string, password: string }`
- **Success (200)**: `{ token: string, user: { id, email, name } }`
- **Errors**:
  - 400: Invalid input
  - 401: Invalid credentials

### GET /api/users/me
- **Auth**: Bearer token required
- **Request**: None
- **Success (200)**: `{ id, email, name, role }`
- **Errors**:
  - 401: No/invalid token

Common Patterns

Database Query Patterns

// Pagination
const page = parseInt(req.query.page) || 1;
const limit = parseInt(req.query.limit) || 10;
const offset = (page - 1) * limit;

const items = await db.items.findMany({
  skip: offset,
  take: limit,
  orderBy: { createdAt: 'desc' }
});

// Filtering
const where = {};
if (req.query.status) {
  where.status = req.query.status;
}

// Include relations
const post = await db.posts.findUnique({
  where: { id },
  include: { author: true, comments: true }
});

Transaction Pattern

// When multiple operations must succeed together
await db.$transaction(async (tx) => {
  const user = await tx.users.create({ data: userData });
  await tx.profiles.create({ data: { userId: user.id } });
  await tx.settings.create({ data: { userId: user.id } });
  return user;
});

Soft Delete Pattern

// Don't actually delete, mark as deleted
await db.posts.update({
  where: { id },
  data: {
    deletedAt: new Date(),
    status: 'deleted'
  }
});

// Query excludes deleted
const posts = await db.posts.findMany({
  where: { deletedAt: null }
});

Security Checklist

[ ] Input validated before use
[ ] SQL/NoSQL injection prevented (use parameterized queries)
[ ] Auth checked on protected routes
[ ] Permissions verified for actions
[ ] Sensitive data not logged
[ ] Passwords hashed (never plain text)
[ ] Rate limiting on auth endpoints
[ ] CORS configured correctly
[ ] No secrets in code (use env vars)

Debugging

API Not Responding

# Check if server running
curl http://localhost:3000/health

# Check logs
tail -f logs/server.log

# Check port in use
lsof -i :3000

Database Issues

# Check connection
npx prisma db pull  # Prisma
psql -c "SELECT 1"  # PostgreSQL

# Check migrations
npx prisma migrate status

Auth Issues

# Test token validity
curl http://localhost:3000/api/users/me \
  -H "Authorization: Bearer $TOKEN"

# Decode JWT (for debugging only)
echo $TOKEN | cut -d. -f2 | base64 -d

Tech-Specific References

Load additional patterns based on detected tech:

TechReference File
Directusreferences/directus.md
Node/Expressreferences/node.md
Prismareferences/prisma.md
PostgreSQLreferences/postgresql.md
Supabasereferences/supabase.md

These files contain tech-specific patterns, gotchas, and best practices. Add them as your projects use different stacks.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.94%
按下载量换算21

Claude

29.58%
按下载量换算19

Cursor

19.26%
按下载量换算12

Gemini CLI

8.83%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills