↑ ↓ to move · Enter to open · Esc to closeTap a result

Architecture
skill · class meta · opus

claude-code-architect-designer

Decides which Claude Code extension resolves a scenario (skill, subagent, rule, hook, MCP server, permission or mod) and writes the files only after you approve.

skill · metaopus7 allowed pathsstays in nerviz
§ the skill's definition

claude-code-architect-designer, section by section

The sections of the skill's own SKILL.md, excerpted. Hover or click one to see which project rules, templates and references/ files it cites. The sections are also chips: click one to jump to it.

nerviz/.claude/skills/claude-code-architect-designer/SKILL.md

## Current inventory

Skills: !ls "${CLAUDE_PROJECT_DIR:-.}/.claude/skills"

Agents: !ls "${CLAUDE_PROJECT_DIR:-.}/.claude/agents"

Rules: !ls "${CLAUDE_PROJECT_DIR:-.}/.claude/rules"

Decision records (the latest is the most recent): !ls "${CLAUDE_PROJECT_DIR:-.}/.claude/decisions"

## Scenario

$ARGUMENTS

# Claude Code Architect Designer

Decides which of the nine forms of extension resolves the scenario, and writes it. The nine:

#FormFile
1Auto-invocable skill.claude/skills/<name>/SKILL.md
2Manually-invoked skill (/name)same, with disable-model-invocation: true
3Subagent.claude/agents/<name>.md
4Rule.claude/rules/<name>.md
5CLAUDE.md sectionroot CLAUDE.md
6aMCP server, shared.mcp.json
6bMCP server, one agent onlymcpServers: in that agent's frontmatter
7aHook for the whole sessionhooks block of .claude/settings.json
7bHook only while one skill or agent runshooks: in that file's frontmatter
7cThe executable behind 7a/7bnew mode in .claude/hooks/ArchHook.java
8Hard prohibition or standing permissionpermissions.deny / permissions.allow
9Mod — draws in the interface what 7 and 8 already decide.claude/mods/<name>/

6b isn't a fourth reason to write an agent — it's reason 2 of § 5 of the decision matrix (restrict tools) applied to an external connection instead of a built-in one. An agent only exists in the first place per the three reasons already in references/decision-matrix.md § 5; 6b just answers which tools it gets once that's settled.

… cut here, the rest is in the file

## Why this is a skill and not a rule

This is a multi-step procedure — interview, classify, propose, write — hence a skill. As a rule it would break invariant 1 of @CLAUDE.md: a rule about when to create skills and agents would have to mention skills and agents, and rules/ is a leaf.

Pinned to opus: what it designs is enforced in every later session (@.claude/decisions/0081-skill-model-required-per-class.md).

### Phase 1 · Interview

Read references/decision-matrix.md and @docs/pt-br/11-pitfalls.md before asking — the matrix decides the form, the pitfalls page says which silent traps (the runtime's and this repository's: territories, frozen folders, ownership splits) the design must not walk into. Use AskUserQuestion — at most 4 questions per call, so 2 to 3 calls. Don't proceed with a missing answer: each axis below eliminates candidate forms, and an unanswered axis leaves the decision guessing.

… cut here, the rest is in the file

### Phase 2 · Classify

Apply the decision table in references/decision-matrix.md (§ 2; § 2.1 whenever axis 2 named an external system; § 2.2 whenever axis 7 answered that the rule cannot fail; § 2.3 whenever axes 18-20 applied). Then run the eleven invariants of @CLAUDE.md as a veto — the most commonly violated are 1 (a rule that mentions a skill), 5 (an agent without one of the three reasons), 6 (prose where a guarantee was available, and its mirror: a hook for something the model gets right on its own — and, for Form 9, a mod standing in for the guarantee), 2 for Form 9 (a rule restated in TypeScript instead of read from ArchHook.jar), and, for MCP, 11 (a literal secret in .mcp.json). A proposal that fails an invariant is not presented as viable: it appears with the score it deserves and the reason for rejection.

### Phase 3 · Propose — write nothing

Two to four options, ordered by score, always including the "create nothing" hypothesis when it is defensible. Each in this form, in this order:

  1. Title — proposed filename, in kebab-case
  2. Motivator — the interview axis that justifies it
  3. Pros
  4. Cons — includes the invariant it strains, if any
  5. Score 0-10 — rubric in references/decision-matrix.md, § Rubric
  6. Visual — file tree or ASCII graph of who calls whom
  7. CI — axis 17's answer for this option, one of three: the existing job and step that

And at the end, a references table: for each decision, the concrete source (@claude-help.md § N, @CLAUDE.md invariant N, or the repo file that serves as precedent). A claim about the runtime without a source is decoration — cut it.

### Phase 3.5 · Save the decision draft

What Phase 3 produced — options, scores, rejected alternatives, the references table — evaporates at the end of the session. Six months from now nobody knows why the piece is a skill and not an agent, and the twenty-axis interview starts over from scratch.

When to save a file. Only if at least one of these is true:

  • Two or more options scored ≥ 5 — there was a real choice.
  • The top-scoring option strains an invariant of @CLAUDE.md.
  • Axis 8 answered "both" — the piece also goes to the generated project.
  • Axis 13 answered "both" — the MCP server is declared in .mcp.json and in
  • The approved option is Form 7c or Form 8 — always, with no exception. A new mode in
  • The approved option is Form 9 — always, too. A mod adds a second language, a

… cut here, the rest is in the file

### Phase 4 · Write — only after approval

  1. Generate from the templates/ exemplar matching the approved form. For Form 6a, the
  2. Frontmatter: native fields only, list in references/frontmatter-fields.md. An
  3. No metadata: in frontmatter. Ownership, reads, and handoff go in the ## Contract
  4. Code boilerplate goes to templates/<name>.example inside the skill that emits it,
  5. No literal secret, ever, in a .mcp.json this skill writes or edits — invariant
  6. ${VAR} / ${VAR:-default}, oauth, or headersHelper only. If the interview's
  7. Forms 7 and 8 — five rules, none of them optional. They execute; a mistake here

… cut here, the rest is in the file

### Phase 5 · Report

Files created, files changed, the decision record path (or the sentence explaining why there wasn't one), the validate and schema output, the CI line — the job and step that cover the piece, the test step 9 wrote with its green and red runs, or the reason nothing is testable — and — whenever a hook or a permissions rule was written — the restart warning, in its own line: .claude/settings.json is read only at session startup, so nothing written in Forms 7a or 8 takes effect until claude is restarted. Say it even if the user already knows; a hook believed to be active and silently absent is worse than no hook. For Form 9 the same line, plus two: the marketplace registers only once the folder's workspace trust was accepted, and a mod edited in a git worktree does not load from there — the relative marketplace path resolves against the main checkout.

## Out of scope

~/.claude/settings.json and .claude/settings.local.json. Personal and machine-local configuration, same exclusion as local-scope MCP below: not versioned, not shared, not this skill's concern. A hook the team doesn't get isn't enforcement, it's one person's habit. settings.local.json in particular is where a permission granted mid-session lands — moving one of those into the versioned file is a decision the user makes, and this skill only writes it when asked outright.

A second hook file. Form 7c is a mode inside ArchHook.java, never .claude/hooks/<Other>.java. Enforcement stays in one executable that the generated project receives whole from the export mode; a second file would have to be copied, registered, and kept in sync separately, and the first one to fall out of sync fails silently. A Form 9 mod is not one: it enforces nothing, calls ArchHook.jar for every answer it shows, and nothing breaks when it does not load.

A mod as the guarantee, or a mod in the generated project. A mod does not load in claude -p, VS Code, a cloud session or under --safe-mode, so a rule that must always hold stays Form 7 or 8 (invariant 6). And nothing under .claude/mods/ travels: a project would inherit a second language, a version floor and an unsandboxed process its owner never reviewed (0131). Changing that is a new decision, not a propagation row.

The built-in plugin-authoring skill and ~/.claude/dev-mods/. Same reason as the skill-creator plugin below: it writes a generic mod into a personal directory the next cleanup deletes, with no knowledge of the mods block, the marketplace or the guarantee a mod must sit on.

… cut here, the rest is in the file

Open the full file on GitHub →
§ behavior

What it reads, writes and refuses

The skill's own contract, from SKILL.md, in the original wording.

Class

meta — the territory is skill_classes.meta in @.claude/schemas/extensions.json: the .claude/ tree, the root CLAUDE.md, .mcp.json, the MCP setup doc, and the three derived places a new piece propagates into — docs/ (the reference pages that describe a hook or a class), .github/ (the workflow step that runs a new check) and the root README.md (its piece counts and lists, 0163). ArchHook.java guard enforces it, which is the reason the guard is registered in this meta-repository at all. A new skill is incomplete until a class in skill_classes lists it — schema fails by name otherwise (Phase 4, step 8).

Reads

@claude-help.md, @CLAUDE.md (the eleven invariants), @docs/pt-br/11-pitfalls.md (every silent trap, runtime and repository), @.claude/rules/00-index.md, @.claude/blueprints/_schema.md when the decision touches blueprints, and the inventory injected at the top. Reads this skill's references/ before classifying — the matrix is deliberately not in the body — and .github/workflows/*.yml for axis 17, since references/ci-coverage.md quotes them and they win where the two disagree.

Writes

.claude/skills/, .claude/agents/, .claude/rules/, the root CLAUDE.md and README.md of this repository, .mcp.json at this repo's root (Form 6a), the hooks and permissions blocks of .claude/settings.json (Forms 7a and 8), and .claude/hooks/ArchHook.java plus the lists it reads in .claude/schemas/extensions.json (Form 7c), .claude/mods/ and the extraKnownMarketplaces and enabledPlugins keys of .claude/settings.json (Form 9), .claude/blueprints/ when the approved option changes a convention a blueprint owns, and — for the CI item of whichever form was approved (Phase 4 step 9) — the tests in .claude/.ci/, the jobs of .github/workflows/**, the matching rows of docs/*/07-ci-validate.md, and, when axis 8 = "both", project-bootstrap/templates/ci.yml.example and ci-gradle.yml.example. Only after explicit approval.

Also writes

.claude/decisions/NNNN-<slug>.md — and this is the only path it touches *before* approval, as the Phase 3.5 draft. It is the exclusive owner of the directory: no other piece writes there, and nothing inside it is a rule.

Does not write

.claude/settings.local.json, ~/.claude/settings.json, ~/.claude.json, a hook file other than ArchHook.java, nor project Java code. Does not create .claude/commands/. Never writes a literal secret into .mcp.json — invariant 11; a static credential from axis 12 becomes a ${VAR} placeholder plus a line in the companion setup doc, never a value.

Does not

reproduce rules. A new rule is a file in rules/ with a single owner — never prose inside a SKILL.md. Nor does it hardcode a list into ArchHook.java: every name, path, and pattern a Form 7c mode reads lives in .claude/schemas/extensions.json, invariant 10.

Delegates

at most step 8 of Phase 4 (propagation), and only when axis 8 or axis 13 is "both", a decision record has been saved, and the approved form is not 7 or 8. Classifying, proposing, writing the body, and writing the CI check (step 9) always stay in this thread — the subagent doesn't receive the conversation, and the interview is the heart of the task.

Stays out of the generated project

It's a creation skill, like project-bootstrap and init-project: whoever clones an already-generated project has no extensions to design. The same applies to .claude/decisions/ — it records decisions about this meta-repository.

Source: SKILL.md § Contract, at nerviz e4cae27.

§ guard and hook

What the guard does with it

meta is the skill's class, and the list on the left is its territory. The phase opens when the skill runs on a prompt of its own, and ArchHook judges every write against that list. The text on the right is the hook's own.

write_allow of claude-code-architect-designer

  • ✓.claude/**
  • ✓CLAUDE.md
  • ✓README.md
  • ✓.mcp.json
  • ✓MCP-SETUP.md
  • ✓docs/**
  • ✓.github/**
  • any path outside this list, when the skill opens the phase itself

A refusal exits with code 2 and the message goes back to the model.

> /claude-code-architect-designer …
UserPromptSubmit
  guard prompt                     exit 0
# phase opened: claude-code-architect-designer (class meta)
# write_allow: .claude/**, CLAUDE.md, README.md, .mcp.json, MCP-SETUP.md, docs/**, .github/**
§ how it is called

Who calls it

It is not a step of a chain. It starts from a prompt of its own, /claude-code-architect-designer, and the guard treats it like any other skill: the phase opens, and the territory of its class applies.

← back to the chains