↑ ↓ 移动 · Enter 打开 · Esc 关闭点按一个结果

架构
skill · ops 类 · sonnet

project-config

通过 ArchHook.jar config(唯一的写入者)显示并修改项目在自己的 .claude/ 中配置的内容。

skill · opssonneteffort low不写任何文件随生成的项目导出
§ skill 的定义

project-config,逐节说明

skill 自己的 SKILL.md 的各个章节,节选。悬停或点击一个章节,查看它引用的项目规则、模板和 references/ 文件。章节也是标签:点击即可跳转。

nerviz/.claude/skills/project-config/SKILL.md

## Current settings

!java -jar "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/ArchHook.jar" config list 2>&1

The block above is one JSON line from config list: every file this project may write for itself, each key with its type, its allowed values, its default, its current value, what it changes (effect), fixed: true when upstream owns it, available: false when the audit trail is off, in_force and problems as doctor would print them. Where it did not expand — a host with no ` ! `` injection, such as the GitHub Copilot CLI — run the same command first:

java -jar .claude/hooks/ArchHook.jar config list

## Why this is a skill (Form 2) and not an agent

A short procedure over one command's output, typed by hand because it changes a versioned file (axes 2 and 3 of decision 0187). An agent was rejected: no context to preserve, no tool to restrict beyond what config itself refuses, the same model — none of invariant 5's reasons. The validation is not here either: it lives in ArchHook.jar config, so a person, this skill, another agent and a later mod reach the same rule.

### 1 · Show

No argument: render the block as one table per file — path, summary, then the keys whose value is not null and every key whose in_force mentions it — and the problems, if any, first. For audited, list only the pieces whose value differs from default; the full list of skills and agents is noise until asked for. End with the decision of each file (decision), cited by path, for whoever wants the reason.

problems not empty → say so before anything else: doctor reports the same line red, and a gated one (doctor.gate.labels) fails CI. The way out is config unset <id> <key> for each key it names.

### 2 · Decide what to change

An argument or a request names a change → map it to <id> <key> <value> from the block. A key not in the block does not exist: say which keys do, never invent one. Ambiguous (which skill, which value) → one AskUserQuestion with the candidates from the block, each option carrying its effect; when a value differs from the default, say what that default protects — the effect text and the decision record hold it.

### 3 · Confirm, then write

State the command and the line of the file it changes, and ask once. On yes:

java -jar .claude/hooks/ArchHook.jar config set <id> <key> <value>
java -jar .claude/hooks/ArchHook.jar config unset <id> <key>      # back to the default

Exit 0 prints the change. Exit 2 wrote nothing and printed why — relay it as printed and offer the valid values from the block; never retry with a guessed value. Exit 1 is a usage error.

### 4 · Report

The file and the line changed, that it is versioned (commit it with the change it serves), and the doctor line that now validates it (doctor_label). /arch-adopt never touches these files: the setting survives every update.

## Failure modes

  • The block is a stack trace or Unknown mode: config. The project's ArchHook.jar predates
  • config: no project_config. Same cause, extensions.json side — /arch-adopt.
  • A guard refusal naming config set. Something tried to write the file directly. Use the
  • available: false and the person wants a setting of the audit trail. Creating
在 GitHub 上打开完整文件 →
§ 行为

它读什么、写什么、拒绝什么

skill 自己的契约,取自 SKILL.md,保留原文。

Class

ops — the territory is skill_classes.ops in @.claude/schemas/extensions.json, and it is empty: this skill writes no file with a tool. Every change is java -jar .claude/hooks/ArchHook.jar config set|unset, which writes the file itself after the validator doctor runs passes. guard refuses a Write, an Edit or a shell redirect into a registered path, so editing the JSON by hand from here is not a way around it.

Reads

the config list output above. Which settings exist, their keys, values, defaults and the decision behind each are data in project_config of @.claude/schemas/extensions.json; this skill never restates them.

Writes

nothing directly. Through config: the files project_config lists, and only those.

Out of reach

a key marked fixed (today arch-adopt in audited, never audited); a setting whose file is available: false (the audit trail is off — .claude/audit-usage/ missing — and writing a setting of it would switch the trail on); anything in .claude/settings.json, settings.local.json or extensions.json itself, which /arch-adopt overwrites.

来源:SKILL.md § Contract(nerviz e4cae27)。

§ guard 与 hook

guard 如何处理它

ops 是这个 skill 的类别,左侧的列表就是它的领地。skill 在自己的提示上运行时阶段打开,ArchHook 对照这份列表判断每一次写入。右侧的文字是 hook 自己输出的。

project-config 的 write_allow

  • 任何文件:领地为空

拒绝以退出码 2 结束,消息回到模型。

> /project-config …
UserPromptSubmit
  guard prompt                     exit 0
# phase opened: project-config (class ops)
# write_allow: [] — this class writes no file
§ 如何被调用

由谁调用

它不是某条链上的步骤。它由自己的提示 /project-config 启动,guard 像对待其他 skill 一样对待它:阶段打开,其类别的领地生效。

← 返回链路