Back to Skills

code-patterns

verified

Enforces LSP-first exploration, subagent delegation, and mandatory code review patterns. Use before starting any code work.

View on GitHub

Marketplace

devnogari-claude-plugins

devnogari/devnogari-claude-plugins

Plugin

code-patterns

Repository

devnogari/devnogari-claude-plugins
2stars

plugins/code-patterns/skills/code-patterns/SKILL.md

Last Verified

January 23, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/devnogari/devnogari-claude-plugins/blob/main/plugins/code-patterns/skills/code-patterns/SKILL.md -a claude-code --skill code-patterns

Installation paths:

Claude
.claude/skills/code-patterns/
Powered by add-skill CLI

Instructions

# Code Patterns Enforcer

## Purpose

코드 작업 시 일관된 패턴을 강제합니다:
1. **LSP First**: grep/glob 대신 LSP 도구 사용
2. **Subagent Delegation**: 복잡한 작업은 전문 에이전트에 위임
3. **Mandatory Code Review**: 코드 변경 후 리뷰 필수

## When to Use

- 코드 탐색/분석 작업 시작 전
- 새로운 기능 구현 시작 전
- 리팩토링 또는 버그 수정 전
- "패턴 체크", "규칙 확인" 요청 시

## LSP-First Pattern (MANDATORY)

### Before ANY Code Exploration

**STOP and ask**: Can LSP do this?

| Task | LSP Operation | FORBIDDEN Alternative |
|------|---------------|----------------------|
| 함수/클래스 정의 찾기 | `goToDefinition` | ❌ grep/glob |
| 파일 내 심볼 개요 | `documentSymbol` | ❌ cat/read entire file |
| 프로젝트 심볼 검색 | `workspaceSymbol` | ❌ grep |
| 참조 추적 | `findReferences` | ❌ grep |
| 타입/문서 정보 | `hover` | ❌ read entire file |
| 인터페이스 구현체 | `goToImplementation` | ❌ grep |
| 호출 그래프 분석 | `incomingCalls`/`outgoingCalls` | ❌ manual trace |

### LSP Usage Examples

```bash
# Find where function is defined
LSP goToDefinition file.ts:25:10

# Get all symbols in a file
LSP documentSymbol file.ts:1:1

# Search for symbol across project
LSP workspaceSymbol file.ts:1:1  # with query pattern

# Find all references to a symbol
LSP findReferences file.ts:25:10

# Get type info and documentation
LSP hover file.ts:25:10
```

### When LSP is NOT Available

1. LSP 서버가 해당 파일 타입 미지원 시
2. 텍스트 검색이 명확히 필요한 경우 (로그 메시지, 주석)
3. 파일 패턴 기반 탐색 (설정 파일 찾기)

## Subagent Delegation Pattern (MANDATORY)

### Auto-Trigger Rules

**Before starting work, check:**

| Condition | Required Agent | Trigger |
|-----------|----------------|---------|
| 3+ 파일 탐색 필요 | `Explore` | 자동 |
| 3+ 단계 구현 필요 | `Plan` | 자동 |
| 아키텍처 이해 필요 | `Explore` | 자동 |
| 파일 분리/클래스 추출 | `refactoring-expert` | 자동 |
| 코드 변경 완료 | `superpowers:code-reviewer` | **항상** |
| 원인 불명확한 버그 | `root-cause-analyst` | 버그 분석 |
| 인증/권한/API 보안 | `security-engineer` | 보안 검토 |
| 성능 이슈 | `performance-engineer` | 성능 분석 |
| 외부 정보 필요 | `deep-research-agent` | 리서치 |

### Delegation Examples

```markdown
# Explore agent for codebase understanding
Task(Explore, "Find all auth

Validation Details

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