| name | api |
| description | Review the API package for oRPC contracts, database schema, services, and every-plugin patterns. Use when user says /api or asks to review the API. |
| allowed-tools | Read, Grep, Glob |
| user-invocable | true |
API Package Review
Review the api/ package for quality, consistency, and every-plugin best practices.
Scope
api/
├── src/
│ ├── contract.ts # oRPC route definitions
│ ├── index.ts # Plugin definition (createPlugin)
│ ├── db/
│ │ ├── index.ts # Database connection layer
│ │ ├── schema.ts # Drizzle ORM schema
│ │ └── migrations/ # SQL migration files
│ └── services/
│ ├── index.ts # Service exports
│ └── agent.ts # NEAR AI integration
├── plugin.dev.ts # Local dev configuration
├── drizzle.config.ts # Drizzle config
└── package.json
Review Checklist
1. Contract Definition
2. Plugin Structure
3. Database Schema
4. Services
5. Router Handlers
6. Configuration
Key Files to Check
src/contract.ts - API contract definitions
src/index.ts - Plugin implementation
src/db/schema.ts - Database tables
src/db/index.ts - Database connection
src/services/agent.ts - NEAR AI integration
plugin.dev.ts - Development configuration
Output Format
Provide a structured review:
## API Package Review
### Summary
[Overall assessment]
### Issues Found
1. [File:line] - [Issue description]
### Recommendations
- [Improvement suggestions]
### Status: [PASS/NEEDS_WORK]