Skip to content
Back to skills

Pattern Discovery

ASecurity

Pattern library discovery for pattern-first development. Use BEFORE implementing any new feature, creating components, writing API routes, or adding database operations. Ensures existing patterns are checked first.

  • 404 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 6, 2026
developmentbashtestingapidatabase

Works with

  • api

Security analysis

A100/100

Scanned September 6, 2026

npx -y skills add bybren-llc/safe-agentic-workflow --skill pattern-discovery --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pattern Discovery?

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

Security grade badge for Pattern Discovery
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bybren-llc-pattern-discovery-safe-agentic-workflow/badge)](https://www.skillsdirectory.com/skills/bybren-llc-pattern-discovery-safe-agentic-workflow)

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

Download with Pro
SKILL.md
---
name: pattern-discovery
description: >
  Pattern library discovery for pattern-first development. Use BEFORE
  implementing any new feature, creating components, writing API routes,
  or adding database operations. Ensures existing patterns are checked first.
---

# Pattern Discovery Skill

## Purpose

Enforce pattern-first development by checking the pattern library before implementing new functionality.

## When to Use

- About to create a new API route
- About to create a new UI component
- About to add database operations
- User asks "how do I implement..." or "how should I build..."

## Pattern Discovery Protocol

**ALWAYS check patterns before writing new code:**

### Step 1: Check Pattern Library

```bash
ls patterns_library/api/      # API route patterns
ls patterns_library/ui/       # UI component patterns
ls patterns_library/database/ # Database patterns
ls patterns_library/testing/  # Testing patterns
```

### Step 2: Review Pattern Index

See `patterns_library/README.md` for the complete index.

### Step 3: Apply or Escalate

**If pattern exists:** Copy, customize, validate.

**If missing:** Search codebase, implement following conventions, report gap.

## Pattern Matching Guide

| If you need to...                  | Use this pattern                  |
| ---------------------------------- | --------------------------------- |
| Create authenticated API endpoint  | `api/user-context-api.md`         |
| Create admin-only API endpoint     | `api/admin-context-api.md`        |
| Handle external webhooks           | `api/webhook-handler.md`          |
| Validate API input with Zod        | `api/zod-validation-api.md`       |
| Create protected page              | `ui/authenticated-page.md`        |
| Build form with validation         | `ui/form-with-validation.md`      |
| Add new table with RLS             | `database/rls-migration.md`       |
| Test API endpoints                 | `testing/api-integration-test.md` |

## Reference

- **Pattern Index**: `patterns_library/README.md`
- **RLS Patterns**: See `safe-workflow` skill
- **Testing Patterns**: See `testing-patterns` skill

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.

View all in development →

Comments

Loading comments…

Newsletter

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