Token导航 LogoToken导航

Agent Skill · 研究检索

backend-model-creation(后端模型创建)

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

backend-model-creation 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 53,488。

总安装 533周安装 22GitHub Stars 公开资料未说明下载 174核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

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

AgentSkills.tonpx skills
npx skills add workshop-ventures/skills --skill "backend-model-creation"

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

发现并安装 AI 代理的技能。适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景快速定位候选结果时使用。可结合来源仓库和原始 README 核验具体用法,建议确认权限范围和维护状态。

安装命令:npx skills add workshop-ventures/skills --skill "backend-model-creation"。注意是否会触发联网、命令执行或文件读写,确保操作安全可控。

来源仓库内路径:skills/backend-model-creation

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add workshop-ventures/skills --skill "backend-model-creation";命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

backend-model-creation 怎么安装?

在终端执行 npx skills add workshop-ventures/skills --skill "backend-model-creation"。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

backend-model-creation 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

backend-model-creation 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

backend-model-creation 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

backend-model-creation 用的人多吗?

公开数据是累计安装 533 次,近一周安装 22 次,下载 174 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

backend-model-creation 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
backend-model-creation

后端模型创建 · 本页

533—需要联网MIT未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
backend-model-creation
description
Create a new Mongoose model with proper typing, utilities, and patterns. Use when asked to "create a model", "add a data model", "create a schema", or "add a new entity".

Backend Model Creation

This skill creates Mongoose models following established patterns with proper typing from @{project}/types.

Overview

Models follow a types-first approach:

  1. Define TypeScript types in @{project}/types
  2. Create Mongoose model in backend importing those types
  3. Use shared enum options for validation

File Structure

libs/types/src/
├── lib/
│   ├── Workflow.ts         # Type definitions
│   └── {Resource}.ts       # New resource types
└── index.ts                # Re-exports

apps/backend/src/models/
├── _utils.ts               # generateId, stripId helpers
├── Workflow.ts             # Mongoose model
└── {Resource}.ts           # New resource model

Step 1: Create Types in @{project}/types

Create libs/types/src/lib/{Resource}.ts:

// Define enum options as const arrays (used for both TS types and Mongoose validation)
export const ResourceStatusOptions = ['active', 'inactive', 'archived'] as const;
export type ResourceStatus = typeof ResourceStatusOptions[number];

// Optional: Additional enum options
export const ResourcePriorityOptions = ['low', 'medium', 'high'] as const;
export type ResourcePriority = typeof ResourcePriorityOptions[number];

// Subdocument types (if needed)
export type ResourceMetadata = {
  source?: string;
  tags?: string[];
  priority?: ResourcePriority;
};

// Main entity type
export type Resource = {
  id: string;
  name: string;
  description?: string;
  status: ResourceStatus;
  metadata?: ResourceMetadata;
  createdAt: Date;
  updatedAt: Date;
};

Export from libs/types/src/index.ts:

export * from './lib/Resource';

Step 2: Create the Mongoose Model

Create apps/backend/src/models/{Resource}.ts:

import { Schema, model, Document, Types } from 'mongoose';
import {
  Resource as IResource,
  ResourceStatusOptions,
  ResourcePriorityOptions,
} from '@{project}/types';
import { generateId, stripId } from './_utils';

// Subdocument schema (if needed)
const MetadataSchema = new Schema(
  {
    source: { type: String },
    tags: { type: [String], default: undefined },
    priority: { type: String, enum: ResourcePriorityOptions },
  },
  { _id: false }
);

// Main schema
const resourceSchema = new Schema<IResource>(
  {
    id: { type: String, required: true, unique: true, index: true, default: generateId },
    name: { type: String, required: true },
    description: { type: String },
    status: { type: String, enum: ResourceStatusOptions, required: true, default: 'active' },
    metadata: { type: MetadataSchema },
    createdAt: { type: Date, default: Date.now },
    updatedAt: { type: Date, default: Date.now },
  },
  {
    id: false,           // Disable Mongoose's virtual id (we use our own)
    versionKey: false,   // Disable __v field
    toJSON: { transform: stripId },
    toObject: { transform: stripId },
  }
);

// Compound indexes for common queries
resourceSchema.index({ status: 1, createdAt: -1 });

// Pre-save hook to update timestamp (Mongoose 8+ - no next() callback)
resourceSchema.pre('save', function () {
  this.updatedAt = new Date();
});

// Export document type for services
export type ResourceDocument = Document<unknown, object, IResource> &
  IResource & { _id: Types.ObjectId };

const Resource = model<IResource>('Resource', resourceSchema);
export default Resource;

Key Patterns

Utilities from _utils.ts

Always import from _utils:

import { generateId, stripId } from './_utils';
  • generateId: UUID v4 wrapper for generating unique IDs
  • stripId: Transform helper to remove _id from JSON/object output

ID Field Pattern

Always use this pattern for the id field:

id: { type: String, required: true, unique: true, index: true, default: generateId },

Enum Options Pattern

Define options as const arrays in types:

// In @{project}/types
export const StatusOptions = ['active', 'inactive'] as const;
export type Status = typeof StatusOptions[number];

// In Mongoose model
import { StatusOptions } from '@{project}/types';
status: { type: String, enum: StatusOptions, required: true, default: 'active' },

Schema Options

Always include these options to ensure clean API responses:

{
  id: false,           // Disable Mongoose's virtual id
  versionKey: false,   // Disable __v field
  toJSON: { transform: stripId },
  toObject: { transform: stripId },
}

Subdocument Schemas

For embedded documents, always disable _id:

const AddressSchema = new Schema(
  {
    street: { type: String, required: true },
    city: { type: String, required: true },
    zipCode: { type: String },
  },
  { _id: false }
);

// Use in main schema
address: { type: AddressSchema }

Array Fields

For optional arrays, use default: undefined to avoid empty arrays:

tags: { type: [String], default: undefined },

For required arrays with default empty:

items: { type: [ItemSchema], required: true, default: [] },

Indexes

Single field indexes:

id: { type: String, index: true },

Compound indexes (add after schema definition):

// Put equality filters first, then sort fields
resourceSchema.index({ status: 1, createdAt: -1 });
resourceSchema.index({ userId: 1, status: 1 });

Pre-save Hook

Mongoose 8+ uses synchronous hooks (no next() callback):

resourceSchema.pre('save', function () {
  this.updatedAt = new Date();
});

Document Type Export

Export the document type for use in services:

export type ResourceDocument = Document<unknown, object, IResource> &
  IResource & { _id: Types.ObjectId };

Complete Example

Types (libs/types/src/lib/Project.ts)

export const ProjectStatusOptions = ['planning', 'active', 'completed', 'archived'] as const;
export type ProjectStatus = typeof ProjectStatusOptions[number];

export const ProjectPriorityOptions = ['low', 'medium', 'high', 'critical'] as const;
export type ProjectPriority = typeof ProjectPriorityOptions[number];

export type ProjectMember = {
  userId: string;
  role: 'owner' | 'editor' | 'viewer';
  joinedAt: Date;
};

export type Project = {
  id: string;
  name: string;
  description?: string;
  status: ProjectStatus;
  priority: ProjectPriority;
  members: ProjectMember[];
  ownerId: string;
  startDate?: Date;
  dueDate?: Date;
  completedAt?: Date;
  createdAt: Date;
  updatedAt: Date;
};

Model (apps/backend/src/models/Project.ts)

import { Schema, model, Document, Types } from 'mongoose';
import {
  Project as IProject,
  ProjectStatusOptions,
  ProjectPriorityOptions,
} from '@{project}/types';
import { generateId, stripId } from './_utils';

// Member subdocument schema
const MemberSchema = new Schema(
  {
    userId: { type: String, required: true },
    role: { type: String, enum: ['owner', 'editor', 'viewer'], required: true },
    joinedAt: { type: Date, default: Date.now },
  },
  { _id: false }
);

// Main Project schema
const projectSchema = new Schema<IProject>(
  {
    id: { type: String, required: true, unique: true, index: true, default: generateId },
    name: { type: String, required: true },
    description: { type: String },
    status: { type: String, enum: ProjectStatusOptions, required: true, default: 'planning' },
    priority: { type: String, enum: ProjectPriorityOptions, required: true, default: 'medium' },
    members: { type: [MemberSchema], required: true, default: [] },
    ownerId: { type: String, required: true, index: true },
    startDate: { type: Date },
    dueDate: { type: Date },
    completedAt: { type: Date },
    createdAt: { type: Date, default: Date.now },
    updatedAt: { type: Date, default: Date.now },
  },
  {
    id: false,
    versionKey: false,
    toJSON: { transform: stripId },
    toObject: { transform: stripId },
  }
);

// Indexes
projectSchema.index({ ownerId: 1, status: 1 });
projectSchema.index({ status: 1, dueDate: 1 });

// Pre-save hook
projectSchema.pre('save', function () {
  this.updatedAt = new Date();
});

// Document type
export type ProjectDocument = Document<unknown, object, IProject> &
  IProject & { _id: Types.ObjectId };

const Project = model<IProject>('Project', projectSchema);
export default Project;

Checklist

After creating a new model:

  1. Create types in libs/types/src/lib/{Resource}.ts

- Define enum options as const arrays - Define subdocument types if needed - Define main entity type

  1. Export types from libs/types/src/index.ts
  1. Build types library: npx tsc -b libs/types/tsconfig.lib.json
  1. Create model in apps/backend/src/models/{Resource}.ts

- Import types and enum options from @{project}/types - Import generateId and stripId from ./_utils - Create subdocument schemas with { _id: false } - Add schema options: id: false, versionKey: false, transforms - Add indexes for common queries - Add pre-save hook for updatedAt - Export document type

  1. Create API schemas (if needed) in libs/types/src/api/{resource}.ts (see backend-route-creation skill)
  1. Create routes (if needed) in apps/backend/src/routes/{resource}.ts (see backend-route-creation skill)

平台分布

Claude Code

27.97%
按下载量换算49

windsurf

23.4%
按下载量换算41

trae

17.49%
按下载量换算30

OpenCode

10.99%
按下载量换算19

Codex

6.84%
按下载量换算12

Antigravity

3.23%
按下载量换算6

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

继续浏览同类 Skills