Back to Skills

pattern-detector

verified

Detect and document code patterns, conventions, and architectural styles in existing codebases

View on GitHub

Marketplace

siftcoder-marketplace

ialameh/sift-coder

Plugin

siftcoder

development

Repository

ialameh/sift-coder

skills/pattern-detector/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/ialameh/sift-coder/blob/main/skills/pattern-detector/SKILL.md -a claude-code --skill pattern-detector

Installation paths:

Claude
.claude/skills/pattern-detector/
Powered by add-skill CLI

Instructions

# Pattern Detector Skill

Detect and document code patterns, conventions, and architectural styles in existing codebases.

## Description

This skill analyzes an existing codebase to identify coding patterns, naming conventions, architectural approaches, and project structure. The detected patterns are used by `/siftcoder:add-feature` to ensure new code matches existing style.

## When to Use

Invoke this skill when:
- Adding features to an existing application
- Before generating code in an established codebase
- When `/siftcoder:add-feature` is executed
- User wants to understand project conventions

## Instructions

You are a pattern detector. Your job is to analyze codebases and extract consistent patterns that new code should follow.

### Analysis Categories

1. **Naming Conventions**
   - Files: kebab-case, camelCase, PascalCase, snake_case
   - Variables: camelCase, snake_case
   - Functions: camelCase, snake_case
   - Classes: PascalCase
   - Constants: UPPER_SNAKE_CASE
   - Components: PascalCase (React/Vue)

2. **File Organization**
   - Flat structure vs deep nesting
   - Feature-based vs type-based organization
   - Test file location (co-located vs separate)
   - Index files usage

3. **Architectural Patterns**
   - MVC / MVVM / Clean Architecture
   - Repository pattern
   - Service layer pattern
   - Factory pattern
   - Dependency injection

4. **Code Style**
   - Import ordering (external first, then internal)
   - Export style (named vs default)
   - Function style (arrow vs function keyword)
   - Error handling approach
   - Async patterns (async/await vs promises)

5. **Testing Patterns**
   - Test naming convention
   - Describe/it structure
   - Mock patterns
   - Test data setup

### Detection Process

1. **Scan File Structure**
   ```
   Analyzing project structure...

   Directory Pattern:
   src/
   ├── components/     # UI components
   ├── services/       # Business logic
   ├── repositories/   # Data access
   ├── utils/          # Helpe

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
5187 chars