用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/laicluse/agent-fieldkit --skill test-before-push命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | test-before-push |
| description | Verify plugin candidates and integrate them without automatically mutating shared agent runtimes. |
Run this procedure after every multi-agent marketplace plugin change before declaring the source change complete, whether or not a push is planned. A linked worktree may verify a candidate but may never become a persistent marketplace source. Plugin installs, updates, removals, enablement changes, and marketplace mutations affect every live coding session on the machine and are a separate operator-approved action.
.claude-plugin/marketplace.json in the root..agents/plugins/.Do not use for user-level skills in ~/.claude/skills/ or ~/.codex/skills;
those load through the user-level skill path, not a marketplace install.
Run from the repo root:
alias=$(jq -r '.name' .claude-plugin/marketplace.json)
printf 'alias=%s\n' "$alias"
git status --short
circus_bin="${CIRCUS_BIN:-$(command -v circus || true)}"
[ -x "$circus_bin" ] || {
echo "circus@laicluse-agent-fieldkit is required for plugin builds" >&2
exit 1
}
if git diff --cached --quiet; then
"$circus_bin" plugins versions --check .
else
PLUGIN_VERSIONS_GIT_CMD="${PLUGIN_VERSIONS_GIT_CMD:-git commit}" \
"$circus_bin" plugins versions --staged .
fi
"$circus_bin" plugins build .
"$circus_bin" plugins check .
All checks must pass. A clean index validates the committed version with --check; a staged current-task slice validates and preserves the next commit-count version with the same --staged operation the repository hook uses. If git status --short prints unrelated work, stop and isolate it first. Stage the current task before this procedure when version calculation needs the final candidate slice.
git_dir=$(git rev-parse --absolute-git-dir)
common_dir=$(git rev-parse --path-format=absolute --git-common-dir)
primary_checkout=$(dirname "$common_dir")
if [ "$git_dir" != "$common_dir" ]; then
printf 'Candidate verified in linked worktree; integrate it into %s.\n' "$primary_checkout"
fi
Never run either host's marketplace add with a linked-worktree path. Finish candidate verification there and integrate it through the repository flow. For an already-registered local Codex marketplace, that merge is the activation path for future sessions because Codex reads the generated plugin directly from the primary checkout.
From the primary checkout, inspect the existing installation without changing it:
common_dir=$(git rev-parse --path-format=absolute --git-common-dir)
primary_checkout=$(dirname "$common_dir")
test "$(git rev-parse --absolute-git-dir)" = "$common_dir"
alias=$(jq -r '.name' "$primary_checkout/.claude-plugin/marketplace.json")
plugin=<plugin>
codex_source=$(codex plugin list --json | jq -er --arg id "$plugin@$alias" '
.installed[]
| select(.pluginId == $id and .marketplaceSource.sourceType == "local")
| .source.path
')
case "$codex_source" in
"$primary_checkout"/*) printf 'local-codex-source=%s\n' "$codex_source" ;;
*) printf 'Codex is not reading this primary checkout directly.\n' >&2; exit 1 ;;
esac
When this check passes, merge the candidate into that primary checkout. Do not run codex plugin add, codex plugin marketplace add, or codex plugin marketplace upgrade; those commands are redundant for this source mode and can invalidate hook paths held by every running Codex session. A fresh Codex session will read the integrated generated source.
Claude Code normally executes an installed cache snapshot. Codex may also use a cache or need a first install instead of the direct local source above. Updating either host is machine-wide state, not a routine source-closeout step. Run the relevant command only after explicit operator approval in the current turn, naming the exact plugin and host:
claude plugins update "$plugin@$alias" # or install on first use
codex plugin add "$plugin@$alias" # only for first install or a non-local source refresh
Do not infer approval from a request to fix, test, integrate, commit, or merge a plugin. Those actions do not authorize changing shared agent runtime state. Marketplace add, remove, or upgrade commands require the same explicit approval.
After a merge-only local Codex change, open a fresh session and invoke the changed capability. Existing sessions keep the hook and skill set loaded at session start. After an explicitly approved Claude update, the current session can pick up the new cache with /reload-plugins; reload alone never snapshots working-tree edits.
For local-only marketplaces, there is no remote revert. Leave the primary-checkout marketplace configured until the operator explicitly changes the install source. Do not run any command below without that approval.
Only when the local clone is deliberately retired after its tested commit has been pushed, re-point the alias to the remote source without removing the marketplace:
owner_repo=$(git remote get-url origin | sed -E 's#.*github.com[:/](.+)/(.+)(\.git)?$#\1/\2#; s#\.git$##')
claude plugins marketplace add "$owner_repo"
claude plugins update "<plugin>@<alias>"
codex plugin marketplace add "$owner_repo"
codex plugin add "<plugin>@<alias>"
Do not run marketplace remove as a cleanup step. In Claude Code, marketplace remove cascade-uninstalls plugins under that alias.
Source verification and integration have no confirmation step. Machine-wide plugin or marketplace mutation always pauses for explicit operator approval in the current turn.