watch-sentinel
Use when open PRs need code-sentinel quality+security review with false-positive filtering
Skill by nishikawa
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/elchika-inc-watch-sentinel
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/watch-sentinel
What's inside
- Skill name
watch-sentinel- Description
- Use when open PRs need code-sentinel quality+security review with false-positive filtering
- License
- MIT
- Metadata
- dev: false · tools: gh, node · author: nishikawa · description: 未チェックの open PR を順番に取得し、code-sentinel(quality+security レンズ + 3票検証)でレビューして結果を PR にコメント、ラベルで状態管理するスキル。各 PR の実レビューは sentinel スキルに委譲する。 · sentinel_root: ~/projects/naoto24kawa/code-sentinel
- Instructions
- 213 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
## 設定
`sentinel_root` に code-sentinel リポジトリ(ビルド済み)のパスを指定する。各 PR のレビューはこのリポジトリの CLI(`dist/cli/main.js`)と `sentinel` スキルを使う。
```yaml
sentinel_root: ~/projects/naoto24kawa/code-sentinel # ビルド済みリポジトリのパス
```
## 概要
「未チェックの open PR を自動で code-sentinel レビューして進める」スキル。`watch:sentinel:checked` が付いていない open PR を番号昇順で処理し、quality/security の指摘(3票投票で偽陽性を除去済み)を PR にコメントしてラベルを更新する。
各 PR の実レビューは `sentinel` スキルに委譲する(このスキルは PR の Pick・コメント・ラベル管理という薄いラッパーに徹する)。
使わないとき: 特定の PR やコミットを手動でレビューしたい場合は直接 `sentinel` スキルを使う。
**このスキルはレビューのみを行う。コードの修正・Approve・マージはしない。**
## 呼び出し方
```
/watch-sentinel # 未チェックの open PR を番号昇順で全件レビュー
/watch-sentinel max={N} # 昇順ソート後、先頭 N 件まで処理
/watch-sentinel {N} # PR #{N} を直接レビュー(ラベル状態に関わらず1件)
```
`/watch-sentinel max={N}` と `/watch-sentinel {N}` を同時指定した場合はエラーとして終了する。
継続運用したい場合は CC の `/loop` で上から駆動する(例: `/loop 30m /watch-sentinel`)。ループ機構はこのスキルでは定義しない。
## 前提
`sentinel_root` のリポジトリがビルド済みであること(`dist/cli/main.js` が存在する)。`sentinel` スキル(単発レビュー)が利用可能であること。
**このスキルは `gh pr checkout` を行わない。** sentinel は `git show <sha>:<path>` で PR の差分内容を読むため HEAD を切り替えない。したがって他の watch-* スキル等と同一 worktree で同時に実行しても作業を破壊しない。
---
## Workflow
### 前提: 引数解析・環境確認・ラベルの確保
**この前提節は呼び出しモードに関わらず常に最初に実行する**(直接指定モード `/watch-sentinel {N}` でもラベル未作成だと `--add-label` が失敗するため)。
まず引数を解析する。`max=N` と PR 番号 `{N}`(裸の数値)が両方指定された場合はエラーとして終了する。`max=N` は内部バッチループの上限、`{N}` は単一 PR 直接指定で、排他である。
`sentinel_root` を展開し、ビルド済み CLI の存在を確認する。`CODE_SENTINEL_ROOT` をエクスポートして sentinel の ingest に渡す。
```bash
SENTINEL_ROOT=$(eval echo <sentinel_root>) # チルダ展開
if [ ! -f "$SENTINEL_ROOT/dist/cli/main.js" ]; then
echo "[error] $SENTINEL_ROOT/dist/cli/main.js が見つかりません。code-sentinel をビルドしてください(cd $SENTINEL_ROOT && npm run build)"
exit 1
fi
export CODE_SENTINEL_ROOT="$SENTINEL_ROOT"
REPO_PATH=$(git rev-parse --show-toplevel 2>/dev/null) \
|| { echo "[error] git リポジトリ内で実行してください"; exit 1; }
REPO_NAME=$(basename "$REPO_PATH")
```
状態遷移に使うラベルを冪等に確保する(存在しないラベルへの `--add-label` はエラーになるため)。
```bash
gh label create "watch:sentinel:active" --color "e4e669" --description "watch-sentinel がレビュー中" 2>/dev/null || true
gh label create "watch:sentinel:checked" --color "0e8a16" --description "code-sentinel レビュー完了" 2>/dev/null || true
gh label create "watch:sentinel:warning" --color "e99695" --description "code-sentinel: 指摘あり(要確認)" 2>/dev/null || true
```
### Recovery(毎回 Pick の前に実行)
`watch:sentinel:active` が付いている PR が open のままなら、前セッションでの中断とみなしてリセットする。
```bash
gh pr list --label "watch:sentinel:active" --state open --json number \
| jq '.[].number' | while read n; do
gh pr edit "$n" --remove-label "watch:sentinel:active"
done
```
### Pick(PR 番号を直接指定していない場合)
open PR のうち `watch:sentinel:checked` が付いていないものを番号昇順で取得する。`watch:sentinel:active` 付きはスキップ。`max=N` 指定があれば先頭 N 件に絞り、Workflow 全体をその件数分繰り返す(各ループで Pick → Review → Comment → Update を実行し、未チェック PR が0件になるか N 件に達したら終了する)。`max` 未指定なら全件処理する。
```bash
gh pr list --state open --json number,title,labels \
--jq '[.[] | select(
(.labels | map(.name) | contains(["watch:sentinel:checked"]) | not) and
(.labels | map(.name) | contains(["watch:sentinel:active"]) | not)
)] | sort_by(.number)'
```
対象 PR が0件なら「未チェックの open PR が見つかりません」と報告して終了する。
対象 PR の先頭1件を選択し、`watch:sentinel:active` を付ける。
```bash
gh pr edit {N} --add-label "watch:sentinel:active"
```
**直接指定モード (`/watch-sentinel {N}`)**: 前提節(環境確認・ラベル確保)と Recovery は通したうえで、Pick をスキップして PR #{N} をそのまま対象にする。ラベル状態に関わらず1件だけ処理する(`active` 付与 → Review → Comment → Update)。
### Review(sentinel スキルへ委譲)
> **sentinel スキルとの関係**: このステップのロール定義の正本は同リポの `sentinel` スキル(インストール先は `~/.agents/skills/sentinel/`)であり、watch-sentinel は sentinel スキルへの委譲を維持する。
PR ごとに専用の workDir を用意し、前回成果物が混ざらないよう作り直す(ledger は workDir 単位で蓄積するため、PR をまたいで再利用すると指摘が混在する)。
```bash
WORK_DIR="${TMPDIR:-/tmp}/code-sentinel-watch-${REPO_NAME}-pr{N}"
rm -rf "$WORK_DIR"
# fork PR でも git show が解決できるよう、PR head を HEAD 非切替で取得する(対象リポで実行)
git -C "$REPO_PATH" fetch origin "pull/{N}/head" --quiet 2>/dev/null || true
```
`sentinel` スキルを **Skill ツール**で起動する。`skill` は `sentinel`、`args` は `<repoPath> <prRef> <workDir>` の順(先頭にスキル名 `sentinel` を含めない)。具体値:
```From elchika-inc/agent-toolkit, MIT.
More from elchika-inc/agent-toolkit
- 0.570score
documenting-verification
elchika-inc
Use when 動作検証を実行してその結果を再現可能な資料としてリポジトリに残したいとき。「動作検証して資料に残して」「動かして確認してエビデンスを残して」「デプロイ前に本当に動くか実体で確かめたい」といった依頼、および実装や画面から動作パターンを網羅的に洗い出して実行し検証レポートを成果物として求める場面で使う。…
SkillAFreshness: AClaude Code +9 - 0.567score
layout-geometry-check
elchika-inc
このスキルは「レイアウト崩れを検査」「はみ出しを確認」「文字切れを検出」「layout geometry check」と依頼されたときに使われる。Playwright で複数の画面幅の要素座標を測り、表示崩れの候補を JSON に出し、基準線との差分を検査する。
SkillAFreshness: AClaude Code +9 - 0.567score
verifying-changes
elchika-inc
PR・昇格 PR・本番デプロイのあとに、司令塔から配車された確認役が動作を確かめ、実測記録を基に結果を分類して GitHub へ残すときに使う。PR・昇格・本番の確認は verifying-changes、検証資料をリポジトリへ残す依頼は documenting-verification が扱う。
SkillAFreshness: AClaude Code +9 - 0.565score
delegation-spec
elchika-inc
Use when 司令塔(coordinator)が worker へ実装・修正・整理タスクを委任する仕様(dispatch spec)を書くとき。トリガー: 「委任仕様を書いて」「worker に出す」「dispatch する」「委任テンプレ」「委任仕様のチェック」。literal 実行前提の worker…
SkillAFreshness: AClaude Code +9 - 0.540score
lens-review-cycle
elchika-inc
This skill should be used when the user asks to "レンズレビュー", "lens review cycle", "専門家レビュー", "expert review cycle", "5人の専門家にレビューしてもらおう", "指摘が0になるまでレビュー"…
SkillAFreshness: AClaude Code +9 - 0.539score
standards-refactor
elchika-inc
Use when the user asks to refactor existing code or make it more readable — リファクタリングして, 読みやすくして, standards-refactor, CODING.md に沿って直して, この関数やファイルが読みにくい…
SkillAFreshness: AClaude Code +9 - 0.529score
guarantee-ledger
elchika-inc
Use when プロジェクトへ保証レコード(guarantee ledger)を導入する・保証を追記する・保証レコードの機械検査を配線するとき。壊してはいけない約束を一枚の文書へ宣言し、実装とテストへ索引を張り、その約束の出自(指示・判断の出来事)を必須にする。トリガー: 「保証台帳」「guarantee…
SkillBFreshness: BClaude Code +9 - 0.526score
standards-templates-drift
elchika-inc
standards と templates のドリフト、相互参照チェック、templates drift、standards-templates-drift、パス参照の実在、節番号の実在を確認したい依頼で使用される。両 checkout の相互参照が指すパスと節番号を照合し、不在と判定不能を報告するスキル。
SkillBFreshness: BClaude Code +9 - 0.524score
sentinel
nishikawa
Use when code changes need structured quality + security review with false-positive filtering.
SkillBFreshness: BClaude Code +9 - 0.524score
guarantee-pin-check
elchika-inc
Use when 保証レコードの pin 未確認(unpinned)な保証をまとめて潰すとき。保証を意図的に壊して裏付けテストが赤くなることを観測し、証跡を保証レコードへ記入する多主体の手順。トリガー: 「pin 確認」「unpinned を潰す」「保証が本当に守られているか確かめる」「mutation…
SkillBFreshness: BClaude Code +9 - 0.520score
dreaming
elchika-inc
Use when CLAUDE.md やプロジェクトのルール文書が肥大化・陳腐化していないか棚卸ししたいとき。Triggers: "棚卸し", "Dream", "ルールの剪定", "CLAUDE.md 肥大化", "overfit チェック", "altitude チェック", "ドキュメント整理"…
SkillBFreshness: BClaude Code +9 - 0.520score
message-adapter
elchika-inc
Use when connecting a new message source or consumer to a messaging hub — 新しい通知ソースを繋ぐ, ingest アダプタを作る, メッセージを別の用途で読む, incidentctl のような CLI を作る, hub…
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 2
- Last commit (this folder)
- Jul 16, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/elchika-inc/agent-toolkit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from nishikawa
Cite this page
watch-sentinel skill. Agent Mart. https://agentmart.dev/skills/elchika-inc-watch-sentinel (last updated 2026-10-24)