Back to Skills

layer-detector

verified

Detect and analyze FSD layer structure in a project

View on GitHub

Marketplace

local-plugins

jhlee0409/claude-plugins

Plugin

fsd-architect

Repository

jhlee0409/claude-plugins
2stars

plugins/fsd-architect/skills/layer-detector/SKILL.md

Last Verified

January 23, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/jhlee0409/claude-plugins/blob/main/plugins/fsd-architect/skills/layer-detector/SKILL.md -a claude-code --skill layer-detector

Installation paths:

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

Instructions

# Layer Detector Skill

FSD 레이어 구조를 감지하고 분석합니다.

## WHEN TO USE

This skill is invoked by:
- `/fsdarch:init` - Initial project setup
- `/fsdarch:analyze` - Project analysis

## EXECUTION INSTRUCTIONS

### Step 1: Find Source Directory

**Action:** Determine the source directory path

```
1. Check if srcDir is passed as parameter
   → If yes, use it directly

2. If no parameter, read .fsd-architect.json
   → Use Read tool to get srcDir field
   → Default to "src/" if not specified

3. Verify directory exists:
   → Use Glob: "{srcDir}/"
   → If no match, return error E101
```

**Glob command:**
```bash
Glob: "src/"
# Or if config specifies different path:
Glob: "{config.srcDir}/"
```

### Step 2: Detect Layers

**Action:** Scan for FSD layer directories

**Standard FSD layers (in hierarchy order):**
```
1. shared   (lowest - utilities, ui kit, api clients)
2. entities (domain models and business entities)
3. features (user interactions and business logic)
4. widgets  (composite UI blocks)
5. pages    (route-level compositions) → "views" in Next.js
6. app      (highest - app initialization) → "core" in Next.js
```

**Glob commands to execute (in parallel):**

For standard projects:
```bash
Glob: "{srcDir}/app/"
Glob: "{srcDir}/pages/"
Glob: "{srcDir}/widgets/"
Glob: "{srcDir}/features/"
Glob: "{srcDir}/entities/"
Glob: "{srcDir}/shared/"
```

For Next.js projects (layer aliases):
```bash
Glob: "{srcDir}/core/"       # app → core
Glob: "{srcDir}/views/"      # pages → views
Glob: "{srcDir}/widgets/"
Glob: "{srcDir}/features/"
Glob: "{srcDir}/entities/"
Glob: "{srcDir}/shared/"
```

**Layer alias mapping (user-configurable):**
```typescript
// Layer aliases are stored in .fsd-architect.json
// Users can customize these during /fsdarch:init

interface LayerAliases {
  app: string;    // 'app', 'core', '_app', 'application', etc.
  pages: string;  // 'pages', 'views', '_pages', 'screens', etc.
}

// Common presets:
const LAYER_ALIAS_PRESETS = {
  standard: { app: 'app', pa

Validation Details

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