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.
git clone --depth 1 https://github.com/s977043/PlanGatenpx agentmods add skills/s977043/plangate/ho-apply-scriptWrote 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.
[](https://agentmods.dev/skills/s977043/plangate/ho-apply-script)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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 で始まっていない"
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.
- today First seen · 176 lines · 90 tokens per session scan B 620c9fec320a
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.
Other skills, from other repositories
pr-watch
Local PR watcher. Monitors CI status, automatically fixes failing checks by reading failure logs and applying targeted fixes, then optionally merges when all checks pass. Local CLI analog to Claude Code's cloud auto-fix feature.
github-desktop-release
Qualify Windows desktop installers in GitHub Actions and promote verified Windows/macOS assets from one frozen SHA. Use for cloud packaging, installer failures, or GitHub Release publication; not local packaging or macOS qualification.
ca-watch
Watch a PR's CI to completion — diagnose on red, notify and offer the merge on green. Never auto-merges.
github
GitHub operations — issues, PRs, commits, code search, CI/CD via gh CLI.
baby-sit
Monitor a GitHub pull request until CI is green, diagnose failures, and rerun only evidence-backed flaky GitHub Actions jobs.
atmos-hooks
Atmos hooks: lifecycle events, hook kinds, command/store/git/security hooks, step/steps hooks, when: conditions, scoping and overrides, toolchain integration, --skip-hooks, and Atmos Pro/local output.