ho-apply-script

ho-apply-script is a skill for Claude Code, Codex from s977043/PlanGate. It costs 90 tokens per session (3,272 once invoked), scanned B, original, MIT.

A skill for building a shell script that a person can safely use to apply a prepared patch. The script includes checks and apply, verify, and rollback modes, but does not commit or push changes.

In plain words
What is it for?
Use it when preparing verified updates to protected repository paths, including GitHub Actions workflows, hooks, and Claude settings.
Why use it?
Some files, such as CI workflows and agent settings, are restricted from direct AI editing. It provides a repeatable handoff so a person can apply the change and check the result.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; positional $N argument; installed under .agents/ (shared by several agents).

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is _out=$(sh tests/extras/ta-NN.sh 2>&1 || true).

Good fit Use it when preparing verified updates to protected repository paths, including GitHub Actions workflows, hooks, and Claude settings.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/s977043/PlanGate
agentmods
npx agentmods add skills/s977043/plangate/ho-apply-script

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ho-apply-script

README.md
[![agentmods](https://agentmods.dev/badge/skills/s977043/plangate/ho-apply-script/github.svg)](https://agentmods.dev/skills/s977043/plangate/ho-apply-script)
Your own site
<a href="https://agentmods.dev/skills/s977043/plangate/ho-apply-script"><img src="https://agentmods.dev/badge/skills/s977043/plangate/ho-apply-script/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ho-apply-script

Your own site · 80×15
<a href="https://agentmods.dev/skills/s977043/plangate/ho-apply-script"><img src="https://agentmods.dev/badge/skills/s977043/plangate/ho-apply-script.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,272 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00090 $0.03272
Opus 5 $0.00045 $0.01636
Sonnet 5 $0.00018 $0.00654
Haiku 4.5 $0.00009 $0.00327

Measured today against content hash 620c9fec320a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

ho-apply-script scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

T="$(mktemp -d)"; trap 'rm -rf "$T"' EXIT

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

.agents/skills/ho-apply-script/SKILL.md · 176 lines

How it starts

The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.

HO Apply Script

Hardening Override(HO)対象パスは AI が編集できない。AI は patch と「検証つき適用 スクリプト」までを用意し、実行は Human が行う(責務 4 分類の Human-owned)。

本 skill はそのスクリプトの型を定める。毎回ゼロから書くと同じバグを踏むため。

When to use

  • HO 対象パス(正本: mode-classification.md の 「承認境界周辺の変更」の 12 カテゴリ)を変更する patch を Human に渡すとき
  • scripts/apply-*.sh を新規に書くとき

When not to use

  • 非 HO パスの変更(AI が直接編集して PR にすればよい)
  • patch を作ること自体(それは patch 文書側の仕事。本 skill は適用の型

Inputs

入力
patch 文書のパス docs/working/_reports/1288-ci-layer2-and-push-lane-patch.md
marker 名 PG-PATCH-BEGIN / PG-PATCH-END
対象ファイル .github/workflows/sync-plugin-plangate.yml
適用後に成立すべき述語 「層 2 の検査が清浄なツリーで空」「ta-71 が 27/0」

Outputs

apply(既定)/ --verify / --rollback の 3 モードを持つ POSIX sh スクリプト 1 本。 commit も push もしない。

Procedure

1. 骨格

#!/bin/sh
set -eu
REPO="${PLANGATE_APPLY_REPO:-/absolute/path/to/repo}"   # 検証用に上書き可能にする
DOC="docs/working/_reports/<name>.md"
TARGET=".github/workflows/<name>.yml"
MODE="${1:-apply}"
T="$(mktemp -d)"; trap 'rm -rf "$T"' EXIT
die() { printf 'ABORT: %s\n' "$*" >&2; exit 1; }
ok()  { printf '  ok  %s\n' "$1"; }
cd "$REPO" || die "repo に入れない: $REPO"

2. 前提の確認

br=$(git rev-parse --abbrev-ref HEAD)
[ "$br" = "main" ] || die "branch が main でない(現在: $br)"

# 未コミット変更。**対象ファイル自身は除外する**(下記の落とし穴 2)
dirty=$(git status --porcelain \
  | grep -v 'docs/working/_audit/skip-decision-log.jsonl' \
  | grep -vF -- "$TARGET" || true)
[ -z "$dirty" ] || { printf '%s\n' "$dirty" >&2; die "未コミットの変更がある"; }

[ -f "$DOC" ] || die "patch 文書が無い: $DOC(PR が未マージの可能性)"

3. 抽出(awk 方式。落とし穴 3)

awk 'BEGIN{q=sprintf("%c",96)}
     /^<!-- PG-PATCH-BEGIN -->$/{b=1;next}
     /^<!-- PG-PATCH-END -->$/{exit}
     b && substr($0,1,1)==q{f=!f;next}
     f' "$DOC" > "$T/p.patch"
[ -s "$T/p.patch" ] || die "patch 抽出が空: $DOC"
head -1 "$T/p.patch" | grep -q '^diff --git ' \
  || die "抽出結果が unified diff で始まっていない"

Read the full file on GitHub · 176 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 176 lines · 90 tokens per session scan B 620c9fec320a

Subscribe to this mod's changes

ho-apply-script is a skill published in the GitHub repository s977043/PlanGate (2 stars, last pushed today), licensed MIT. It adds 90 tokens to every session and 3,272 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-10.