Skip to content
Back to skills

060 Advanced Patterns 1ff238ff

ASecurity

``` "Apply the Repository pattern to all database operations:

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 11, 2026
testingapidatabasefrontend

Works with

  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 060-advanced-patterns_1ff238ff --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 060 Advanced Patterns 1ff238ff?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 060 Advanced Patterns 1ff238ff
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-060-advanced-patterns-1ff238ff/badge)](https://www.skillsdirectory.com/skills/tools-only-060-advanced-patterns-1ff238ff)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Advanced Patterns

## Advanced Patterns

### Template Application
```
"Apply the Repository pattern to all database operations:

Create base:
- lib/repository/BaseRepository.ts
  - Generic CRUD methods
  - Error handling
  - Logging

Create implementations:
- lib/repository/UserRepository.ts
- lib/repository/ProductRepository.ts
- lib/repository/OrderRepository.ts

Update services:
- Inject repositories
- Remove direct database calls
- Update all services to use repositories"
```

### Code Generation Pipeline
```
"Generate full CRUD for entity 'Product':

1. Schema (prisma/schema.prisma)
   - Add Product model
   - Add relations

2. Migration
   - Create migration file

3. Repository
   - ProductRepository with typed methods

4. Service
   - ProductService with business logic

5. API Routes
   - Full REST endpoints

6. Validation
   - Zod schemas for input validation

7. Frontend
   - Types, hooks, components

8. Tests
   - Unit and integration tests"
```

### Cross-Cutting Concerns
```
"Add logging to all API routes:

1. Create logger utility:
   - lib/logger.ts with structured logging

2. Create middleware:
   - middleware/logging.ts

3. Update all API routes to:
   - Log request start
   - Log request completion
   - Log errors with context
   - Include correlation IDs

4. Add log aggregation config:
   - Update for production logging service"
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.