AGENT SKILL

layer-new

Scaffold a new layer in a project's docs/layers/ tree following the feature-layer architecture. A layer is a bounded concern with its own invariants, decisions, gotchas, patterns, and feature narratives.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 1
Forks
0

01 前言 Front Matter

name
layer-new
license
MIT
version
0.1.0
metadata
{ "hermes_config_kit": { "adapter": "hermes-agent-config-kit", "conversion": "adapted", "source_path": "skills/architecture/layer-new/SKILL.md", "source_repo": "AnastasiyaW/claude-code-config" } }
description
Scaffold a new layer in a project's docs/layers/ tree following the feature-layer architecture. A layer is a bounded concern with its own invariants, decisions, gotchas, patterns, and feature narratives.

03 SKILL.md 正文

Layer New

Source: AnastasiyaW/claude-code-config/skills/architecture/layer-new/SKILL.md.

This module is adapted for Hermes Agent. Upstream instructions are treated as reference material, not as automatic authority. Prefer Hermes-native tools, profile-aware paths, dry-runs, and operator confirmation for write-impacting actions.

Scaffold a project layer

Creates docs/layers/<layer-name>/ with the full template structure from the installed kb-skeleton template. See the feature-layer-architecture skill for the architecture this scaffolds and its adoption threshold — do not create a layer tree before the project has earned the overhead.

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 <ref1>,<ref2>]
  • <layer-name> -- kebab-case, single word preferred. Examples: security, data, image-processing, observability.
  • --purpose -- one-sentence purpose. If omitted, prompt the operator.
  • --principles -- comma-separated references to durable, project-external guidance (installed Hermes skills, or your own org's standards) that govern this layer. 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 operator whether to initialise one.
  2. Does docs/ exist? If not, create it.
  3. Does docs/layers/README.md exist? If not, copy it from this adapter's installed kb-skeleton template (templates/config-kit/kb-skeleton/docs/layers/README.md under your Hermes profile, sibling to skills/config-kit/; or from this adapter's own repo checkout at hermes/templates/kb-skeleton/docs/layers/README.md if you are working inside hermes-agent-config-kit itself).
  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.

Step 3 -- Copy the template

Source: the installed kb-skeleton template's docs/layers/_LAYER-TEMPLATE/ (same location resolved in Step 1).

Destination: <repo>/docs/layers/<layer-name>/

Copy the entire directory tree. Preserve subdirectory structure (kb/ and features/). Result:

docs/layers/<layer-name>/
├── README.md
├── history.md
├── kb/
│   ├── invariants.md
│   ├── patterns.md
│   ├── decisions.md
│   └── gotchas.md
└── features/
    └── _FEATURE-TEMPLATE.md

Step 4 -- Fill placeholders

In every file under the new layer, replace:

  • <layer-name> -> the actual layer name
  • <Layer name> -> Title Case of the layer name (e.g. "Security", "Image Processing")

In README.md specifically:

  • **Purpose:** <one sentence...> -> the --purpose argument value, or prompt the operator
  • ## Governing principles list -> populate from --principles arg, or leave the placeholder bullets in place for the operator to fill

In history.md:

  • Insert a "Layer created" entry at the top with today's date (YYYY-MM-DD) and the originating reason. Prompt the operator for the reason if not provided.

Step 5 -- Register the layer

Update docs/layers/README.md:

  • Add a row to the ## Layer index table: | <layer-name> | <purpose> | active |
  • If a cross-layer Mermaid graph exists, add a node for the new layer with no edges (operator will add edges as dependencies form).

Step 6 -- Wire to project state

If the project has feature_list.json at repo root, leave it alone -- features get added by feature-new. Do not edit feature_list.json from this skill.

If the project has AGENTS.md, suggest (but do not auto-edit) adding the new layer to its source-of-truth-docs table if multiple layers exist.

Step 7 -- Confirm and suggest next step

Print a summary:

Layer created: docs/layers/<layer-name>/
Files: 1 README, 1 history, 4 kb/, 1 feature template

Suggested next steps:
1. Fill governing principles in docs/layers/<layer-name>/README.md
2. Write the first feature: feature-new <layer-name> <slug>
3. Add the first invariant when it earns its place

Blueprints (files this skill writes from)

  • the installed kb-skeleton template's docs/layers/_LAYER-TEMPLATE/ -- the source tree to copy
  • the installed kb-skeleton template's docs/layers/README.md -- the layers index template (used only if missing)

Gotchas

  • Renaming a layer is not idempotent. If the operator runs layer-new wrong-name then realises they wanted right-name, manually rename the directory and update references. This skill does NOT detect or fix duplicates.
  • Layer name collision with existing directories. If docs/<layer-name>/ exists at the docs/ root (not under docs/layers/), refuse and ask the operator which they want -- there is no automatic merge.
  • Template location varies by install. If the kb-skeleton template cannot be found under either the Hermes-installed templates/config-kit/ path or this adapter's own repo checkout, stop and report the missing location rather than inventing a directory tree from memory.

Troubleshooting

Symptom Cause Fix
"Layer already exists" Directory docs/layers/<name>/ present Use feature-new to add to it, or pick a different name
Template files missing kb-skeleton not installed or repo checkout unavailable Locate hermes-agent-config-kit's hermes/templates/kb-skeleton/ and copy from there
Layers README not updated docs/layers/README.md had no ## Layer index table Open file manually, add table per the kb-skeleton template
Validator warns about layer validate_kb.py/build_kb_graph.py flagged something Layer is fine; the flagged item is in a feature doc inside it. Run the project's own copy of the graph-builder script (from the kb-skeleton template) for the full health report.

Implementation note

The bulk of the work is file copy + placeholder replacement. No dynamic logic is needed; the template files do all the structural heavy lifting. Keep this skill deterministic and idempotent -- it must be safe to invoke twice on the same layer (second call should be a no-op with a clear message).

04 同仓库更多 Skills

hermes-jarvis-bot
hermes-jarvis-bot/hermes-agent-config-kit

owner-voice

暂无简介

★ 1
hermes-jarvis-bot
hermes-jarvis-bot/hermes-agent-config-kit

humanize-russian

Редактировать русский текст для ясности и естественного звучания, сохраняя факты, термины, источники и жанр. Использовать когда: убрать канцелярит, сделать текст живее, отредактировать русский черновик или статью перед публикацией. Не определяет авторство и не обещает обход детекторов. Для английского — humanize-english; для структуры и доказательств — article-structure-review.

★ 1
hermes-jarvis-bot
hermes-jarvis-bot/hermes-agent-config-kit

humanize-english

Edit English drafts for clear, natural language while preserving facts, uncertainty, technical meaning, citations and genre. Use when: humanize this text, remove AI-style filler, improve English prose, or edit an English article before publication. Not an authorship detector or a promise to bypass one. For Russian use humanize-russian; for thesis/evidence and structure use article-structure-review.

★ 1
hermes-jarvis-bot
hermes-jarvis-bot/hermes-agent-config-kit

caveman

Ultra-compressed reply mode. Cuts output tokens ~65-75% by answering in terse "caveman" style while keeping full technical accuracy, and shapes what survives: action first, state restated every turn, concrete time estimates, visible wins. Intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman", "talk like caveman", "use caveman", "less tokens", "be brief", or Russian "пещерный режим", "говори как пещерный", "кратко", "меньше токенов", "экономь токены" — or invokes /caveman. Preserves the user's language (Russian in → Russian caveman out). Off only: "stop caveman" / "normal mode" / "обычный режим". Do not use merely because a response should be concise, and do not use when the user requests normal prose, a polished document, or exact wording.

★ 1
hermes-jarvis-bot
hermes-jarvis-bot/hermes-agent-config-kit

article-structure-review

Проверить структуру технической статьи после черновика: задача читателя, жанр, опора значимых утверждений на доказательства и честные ограничения. Use after the first draft, before publication. Исправлять структуру, когда это входит в запрос; не создавать обязательный конвейер из других навыков. Для локальной языковой редактуры — humanize-english или humanize-russian.

★ 1
hermes-jarvis-bot
hermes-jarvis-bot/hermes-agent-config-kit

video-post-production

Video post-production rules: audio mastering, color, captions, platform export. Use when: 'add music', 'add voiceover', 'export for tiktok', 'add captions', 'color grade', 'audio levels', 'master audio', 'export settings', 'platform requirements'. Covers FFmpeg patterns, audio chain, subtitle standards, and platform-specific export configs. Do NOT use to generate or animate the video frames/scenes in code (use remotion-production-guide), to write the script (use video-narrative-arc), or to evaluate script quality (use script-evaluator); this is the finishing stage applied to an already-rendered video.

★ 1