layer-new

layer-new is a skill for Claude Code from AnastasiyaW/codex-claude-code-config. It costs 150 tokens per session (1,877 once invoked), scanned A, original, MIT.

A project-documentation skill that scaffolds a new layer in a docs/layers tree. A layer is a documented area of responsibility, such as security, data, user interface, infrastructure, or business logic.

In plain words
What is it for?
Use it to create a new security, data, interface, infrastructure, or domain layer, record its purpose, and connect it to governing project principles.
Why use it?
It gives a bounded concern its own documented rules, decisions, common problems, patterns, and feature descriptions. This helps keep cross-cutting project knowledge organized as the project grows.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; mentions AGENTS.md.

Part of the claude-code-config plugin — 57 skills, 8 agents shipped together

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.

agentmods
npx agentmods add skills/anastasiyaw/codex-claude-code-config/layer-new
Any agent
npx skills add AnastasiyaW/codex-claude-code-config --skill layer-new
Clone the repo
git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config

Made for: Claude Code.

Or install claude-code-config, the plugin that ships this one along with the rest of its 57 skills, 8 agents.

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-new

README.md
[![agentmods](https://agentmods.dev/badge/skills/anastasiyaw/codex-claude-code-config/layer-new.svg)](https://agentmods.dev/skills/anastasiyaw/codex-claude-code-config/layer-new)
Your own site
<a href="https://agentmods.dev/skills/anastasiyaw/codex-claude-code-config/layer-new"><img src="https://agentmods.dev/badge/skills/anastasiyaw/codex-claude-code-config/layer-new.svg" alt="Measured on agentmods" height="20"></a>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,877 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00150 $0.01877
Opus 5 $0.00075 $0.00938
Sonnet 5 $0.00030 $0.00375
Haiku 4.5 $0.00015 $0.00188

Measured 6d ago against content hash cf6513f0cafe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

layer-new 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 6d 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.

skills/architecture/layer-new/SKILL.md · 193 lines

How it starts

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

/layer-new -- scaffold a project layer

Creates docs/layers/<layer-name>/ with the full template structure defined by principle 28.

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 exist? If not, copy from <claude-code-skills-checkout>/templates/kb-skeleton/docs/layers/README.md.
  4. Check if docs/layers/<layer-name>/ already exists. If yes, stop with a message -- do not overwrite. Suggest /feature-new <layer> <slug> instead.

Step 2 -- Validate layer name

  • Must be lowercase kebab-case ([a-z][a-z0-9-]*).
  • Must not start with _ (reserved for templates).
  • Must not be a generic file-system name (src, tests, docs, build).
  • If invalid, refuse with a clear message and a suggested fix.

Read the full file on GitHub · 193 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. 6d ago First seen · 193 lines · 150 tokens per session scan A cf6513f0cafe

Subscribe to this mod's changes

layer-new is a skill published in the GitHub repository AnastasiyaW/codex-claude-code-config (149 stars, last pushed today), licensed MIT. It adds 150 tokens to every session and 1,877 once invoked, about $0.0007 per session on Opus 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-30.