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

架构
skill · ops 类 · sonnet

git-publish

在两次明确确认之后,提议提交并推送项目。

skill · opssonnet不写任何文件
§ 它写出的文件

它写出的文件

这个 skill 不写分文件:它通过 git 作用于项目。契约见下文。

§ 行为

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

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. Its whole effect is git over Bash, which the guard deliberately does not cover — a commit is not a file write, and the two confirmations below are what gate it. allowed-tools pre-approves only the local git subcommands and gh auth status; the remote step is left to permissions.ask (decision 0076).

Input (optional, from the invoking context or the typed argument)

a short description of what was just done — e.g. "initial scaffold, blueprint hexagonal, maven, features: rest,jpa" or "UC-001-order: order management feature". Used to build the commit message. No input → generic message from what git status shows.

The typed argument

/new-feature and /new-feature-implement end by printing /git-publish <message>[ — paths: <p…>][ — pre-existing: <p…>]. The message is everything before the first literal — paths: or — pre-existing:; each marker, when present, opens one of the two inputs below. Paths are space-separated.

Input (optional): paths to stage

When the invoking context or the typed argument names paths — /new-feature prints them for an approved spec not implemented yet (docs/use-cases/UC-NNN-<slug>/, docs/use-cases/BACKLOG.md) — gate 1 lists and stages only those paths. Anything else dirty in the tree stays unstaged and is named in the report.

Input (optional): pre-existing changes

— pre-existing: <paths> is the list the feature flow's guardrail took at the start of its run (IGNORED counts as an entry). It is the PRE_EXISTING_WORK list of step 1, handed over instead of rediscovered: a /git-publish typed after /clear has none of that run's context, so what the guardrail saw is what the line carries. Without the marker, step 1 discovers it from git status --porcelain as before.

Input (optional): project directory

When the invoking context names project: <absolute path> — project-initializer does, because it runs in a session opened somewhere else — that directory is the project. Run every command of this procedure as (cd "<path>" && git …), gh repo create included, so --source=. is the project and git init never lands in the session's own repository. Without it, the project is the session's directory.

Reads

git status, git remote -v, gh auth status. Nothing in the project files.

Writes

.git/ of the current project, and — only after the second confirmation — a new GitHub repository via gh repo create, or a push to a remote the user names. Never writes project source files.

Integration

- Invoked by project-initializer (agent) right after a green build, via the Skill tool, with a scaffold summary as context. - Typed by the user at the end of each of the two feature flows, after /clear, from the line the flow printed: after /new-feature approves a spec, with the approved spec's paths as the only paths to stage; after /new-feature-implement succeeds, with the UC name/summary as the message. Neither flow invokes it. - Invocable directly by the user (/git-publish, or by asking in plain language).

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

§ guard 与 hook

guard 如何处理它

ops 是这个 skill 的类。ArchHook 在 skill 被调用时开启一个阶段,并按该类的领地检查每次写入。右侧文字是 hook 自己的输出。

ops 类的领地为空:这个 skill 不写任何文件。它的全部作用是通过 Bash 执行 git,guard 不覆盖这一点;由两次确认来把关。

§ 编排

它在轨道上的位置

每张卡片是 /new-feature 的一步;箭头带着一步交给下一步的分文件。虚线的步骤仅在用例需要时运行。

← 返回链路