Agent skill

Pattern Discovery

by bybren-llc in bybren-llc/safe-agentic-workflow

Pattern library discovery for pattern-first development. An agent skill from bybren-llc/safe-agentic-workflow.

MITAuto-check passedDatabases

Install Pattern Discovery

skills CLI
$ npx skills add bybren-llc/safe-agentic-workflow --skill pattern-discovery -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install bybren-llc/safe-agentic-workflow pattern-discovery --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/bybren-llc/safe-agentic-workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/pattern-discovery .claude/skills/pattern-discovery && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pattern-discovery
GitHub stars
421
Token cost
~1.5k tokens
SKILL.md length
402 words
Files
2
Skills in repo
42
Repo updated
First seen
Licence
MIT

At a glance

Pattern library discovery for pattern-first development. An agent skill from bybren-llc/safe-agentic-workflow.

  • Works in 3 steps: Check Pattern Library → Review Pattern Index → Apply or Escalate
  • Tasks that involve Database administration
  • SKILL.md covers Purpose, When to Use, Pattern Discovery Protocol and Pattern Library Structure, plus 4 more sections
  • Calls yarn

What it does

Pattern Discovery is an agent skill from bybren-llc/safe-agentic-workflow. 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 before writing new code.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `README.md`).

It sits in Databases, covering Database administration. The repository describes itself as: SAW — SAFe Agentic Workflow AI Agent Harness for Multi-Agent Team Workflows Built on SAFe methodology (Scaled Agile Framework), adapted for AI agent teams (Now With AI-DLC!)… The licence is MIT.

When your agent uses it

  • Tasks that involve Database administration

Example prompts

  • “/pattern-discovery”

Requirements

  • Pre-approved tools (allowed-tools): Read, Grep, Glob

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Check Pattern Library
  2. Review Pattern Index
  3. Apply or Escalate

What it can do on your machine

Read from SKILL.md and the folder at commit 26ca58b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • yarn

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use yarn, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pattern Discovery loads about 1.5k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 402 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from bybren-llc/safe-agentic-workflow at commit 26ca58b, republished under its MIT licence (© bybren-llc). 402 words, ~1,485 tokens.

Download SKILL.mdSave it as .claude/skills/pattern-discovery/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
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 before writing new code.
allowed-tools
Read, Grep, Glob
context
fork
agent
Explore

Pattern Discovery Skill

Purpose

Enforce pattern-first development by checking the Pattern library before implementing new functionality. This reduces code duplication, ensures consistency, and leverages battle-tested solutions.

When to Use

Invoke this skill when:

  • About to create a new API route
  • About to create a new UI component
  • About to add database operations
  • About to write integration tests
  • User asks "how do I implement..." or "how should I build..."
  • Starting work on any feature implementation

Pattern Discovery Protocol

ALWAYS follow this sequence before writing new code:

Step 1: Check Pattern Library

Search patterns_library/ for existing patterns:

bash
# Find patterns by category
ls patterns_library/api/      # API route patterns
ls patterns_library/ui/       # UI component patterns
ls patterns_library/database/ # Database operation patterns
ls patterns_library/testing/  # Testing patterns
Step 2: Review Pattern Index

Check patterns_library/README.md for the complete pattern index:

CategoryPatterns Available
APIUser Context, Admin Context, Webhook Handler, Zod Validation, Bonus Content
UIAuthenticated Page, Form with Validation, Data Table, Marketing Page
DatabaseRLS Migration, Prisma Transaction, Server Component Access
TestingAPI Integration Test, E2E User Flow
SecurityInput Sanitization, Rate Limiting, Secrets Management
CIGitHub Actions Workflow, Deployment Pipeline
ConfigEnvironment Config, Structured Logging
Step 3: Apply or Escalate

If pattern exists:

  1. Read the pattern file
  2. Copy the code pattern
  3. Follow the customization guide
  4. Run validation commands

If pattern is missing:

  1. Search codebase for similar implementations
  2. If found, consider extracting as new pattern (BSA/ARCHitect only)
  3. If not found, implement from scratch following existing conventions
  4. Report pattern gap to BSA for future extraction

Pattern Library Structure

patterns_library/
├── README.md           # Pattern index and usage guide
├── api/
│   ├── user-context-api.md
│   ├── admin-context-api.md
│   ├── webhook-handler.md
│   ├── zod-validation-api.md
│   └── bonus-content-delivery.md
├── ui/
│   ├── authenticated-page.md
│   ├── form-with-validation.md
│   ├── data-table.md
│   └── marketing-page.md
├── database/
│   ├── rls-migration.md
│   ├── prisma-transaction.md
│   └── server-component-direct-access.md
├── testing/
│   ├── api-integration-test.md
│   └── e2e-user-flow.md
├── security/
│   ├── input-sanitization.md
│   ├── rate-limiting.md
│   └── secrets-management.md
├── ci/
│   ├── github-actions-workflow.md
│   └── deployment-pipeline.md
└── config/
    ├── environment-config.md
    └── structured-logging.md
Show full SKILL.md (169 more words)Show less

Pattern Matching Guide

If you need to...Use this pattern
Create authenticated API endpointapi/user-context-api.md
Create admin-only API endpointapi/admin-context-api.md
Handle external webhooksapi/webhook-handler.md
Validate API input with Zodapi/zod-validation-api.md
Serve private downloadable contentapi/bonus-content-delivery.md
Create protected pageui/authenticated-page.md
Build form with validationui/form-with-validation.md
Display paginated dataui/data-table.md
Create marketing/landing pageui/marketing-page.md
Add new table with RLSdatabase/rls-migration.md
Run multi-step DB operationsdatabase/prisma-transaction.md
Test API endpointstesting/api-integration-test.md
Write E2E user flow teststesting/e2e-user-flow.md
Sanitize user inputsecurity/input-sanitization.md
Add API rate limitingsecurity/rate-limiting.md
Manage secrets/env varssecurity/secrets-management.md
Set up CI/CD pipelineci/github-actions-workflow.md
Configure deployment stagesci/deployment-pipeline.md
Load environment configurationconfig/environment-config.md
Add structured loggingconfig/structured-logging.md

Security Requirements

All patterns enforce:

  • RLS Context - Database operations use withUserContext, withAdminContext, or withSystemContext
  • Authentication - Protected routes verify auth before processing
  • Input Validation - All inputs validated with Zod schemas
  • Error Handling - Comprehensive error handling with proper status codes

Validation Commands

After applying a pattern, run:

bash
yarn lint && yarn type-check  # All patterns
yarn test:integration         # API patterns
yarn test:e2e                 # UI patterns

Authoritative Reference

  • Pattern Index: patterns_library/README.md
  • RLS Patterns: See rls-patterns skill for database security
  • Frontend Patterns: See frontend-patterns skill for UI conventions

© bybren-llc, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .claude/skills/pattern-discovery of bybren-llc/safe-agentic-workflow.

  • SKILL.md
  • README.md

Open the folder on GitHubat commit 26ca58b

Compare with similar skills

Pattern Discovery next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pattern Discovery compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pattern Discovery this skillbybren-llc/safe-agentic-workflow421—~1.5kAutomated safety check: PassMIT
Mail Timeveliovgroup/mail-time143—~1kAutomated safety check: PassBSD-3-Clause
YBA Read-Only Query CLIyugabyte/yugabyte-db11k—~1.1kAutomated safety check: PassCustom licence
DB Ops SopOpenDCAI/DataMind423—~388Automated safety check: PassApache-2.0
Golang Samber Hotsamber/cc-skills-golang3.4k—~2kAutomated safety check: PassMIT
Database Backupssickn33/agentic-awesome-skills47k2 repos~3.1kAutomated safety check: NotesMIT

Similar skills

  • Mail Time

    veliovgroup/mail-time

    A skill your agent uses when building, wiring, reviewing, or debugging MailTime and ostrio:mailer email queues for horizontally scaled Node.js, Bun, or Meteor apps.

    143 GitHub stars~1k tokensUpdated yesterday
    DatabasesAuto-check passed
  • YBA Read-Only Query CLI

    yugabyte/yugabyte-db

    Runs read-only lookups - list, describe, get - against a live YugabyteDB Anywhere control plane using the yba CLI, with mutating commands explicitly off-limits.

    11k GitHub stars~1.1k tokensUpdated today
    DatabasesAuto-check passed
  • DB Ops Sop

    OpenDCAI/DataMind

    Database operations runbook — backup, recovery, performance tuning, troubleshooting.

    423 GitHub stars~388 tokensUpdated 18 days ago
    DatabasesAuto-check passed
  • Golang Samber Hot

    samber/cc-skills-golang

    In-memory caching in Golang using samber/hot — eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, FIFO), TTL, cache loaders, sharding, stale-while-revalidate, missing…

    3.4k GitHub stars~2k tokensUpdated 7 days ago
    DevOps & CloudAuto-check passed
  • Database Backups

    sickn33/agentic-awesome-skills

    Implement database backup strategies. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~3.1k tokens
    DatabasesAuto-check: notes
  • Postgresql Devsec

    sickn33/agentic-awesome-skills

    Administer PostgreSQL databases. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~2.5k tokens
    DatabasesAuto-check: notes

More from bybren-llc/safe-agentic-workflow

All 42 skills in this repo
  • Multi-Agent Coordination Template

    bybren-llc/safe-agentic-workflow

    Agent assignment matrix, blocker escalation, and TDM coordination patterns. Use when assigning work to specialist agents, managing blockers across agents…

    421 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed
  • API Route Patterns

    bybren-llc/safe-agentic-workflow

    API route implementation patterns with RLS, validation, and error handling. Use when creating API routes, implementing CRUD endpoints, adding server-side…

    421 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Technical Documentation Templates

    bybren-llc/safe-agentic-workflow

    Documentation templates for ADRs, runbooks, architecture docs, and knowledge transfer documents. Use when creating Architecture Decision Records, writing…

    421 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Deployment SOP Checklist

    bybren-llc/safe-agentic-workflow

    Deployment workflows, pre-deploy validation, smoke testing, and rollback procedures. Use when deploying to staging or production, running smoke tests…

    421 GitHub stars~950 tokensUpdated 2 mo ago
    Auto-check passed
  • Frontend Patterns Template

    bybren-llc/safe-agentic-workflow

    Frontend patterns for modern web frameworks, component libraries, auth flows, and analytics. Use when building UI components, creating pages, implementing…

    421 GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed
  • Advanced Git Operations

    bybren-llc/safe-agentic-workflow

    Advanced git operations including rebase, bisect, cherry-pick, and conflict resolution. Use when rebasing feature branches, debugging with bisect…

    421 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed

Questions about Pattern Discovery

What does Pattern Discovery do?

Pattern library discovery for pattern-first development. An agent skill from bybren-llc/safe-agentic-workflow. Pattern Discovery is an agent skill from bybren-llc/safe-agentic-workflow. Pattern library discovery for pattern-first development.

When should I use Pattern Discovery?

Pattern Discovery fits situations like: tasks that involve Database administration.

How do I install Pattern Discovery in Claude Code?

Run `npx skills add bybren-llc/safe-agentic-workflow --skill pattern-discovery -a claude-code`. Or copy the skill folder (.claude/skills/pattern-discovery in bybren-llc/safe-agentic-workflow) into .claude/skills/pattern-discovery in your project. Claude Code loads it when a task matches its description.

How do I install Pattern Discovery in Codex?

Run `npx skills add bybren-llc/safe-agentic-workflow --skill pattern-discovery -a codex`. Or copy the skill folder (.claude/skills/pattern-discovery in bybren-llc/safe-agentic-workflow) into .agents/skills/pattern-discovery in your project. Codex loads it when a task matches its description.

Can I use Pattern Discovery in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bybren-llc/safe-agentic-workflow --skill pattern-discovery -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pattern-discovery, .gemini/skills/pattern-discovery, .github/skills/pattern-discovery and .opencode/skills/pattern-discovery in your project.

What does Pattern Discovery need to run?

Going by SKILL.md and its folder, Pattern Discovery needs the command-line tools its instructions call (yarn). Its frontmatter pre-approves these tools: Read, Grep, Glob.

Does Pattern Discovery access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Pattern Discovery safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pattern Discovery use?

Pattern Discovery is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pattern Discovery use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pattern Discovery?

Skills that share tags, products or a category with Pattern Discovery: Mail Time (veliovgroup/mail-time, 143 stars), YBA Read-Only Query CLI (yugabyte/yugabyte-db, 11k stars), DB Ops Sop (OpenDCAI/DataMind, 423 stars) and Golang Samber Hot (samber/cc-skills-golang, 3.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pattern Discovery?

bybren-llc (a GitHub organization) maintains it in bybren-llc/safe-agentic-workflow, which has 421 GitHub stars. The repository holds 42 skills in this directory. The repository was last updated on July 20, 2026.

Source: bybren-llc/safe-agentic-workflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.