ai-loop-workflow

ai-loop-workflow is a command for Claude Code from s977043/PlanGate. It costs 0 tokens per session (2,043 once invoked), scanned A, original, MIT.

A command that starts a human-supervised loop for an AI coding workflow. It checks required conditions before each cycle and stops when its safety rules are broken.

In plain words
What is it for?
Use it to launch repeated cycles of planning, checks, a human or rule-based decision, execution, and grading. It is intended for controlled AI-assisted development workflows.
Why use it?
It prevents the AI workflow from starting with missing prerequisites or continuing after a rule violation. It also makes human decisions part of the process.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; reads ~/.codex paths; mentions Codex.

Good fit Use it to launch repeated cycles of planning, checks, a human or rule-based decision, execution, and grading. It is intended for controlled AI-assisted development workflows.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/s977043/plangate/ai-loop-workflow
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/s977043/PlanGate

Made for: Claude Code.

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-workflow

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/s977043/plangate/ai-loop-workflow"><img src="https://agentmods.dev/badge/commands/s977043/plangate/ai-loop-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,043 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.00000 $0.02043
Opus 5.5 $0.00000 $0.00817
Sonnet 5.5 $0.00000 $0.00409
Haiku 4.5 $0.00000 $0.00204

Measured 1mo ago against content hash 0ddc41a751e1, 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-workflow 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 1mo 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.

.claude/commands/ai-loop-workflow.md · 98 lines

How it starts

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

/ai-loop-workflow

ai-loop-workflow(human-on-the-loop 裁定ループ)を明示起動する。 /ai-dev-workflow(PlanGate 本番フロー WF-00〜07)と対をなす入口であり、 本番フローの置き換えではない。恒久定義(責務・terminal state・C-3'/Human C-3 経路)の 正本は 00_concept.md、適用制限(Phase 1 rollout eligibility)の正本は rollout-policy.md(eligible run 限定。PlanGate 本番フローの C-3 は常に Human・不変)。

実行手順の正本: skill ai-loop-cycle(1 サイクル = LoopSpec → W チェック → arbiter 裁定 → exec → rubric grader)。本コマンドは前提確認と起動のみを担う。

パス表記の規約(重要): 本コマンド中の ai-loop 資材への参照は、環境ごとに 解決先が異なる。上流リポジトリ基準の docs/** / scripts/** を導入先で そのまま探しに行かないこと(3 経路とも配布対象外であり必ず空振りする)。 参照は <skill_dir> = skill ai-loop-cycle が置かれているディレクトリを 解決してから使う(表記・解決規則は skill ai-loop-cycle の SKILL.md 冒頭 「パス表記の規約」と同一):

環境 <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/

参照解決順: (1) <skill_dir> 配下の同梱物(references/ / scripts/ / schemas/)を第一に読む → (2) 導入先リポジトリが独自の正本(上流の docs/workflows/ai-loop/ に相当するもの)を保持していればそちらを優先する → (3) いずれでも解決できなければ 「正本 <path> を参照できなかった」と明示し、 本コマンド内の記述を代替正本として扱い、推測で内容を補わない。 なお上流リポジトリ(正本側)では <skill_dir> 配下に同梱物を持たない (references/ / scripts/ / schemas/ が揃うのは配布物のみ)ため、 上流では (1) が空振りし常に (2) で解決する。 plugin root 直下に docs/ を探しに行かないこと: plugin が配布するのは agents / commands / skills / rules 等の定義 ディレクトリのみで docs/ を配布対象として認識しないため必ず空振りする。

引数

$ARGUMENTS に以下の形式で渡される:

  • run TASK-XXXX — Plan-first の正式入口(TASK ID 必須)。既存の Plan Package (pbi-input / plan / todo / test-cases + C-1/C-2 evidence)を起点に production run を 開始する。LoopSpec は <skill_dir>/scripts/plan_package.py の derive_loopspec() で Plan Package から決定論派生し、production: true + plan_package ブロックを arbiter へ渡す(契約正本: <skill_dir>/references/c3-prime-contract.md。 上流リポジトリでは順に scripts/ai-loop/plan_package.py / docs/workflows/ai-loop/c3-prime-contract.md)。 TASK ID を伴わない自由文だけの run <説明> は production run を開始できない (TASK-0872 / #872。Plan Package 束縛の無い run を Wチェックへ進めない)
  • status — 直近 run の状態・decision record・摩擦台帳の要約を表示
  • (引数なし) — 前提チェックのみ実施して結果を報告

Read the full file on GitHub · 98 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. 1mo ago First seen · 98 lines · 0 tokens per session scan A 0ddc41a751e1

Subscribe to this mod's changes

ai-loop-workflow is a command published in the GitHub repository s977043/PlanGate (2 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,043 tokens. 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-09-03.