moai-workflow-loop

moai-workflow-loop is a skill for Claude Code from modu-ai/moai-adk. It costs 44 tokens per session (2,701 once invoked), scanned A, original, Apache-2.0.

An automated code-quality feedback loop that combines language-server diagnostics, structural code searches, security checks, tests, and coverage checks.

In plain words
What is it for?
Use it for error-driven development, automated fix cycles, continuous quality checks, and reviewing code for structural or security problems.
Why use it?
It helps developers repeatedly find and fix issues until the remaining queue is cleared and diagnostics are clean.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Use it for error-driven development, automated fix cycles, continuous quality checks, and reviewing code for structural or security problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/modu-ai/moai-adk/moai-workflow-loop
About the project

MoAI-ADK is a Go-based harness that organizes and verifies Claude Code work across planning, implementation, synchronization, and review stages. Developers use it to structure agentic coding tasks, apply quality gates, and route work across language models, while the catalogue entries extend its workflow with skills, hooks, commands, MCP servers, instructions, and settings.

modu-ai/moai-adk · 1,236 stars · on GitHub · adk.mo.ai.kr

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.

Any agent
npx skills add modu-ai/moai-adk --skill moai-workflow-loop
Clone the repo
git clone --depth 1 https://github.com/modu-ai/moai-adk

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/modu-ai/moai-adk/moai-workflow-loop"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-workflow-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,701 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 75
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
  • high Anti-Refusal · line 111
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
  • high Prompt Injection · line 202
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
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.00044 $0.02701
Opus 5.5 $0.00018 $0.01080
Sonnet 5.5 $0.00009 $0.00540
Haiku 4.5 $0.00004 $0.00270

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

Security

Grade A, and why

moai-workflow-loop 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 13d 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/skills/moai-workflow-loop/SKILL.md · 239 lines

How it starts

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

Ralph Engine

Automated feedback loop system integrating LSP diagnostics, AST-grep security scanning, and test validation for continuous code quality improvement.

Preset Architecture — the Ralph Engine as a goal preset

The /moai loop skill (~/.claude/skills/moai/workflows/loop.md) re-expresses this Ralph engine as a goal preset built ON the goal engine: a scan stage builds a finite issue queue, and the iterate-until-done decision is delegated to the goal engine (stop-goal) with the pre-filled condition "queue drained + diagnostics clean". In this preset architecture, this SKILL.md documents the underlying LSP / AST-grep / test / coverage diagnostic machinery that the goal-preset sweep drives; the preset layers the goal-engine composition on top of that machinery WITHOUT changing it. The four loop quadrants (goal-based sweep, turn-based /moai fix, time-based cadence, proactive CI-watch) are presets on the one goal engine, not independent engines.

Quick Reference

Core Capabilities:

  • LSP Integration: Real-time diagnostics from language servers
  • AST-grep Scanning: Structural code analysis and security checks
  • Feedback Loop: Iterative error correction until completion conditions met
  • Hook System: PostToolUse and Stop hooks for seamless Claude Code integration

Key Components:

  • .claude/hooks/moai/handle-post-tool.sh (PostToolUse): LSP diagnostics after Write/Edit operations
  • .claude/hooks/moai/handle-stop.sh (Stop): Loop iteration control
  • ralph.yaml: Configuration settings

Commands:

  • /moai: One-click Plan-Run-Sync automation (default)
  • /moai loop: Start feedback loop
  • /moai fix: One-time auto-fix

When to Use:

  • Implementing features with zero-error goal
  • Automated code quality improvement
  • Continuous integration workflows
  • Error-driven development patterns

Implementation Guide

Architecture Overview

The Ralph Engine follows a layered architecture. User commands such as /moai:loop, /moai:fix, and /moai enter the Command Layer. The Command Layer invokes the Hook System, which contains the PostToolUse Hook for LSP diagnostics and the Stop Hook for loop control. The Hook System connects to Backend Services including the LSP Client (MoAILSPClient), AST-grep Scanner, and Test Runner. Backend Services feed into Completion Check which evaluates whether errors are zero, tests pass, and coverage is met. Based on the Completion Check result, the system either continues the loop or completes.

Read the full file on GitHub · 239 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 13d ago Changed f7eff606db0f
  2. 15d ago Changed · -1 lines 3ac749448490
  3. 1mo ago First seen · 240 lines · 44 tokens per session scan A c313738f274f

Subscribe to this mod's changes

moai-workflow-loop is a skill published in the GitHub repository modu-ai/moai-adk (1,236 stars, last pushed today), licensed Apache-2.0. It adds 44 tokens to every session and 2,701 once invoked, about $0.0002 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-30.