/api-endpoint - Create REST API endpointmarkdown
`# /api-endpoint Create REST API endpoint: $ARGUMENTS with full testing and documentation.
Route Setup
/routes/api/$ARGUMENTS.jsDatabase Integration
Testing Suite
/tests/api/$ARGUMENTS.test.jsDocumentation
/react-component - Full React component creationmarkdown
`# /react-component
Create React component: $ARGUMENTS with TypeScript, tests, and Storybook.
Core Implementation
// src/components/$ARGUMENTS/$ARGUMENTS.tsx
import React from 'react';
import './styles.css';
interface ${ARGUMENTS}Props {
// Define props with JSDoc comments
}
export const $ARGUMENTS: React.FC<${ARGUMENTS}Props> = ({}) => {
// Implementation with proper error boundaries
return <div></div>;
};`
Testing Strategy
/tests/components/$ARGUMENTS.test.tsxStorybook Stories
Styling & Accessibility
#### /database-migration` - Comprehensive migration workflow
# /database-migration
Create database migration: $ARGUMENTS with rollback and testing.
## Migration Planning
1. **Analysis Phase**
- Review current schema with `describe` commands
- Identify potential breaking changes
- Plan data migration strategy for existing records
- Estimate migration time for production data volume
2. **Migration Files**
```sql
-- migrations/$(date +%Y%m%d_%H%M%S)_$ARGUMENTS.up.sql
BEGIN TRANSACTION;
-- Forward migration
COMMIT;`
sql
- `*- migrations/$(date +%Y%m%d_%H%M%S)_$ARGUMENTS.down.sql*
BEGIN TRANSACTION;
*- Rollback migration*
COMMIT;`
1. **Testing Protocol**
- Test on development database with production data copy
- Verify migration performance with EXPLAIN ANALYZE
- Test rollback procedure completely
- Validate data integrity with checksums
2. **Production Deployment**
- Create database backup before migration
- Run migration during low-traffic window
- Monitor application health post-migration
- Document any manual steps required