Install any skill in seconds. Free to start, no credit card required.
Get Started Free →xu-xiang/backend-patterns
后端架构模式、API 设计、数据库优化以及针对 Node.js、Express 和 Next.js API 路由的服务端最佳实践。
Passed 15 of 22 test cases with the skill, and 12 of 22 without it.
and 3 more in the full report
4 fixed11 passed either way6 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
We are building an AI semantic search feature for markets. The handler needs to generate vector embeddings, run a vector similarity search, fetch full market records from the database, and return them sorted by similarity score. Should this entire pipeline go directly into the Next.js API route? Show how to structure this in TypeScript.
| Checked | Without skill | With skill |
|---|---|---|
| Encapsulates business logic and vector search orchestration inside a dedicated Service class | Missed | Passed |
| Injects the Repository instance into the Service constructor rather than instantiating database clients directly inside the service | Missed | Passed |
The instructions your model reads when the skill loads.
用於可擴展伺服器端應用程式的後端架構模式和最佳實務。
// ✅ 基於資源的 URL
GET /api/markets # 列出資源
GET /api/markets/:id # 取得單一資源
POST /api/markets # 建立資源
PUT /api/markets/:id # 替換資源
PATCH /api/markets/:id # 更新資源
DELETE /api/markets/:id # 刪除資源
// ✅ 用於過濾、排序、分頁的查詢參數
GET /api/markets?status=active&sort=volume&limit=20&offset=0
// 抽象資料存取邏輯
interface MarketRepository {
findAll(filters?: MarketFilters): Promise<Market[]>
findById(id: string): Promise<Market | null>
create(data: CreateMarketDto): Promise<Market>
update(id: string, data: UpdateMarketDto): Promise<Market>
delete(id: string): Promise<void>
}
class SupabaseMarketRepository implements MarketRepository {
async findAll(filters?: MarketFilters): Promise<Market[]> {
let query = supabase.from('markets').select('*')
if (filters?.status) {
query = query.eq('status', filters.status)
}
test cases passed, vs 12 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.