AGENT SKILL

mongoose-expert

Use when implementing mongoose functionality with production-grade patterns and safeguards.

License 许可
MIT
最近更新
2026-04-11
Stars
★ 3
Forks
0

01 前言 Front Matter

name
mongoose-expert
metadata
{ "hermes": { "tags": [ "codex-agent", "databases-storage" ], "source": "codex-field-kit/databases-storage" } }
description
Use when implementing mongoose functionality with production-grade patterns and safeguards.

03 SKILL.md 正文

Mongoose Expert

Focus Areas

  • Designing efficient Mongoose schemas for MongoDB collections
  • Configuring and utilizing Mongoose connections
  • Implementing document validation strategies
  • Applying Mongoose middleware (pre/post hooks)
  • Query optimization with Mongoose methods
  • Utilizing Mongoose's population feature for references
  • Proper index creation for performance enhancement
  • Handling Mongoose error messages and debugging
  • Managing document relationships and subdocuments
  • Monitoring and optimizing Mongoose performance

Approach

  • Leverage schemas to enforce data structure and consistency
  • Optimize queries with projection and lean methods
  • Use middleware to encapsulate reusable logic
  • Implement cascading deletes using middleware hooks
  • Apply index options to ensure efficient data retrieval
  • Use validators for robust data integrity checks
  • Utilize .lean() for read operation to increase performance
  • Employ embedded documents to model hierarchical structures
  • Address connection pooling to maximize efficiency
  • Regularly update Mongoose to leverage latest features/fixes

Quality Checklist

  • Schemas are well-defined with proper field types
  • Middleware is efficiently used to enforce logic
  • Validators comprehensively check input data
  • Indexes cover all necessary query patterns
  • Queries are optimized with appropriate projections
  • Relationships are clearly modeled and managed
  • Connection errors are handled and logged
  • Mongoose populate is used judiciously
  • Read operations are performance-optimized
  • Data integrity is rigorously maintained across operations

Output

  • Schemas with complete validation and indexing
  • Efficient and reusable query methods
  • Documentation on schema and middleware design
  • Performance reports with Mongoose-specific optimizations
  • Robust error handling and logging strategy
  • Tested relationships among MongoDB documents
  • Middleware hooks for automated data operations
  • Regularly reviewed and optimized Mongoose setup
  • Detailed setup instructions for Mongoose connection
  • Sample data interactions demonstrating Mongoose capabilities

04 同仓库更多 Skills

0xharryriddle
0xharryriddle/codex-field-kit

vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

前端开发
★ 3
0xharryriddle
0xharryriddle/codex-field-kit

swarm-planner

[EXPLICIT INVOCATION ONLY] Creates dependency-aware implementation plans optimized for parallel multi-agent execution.

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

super-swarm-spark

Only to be triggered by explicit super-swarm-spark commands.

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

role-creator

Create and install Codex custom agent roles in ~/.codex/config.toml, generate role config files, enforce supported keys, and guide users through required role inputs (model, reasoning effort, developer_instructions).

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

read-github

Read and search GitHub repository documentation via gitmcp.io MCP service. **WHEN TO USE:** - User provides a GitHub URL - User mentions a specific repo in owner/repo format - User asks "what does this repo do?", "read the docs for X repo", or similar - User wants to search code or docs within a repo

Skill与智能体开发
★ 3
0xharryriddle
0xharryriddle/codex-field-kit

planner

Create comprehensive, phased implementation plans with sprints and atomic tasks. Use when user says: "make a plan", "create a plan", "plan this out", "plan the implementation", "help me plan", "design a plan", "draft a plan", "write a plan", "outline the steps", "break this down into tasks", "what's the plan for", or any similar planning request. Also triggers on explicit "/planner" or "/plan" commands.

★ 3