moai-workflow-loop

Automate a Claude workflow loop diagnosing and fixing code errors with LSP and AST-grep.

Updated Jan 12, 2026
One-click install
npx skills add https://github.com/windysky/claude_notification_wsl2 --skill moai-workflow-loop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-workflow-loop
Source: https://github.com/windysky/claude_notification_wsl2/tree/main/.claude/skills/moai-workflow-loop
Command: npx skills add https://github.com/windysky/claude_notification_wsl2 --skill moai-workflow-loop

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates an automated feedback loop for code quality by combining LSP diagnostics with AST-based security and quality checks, enabling iterative self-correction during development.

Core Features & Use Cases

  • LSP Diagnostics Integration: collects real-time diagnostics after edits
  • AST-grep Scanning: security and quality checks to flag issues
  • Loop Orchestration: automatic fix iterations until criteria met
  • Claude Code Hooks integration: PostToolUse and Stop hooks to coordinate edits
  • Use Case: implement error-driven development by continuously diagnosing, fixing, and validating code quality in a project

Quick Start

Start a Ralph workflow loop by issuing Claude Code commands to begin iterative diagnostics and automated fixes on your codebase. Example: use /moai:loop to start, then /moai:fix to apply fixes as issues are found, while monitoring progress and adjusting configuration in .claude/skills/moai-workflow-loop/ralph.yaml as needed.

Frequently Asked Questions about moai-workflow-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate code error fixing loops with LSP and AST-grep?

Automated code error fixing loops with LSP and AST-grep are orchestrated by applying PostToolUse and Stop hooks to continuously diagnose, fix, and validate code quality until criteria are met. This workflow requires a Ralph configuration file to coordinate iterative self-correction.

What is an automated feedback loop for code quality using LSP diagnostics?

An automated feedback loop for code quality using LSP diagnostics continuously collects real-time errors after edits and applies AST-based security checks to flag issues. This mechanism enables iterative self-correction by validating code quality automatically during development.

Do I need a Ralph configuration to run LSP diagnostics and AST-grep scanning?

Yes, running LSP diagnostics and AST-grep scanning requires a Ralph configuration file named ralph.yaml. You also need an LSP client, AST-grep rules, and Stop or PostToolUse hooks to orchestrate loop iterations within the Claude Code environment.

How do I start a workflow loop to continuously diagnose and fix code errors?

To start a workflow loop to continuously diagnose and fix code errors, issue Claude Code commands like /moai:loop to begin iterative diagnostics, then use /moai:fix to apply fixes as issues are found. Monitor progress and adjust configuration in ralph.yaml as needed.

Can I integrate AST-grep security checks with Claude Code hooks?

Yes, AST-grep security checks can be integrated with Claude Code through PostToolUse and Stop hooks. These hooks coordinate edits and trigger automatic fix iterations, applying AST-based quality checks after LSP diagnostics identify real-time errors.

What are the limitations of using AST-grep rules for iterative code quality validation?

Iterative code quality validation using AST-grep rules is limited to environments using the Ralph Engine and requires specific hook configurations. It relies on LSP client availability and properly defined AST-grep rules to flag issues during the automated self-correction loop.