layer-new
FeaturedScaffold a new layer in a project's docs/layers/ tree following the feature-layer architecture (principle 28). A layer is a bounded concern (security, data, ui, infrastructure, domain) with its own invariants, decisions, gotchas, patterns, and feature narratives. Use when: "create a new layer", "add security layer", "scaffold layer", "start tracking <concern> separately", "/layer-new", "add bounded concern". Operates on the kb-skeleton structure; idempotent -- will not overwrite existing layers. Do NOT use to scaffold an individual feature narrative inside an existing layer; use /feature-new for that (a layer is the container, not the per-feature doc).
AI & Automation 137 stars
21 forks Updated 1 months ago MIT
Install
Quality Score: 90/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# /layer-new -- scaffold a project layer
Creates `docs/layers/<layer-name>/` with the full template structure
defined by [principle 28](https://github.com/AnastasiyaW/claude-code-config/blob/main/principles/28-feature-layer-architecture.md).
## When to use
- Starting to track a new bounded concern in a long-running project
- Refactoring sprawling cross-cutting code into a documented layer
- Onboarding a new team member who needs the layer map
## When NOT to use
- One-off scripts or pet projects with <5 features (overhead not
justified)
- Layer name describes a directory (`src` is not a layer)
- The "layer" is actually one feature in disguise -- use `/feature-new`
inside an existing layer instead
## Arguments
```
/layer-new <layer-name> [--purpose "..."] [--principles P-NN,P-MM]
```
- `<layer-name>` -- kebab-case, single word preferred. Examples:
`security`, `data`, `image-processing`, `observability`.
- `--purpose` -- one-sentence purpose. If omitted, prompt the user.
- `--principles` -- comma-separated Tier 1 principle IDs that govern
this layer (e.g. `P-02,P-21`). If omitted, leave placeholder in
README.
## Direction (what to do, in order)
### Step 1 -- Verify environment
Check the current working directory:
1. Is it a git repository? Run `git rev-parse --show-toplevel`. If
not, ask the user whether to initialize one (offer `git init` +
private GitHub repo per global rule).
2. Does `docs/` exist? If not, create it.
3. Does `docs/layers/README.md`...
Details
- Author
- AnastasiyaW
- Repository
- AnastasiyaW/codex-claude-code-config
- Created
- 5 months ago
- Last Updated
- 1 months ago
- Language
- Python
- License
- MIT
Integrates with
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category