ai-loop-cycle

ai-loop-cycle is a skill for Claude Code, Codex from s977043/PlanGate. It costs 140 tokens per session (11,853 once invoked), scanned A, original, MIT.

A runbook for one cycle of an AI-assisted change review: collect files, run checks, make a decision, save a record, and follow the result.

In plain words
What is it for?
Use it to run the documented review cycle, apply its decision rules, save provenance records, and choose the next action after a branch or change review.
Why use it?
It gives the review process a repeatable order and keeps decisions and their supporting information recorded.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; reads ~/.codex paths; 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 python3 scripts/ai-loop/corpus_hash.py # 既定 scope = full(111 ファイル).

Good fit Use it to run the documented review cycle, apply its decision rules, save provenance records, and choose the next action after a branch or change review.

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/ai-loop-cycle

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 ai-loop-cycle

README.md
[![agentmods](https://agentmods.dev/badge/skills/s977043/plangate/ai-loop-cycle/github.svg)](https://agentmods.dev/skills/s977043/plangate/ai-loop-cycle)
Your own site
<a href="https://agentmods.dev/skills/s977043/plangate/ai-loop-cycle"><img src="https://agentmods.dev/badge/skills/s977043/plangate/ai-loop-cycle/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 ai-loop-cycle

Your own site · 80×15
<a href="https://agentmods.dev/skills/s977043/plangate/ai-loop-cycle"><img src="https://agentmods.dev/badge/skills/s977043/plangate/ai-loop-cycle.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 11,853 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00140 $0.11853
Opus 5.5 $0.00056 $0.04741
Sonnet 5.5 $0.00028 $0.02371
Haiku 4.5 $0.00014 $0.01185

Measured 16d ago against content hash 61dfabf91325, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ai-loop-cycle scanned grade A with 0 findings 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 16d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/ai-loop-cycle/SKILL.md · 814 lines

How it starts

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

ai-loop-cycle

本スキルは bundled resources(references/・scripts/・schemas/)で自己完結する。

パス表記の規約(重要): 本 SKILL.md 中の references/… / scripts/… / schemas/… は、すべて 本スキルディレクトリからの相対パス(= <skill_dir>/…) であって、導入先リポジトリのルートからの相対パスではない。実行時はまず <skill_dir>(このファイルが置かれているディレクトリ)を解決してから使う:

環境 <skill_dir>
plugin 導入先(Claude marketplace) <plugin_root>/skills/ai-loop-cycle/
install.sh --claude 導入先 .claude/skills/ai-loop-cycle/
Codex 導入先 .codex/skills/ai-loop-cycle/
上流リポジトリ(正本側) .agents/skills/ai-loop-cycle/

導入先が独自の正本(上流リポジトリの docs/workflows/ai-loop/ に相当するもの)を 別途保持している場合は、そちらを優先すること。

本スキルに同梱される ai-loop ドキュメント(references/ 配下。導入先で正本を 別途保持している場合はそちらを優先する)の references/execution-runbook.md に定義された 1 サイクル(変更対象ファイル取得 → W チェック → arbiter.py 裁定 → record 保存 → 分岐後の行動)を 実行するための手順スキル。判定ロジック・provenance スキーマの正本は runbook 側にあり、本スキルは それらを実行するための 委託プロンプト定型 と 手順の要約 のみを持つ(二重定義しない)。 詳細な手順・分岐表は都度 references/ を読みに行く(progressive disclosure。本 SKILL.md は 手順の要点のみを持ち、runbook 等の全文を転記しない)。

参照解決順(導入先で必ずこの順に探す): 本 Skill は 上流リポジトリ基準の docs/** パスを直接参照しない(#1232 AC-9 で除去済み)。docs/** は install.sh --claude / plugin(Claude marketplace)/ Codex の 3 経路とも配布対象外であり、書いた時点で導入先では必ず空振りするためである。したがって解決順は次のとおり: (1) <skill_dir> 配下の同梱物(references/ / scripts/ / schemas/)を第一に読む → (2) 導入先リポジトリが独自の正本(上流の docs/workflows/ai-loop/ に相当するもの)を保持していればそちらを優先する → (3) いずれでも解決できなければ 「正本 <path> を参照できなかった」と明示し、本 Skill 内の記述を代替正本として扱い、推測で内容を補わない。plugin root 直下に docs/ を探しに行かないこと: plugin が配布するのは agents / commands / skills / rules 等の定義ディレクトリのみで docs/ を配布対象として認識せず、plugin root 配下に相当する配布物が存在しないため必ず空振りする(クラス A の rules 参照が plugin root 配下で解決できるのは rules/ が実際に配布されるからであり、この非対称を docs/** に持ち込まない)。

前提

  • C-1 PASS・C-2 完了済みであること(references/execution-runbook.md §2 前提)。 本サイクルは C-3' ゲートの位置づけであり、C-1/C-2 未完了の変更には使わない。 この C-1 の実施結果(PASS)を Step 1 の入力 gates.c1 にそのまま渡す(#780 Slice B)。
  • 対象は lite 帯候補の変更(references/lite-criteria.md §2 の 4 軸を満たしうる変更)。 high-risk / critical 相当や boundary=touches-HO が明らかな変更には使わない (使っても flow フェーズで即 human escalate になる)。
  • 適用制限(Phase 1 rollout eligibility)は同梱 references/rollout-policy.md を正本とする (導入先が独自正本を保持する場合はそちらを優先)。導入先での適用は ①ho-paths の 導入先確定 ②LoopSpec scope.allowed_paths 宣言 の 2 条件が前提。恒久定義 (責務・terminal state・C-3'/Human C-3 経路)の正本は同梱 references/00_concept.md。 本サイクルは導入先の本番承認フロー(ゲート・hook 等の統制機構)からは呼ばれない(不変)。
  • auto-approve 方針(Phase 1): lite 4 軸(references/lite-criteria.md §2)を 申告制・AND・判定不能→false で満たせば、実機能も AUTO_APPROVED 対象に含めてよい (docs 級限定ではない)。size_ok は申告するが、arbiter が changed_files の 実ファイル数で機械検証する(SIZE_OK_MAX_FILES=2。実ファイル数が 2 を超えて size_ok=true を申告すると priority 1.9 で human escalate。#780 Slice C)。 他 3 軸(no_new_design/follows_pattern/reversible)は引き続き申告制のまま。
  • 裁定記録・摩擦台帳の保存先は導入先プロジェクトで定義する(本スキルは強制しない)。 既定案として、導入先の作業ディレクトリ配下に run 単位の裁定 record 用サブディレクトリ (例: <作業ディレクトリ>/ai-loop-runs/)を設ける配置が参考になるが、導入先の ディレクトリ規約を優先すること。

Read the full file on GitHub · 814 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. 16d ago Changed · +432 lines 61dfabf91325
  2. 1mo ago Changed · +24 lines c4ce47d56ada
  3. 1mo ago First seen · 358 lines · 140 tokens per session scan A 1a5a49002762

Subscribe to this mod's changes

ai-loop-cycle is a skill published in the GitHub repository s977043/PlanGate (2 stars, last pushed yesterday), licensed MIT. It adds 140 tokens to every session and 11,853 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

improve

Autonomous quality improvement loop. Scores a target against a rubric, selects the highest-leverage axis, attacks it, verifies, documents, and loops. No pre-planning between iterations — each loop re-scores from scratch.

SethGammon/Citadel · 48 tokens

triage

GitHub issue and PR investigator. Pulls open issues/PRs, classifies them, searches the codebase for root cause or reviews contributed code, proposes fixes with file:line references, and optionally implements fixes. Use for investigating GitHub issues and reviewing PRs; do NOT use for general code review unrelated to…

SethGammon/Citadel · 71 tokens

01-sdlc

Orchestrates a request from framing to a draft pull request, autonomous or supervised, isolating implementation, independent review, and final outcome challenge. Use when the user wants to deliver a change end to end. Not for one step.

ai-driven-dev/framework · 52 tokens

05-review

Reviews a change or a diff and says whether it is ready to ship, naming every problem with its fix. Use when the user wants a change checked before it ships. Not for fixing what the review finds, and not for auditing a whole codebase.

ai-driven-dev/framework · 54 tokens

00-async-dev

Drive the async-dev pipeline from one entry point, whether setup, run, or review. Use when the user wants to install async dev, run a ready issue, or address PR review comments, or on a webhook trigger. Not for plain status checks.

ai-driven-dev/framework · 56 tokens

02-challenge

Rethink just-completed work against an agreed plan, classifying findings as deal-breaker, suggestion, or correct, with a confidence score. Use to challenge or critically review recent work. Not for line-by-line style review or writing code.

ai-driven-dev/framework · 54 tokens