layer-detector

layer-detector is a skill for Claude Code from jhlee0409/claude-plugins. It costs 14 tokens per session (2,257 once invoked), scanned A, original, MIT.

A project-analysis tool that detects Feature-Sliced Design layers in a source directory. Feature-Sliced Design is a way to organize application code into layers such as shared utilities, entities, features, pages, and app setup.

In plain words
What is it for?
Finding standard FSD layer folders, analyzing their hierarchy, and supporting project initialization or architecture analysis.
Why use it?
It shows whether the project follows that layer structure and uses the correct source directory. It also reports an error when the expected source directory cannot be found.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the fsdarch plugin — 4 skills, 6 commands shipped together

Good fit Finding standard FSD layer folders, analyzing their hierarchy, and supporting project initialization or architecture analysis.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jhlee0409/claude-plugins/layer-detector
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jhlee0409/claude-plugins --skill layer-detector
Clone the repo
git clone --depth 1 https://github.com/jhlee0409/claude-plugins

Made for: Claude Code.

Or install fsdarch, the plugin that ships this one along with the rest of its 4 skills, 6 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for layer-detector

README.md
[![agentmods](https://agentmods.dev/badge/skills/jhlee0409/claude-plugins/layer-detector/github.svg)](https://agentmods.dev/skills/jhlee0409/claude-plugins/layer-detector)
Your own site
<a href="https://agentmods.dev/skills/jhlee0409/claude-plugins/layer-detector"><img src="https://agentmods.dev/badge/skills/jhlee0409/claude-plugins/layer-detector/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for layer-detector

Your own site · 80×15
<a href="https://agentmods.dev/skills/jhlee0409/claude-plugins/layer-detector"><img src="https://agentmods.dev/badge/skills/jhlee0409/claude-plugins/layer-detector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,257 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.02257
Opus 5.5 $0.00006 $0.00903
Sonnet 5.5 $0.00003 $0.00451
Haiku 4.5 $0.00001 $0.00226

Measured 3mo ago against content hash fa235ca9e48b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

layer-detector scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/fsd-architect/skills/layer-detector/SKILL.md · 337 lines

How it starts

The opening of the file, as written. The whole thing — 337 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

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:

Glob: "{srcDir}/app/"
Glob: "{srcDir}/pages/"
Glob: "{srcDir}/widgets/"
Glob: "{srcDir}/features/"
Glob: "{srcDir}/entities/"
Glob: "{srcDir}/shared/"

For Next.js projects (layer aliases):

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):

// 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', pages: 'pages' },
  nextjs_recommended: { app: 'core', pages: 'views' },
  nextjs_underscore: { app: '_app', pages: '_pages' },
  nextjs_verbose: { app: 'application', pages: 'screens' }
};

// Read from config:
function getLayerPath(layer: string, config: Config): string {
  if (config.layerAliases && config.layerAliases[layer]) {
    return config.layerAliases[layer];
  }
  return layer; // default: use layer name as-is
}

Read the full file on GitHub · 337 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 337 lines · 14 tokens per session scan A fa235ca9e48b

Subscribe to this mod's changes

layer-detector is a skill published in the GitHub repository jhlee0409/claude-plugins (4 stars, last pushed 10mo ago), licensed MIT. It adds 14 tokens to every session and 2,257 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

layer-detector compared with skills from other repositories

layer-detector next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
layer-detectorjhlee0409/claude-pluginsSkill410mo agoMITA14Claude Code
datamodel-code-generatorkoxudaxi/datamodel-code-generatorSkill4.1k5d agoMITA147Claude Code, Codex
performing-api-fuzzing-with-restlerxalgorix/xalgorixSkill1.6ktodayApache-2.0A123Claude Code, Codex
ideogram-ultraartokun/comfyui-mcpSkill9783d agoMITA68Claude Code
model-compatibilityartokun/comfyui-mcpSkill9783d agoMITA47Claude Code
flux-txt2imgartokun/comfyui-mcpSkill9783d agoMITA44Claude Code
chief-strategy-officercbrock84/headcountSkill2.6k3d agoMITA93Claude Code