Agent skill

Moai Foundation Quality

by modu-ai in modu-ai/moai-adk

TRUST 5 quality principles and how MoAI enforces them through agents, the 3-level harness, /moai gate, and sync-auditor scoring.

Apache-2.0Auto-check passedTesting & QA

Install Moai Foundation Quality

skills CLI
$ npx skills add modu-ai/moai-adk --skill moai-foundation-quality -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install modu-ai/moai-adk moai-foundation-quality --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/modu-ai/moai-adk.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/moai-foundation-quality .claude/skills/moai-foundation-quality && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
moai-foundation-quality
GitHub stars
1.2k
Token cost
~2.9k tokens
SKILL.md length
1,260 words
Files
7 (incl. references)
Skills in repo
48
Repo updated
First seen
Licence
Apache-2.0

At a glance

TRUST 5 quality principles and how MoAI enforces them through agents, the 3-level harness, /moai gate, and sync-auditor scoring.

  • Quality gate checks
  • SKILL.md covers Quick Reference, The MoAI Quality Model, TRUST 5 Principles and Quality Gates and the 3-Level…, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Coverage targets

What it does

Moai Foundation Quality is an agent skill from modu-ai/moai-adk. TRUST 5 quality principles and how MoAI enforces them through agents, the 3-level harness, /moai gate, and sync-auditor scoring. Use for code review, quality gate checks, coverage targets, or TRUST 5 compliance.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `modules/best-practices.md`, `modules/integration-patterns.md` and `modules/proactive-analysis.md`). Compatibility notes: Designed for Claude Code

It sits in Testing & QA, covering Quality gates. The repository describes itself as: Agentic development harness for Claude Code — SPEC-driven plan/run/sync, TRUST 5 quality gates, model+effort routing, and Claude×GLM multi-LLM cost control. Single Go binary, 16… The licence is Apache-2.0.

When your agent uses it

  • Quality gate checks
  • Coverage targets
  • TRUST 5 compliance

Example prompts

  • “/moai-foundation-quality”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Grep, Glob

What it can do on your machine

Read from SKILL.md and the folder at commit 2aab5f7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Moai Foundation Quality loads about 2.9k tokens when it runs, and up to ~6.4k if it reads all its reference files. Until then it costs about 59 tokens; SKILL.md has 1,260 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from modu-ai/moai-adk at commit 2aab5f7, republished under its Apache-2.0 licence (© modu-ai). 1,260 words, ~2,887 tokens.

Download SKILL.mdSave it as .claude/skills/moai-foundation-quality/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
moai-foundation-quality
description
TRUST 5 quality principles and how MoAI enforces them through agents, the 3-level harness, /moai gate, and sync-auditor scoring. Use for code review, quality gate checks, coverage targets, or TRUST 5 compliance.
allowed-tools
Read, Grep, Glob
compatibility
Designed for Claude Code
when_to_use
Use for code-quality guidance: TRUST 5 principles (Tested, Readable, Unified, Secured, Trackable), the 3-level harness (minimal/standard/ thorough), /moai…
license
Apache-2.0
user-invocable
false
metadata.version
3.0.0
metadata.category
foundation
metadata.status
active
metadata.updated
2026-07-10
metadata.modularized
true
metadata.tags
foundation, quality, testing, validation, trust-5, best-practices, code-review
metadata.aliases
moai-foundation-quality

TRUST 5 Quality Principles and Enforcement

This skill provides background knowledge on MoAI's quality model: the five TRUST 5 principles, how agents enforce them, the 3-level harness, and the language-aware toolchains that /moai gate runs. MoAI does NOT ship a quality-validation library — quality is enforced through agents (manager-develop, sync-auditor), slash commands (/moai gate, /moai review), and the harness (minimal/standard/thorough).

Quick Reference

TRUST 5 Principles (Tested, Readable, Unified, Secured, Trackable) are quality dimensions, not code objects. Every code change is evaluated against all five.

Quality Mechanisms (the real enforcement layer):

  • /moai gate — runs lint + format + type-check + test in parallel as a pre-commit quality gate (<30s). Auto-detects the project language and runs the appropriate toolchain.
  • manager-develop (run-phase) — implements via cycle_type ∈ {tdd, ddd, autofix}; the chosen cycle shapes how tests and behavior are produced.
  • sync-auditor — independent skeptical quality assessment with 4-dimension scoring (Functionality, Security, Craft, Consistency), scored as the harmonic mean of dimensions, not the average.
  • 3-level harness — minimal (fast validation), standard (default checks), thorough (full sync-auditor + TRUST 5). Auto-determined by the Complexity Estimator based on SPEC scope.
  • LSP quality gates — phase-specific thresholds (run: zero errors/type-errors/ lint-errors; sync: zero errors, max 10 warnings, clean LSP).

The MoAI Quality Model

MoAI does not provide a Python SDK or any library for quality validation. Quality is enforced through the workflow, the agents, and the gate commands. This skill documents how those pieces fit together so a Claude invocation can reason about quality correctly.

How TRUST 5 is enforced per phase
PhaseQuality checkOwner
planCapture LSP baseline; identify quality risks in the planmanager-spec
runZero errors/type-errors/lint-errors; tests pass; coverage metmanager-develop (cycle_type shapes the approach)
syncLint clean (≤10 warnings); docs updated; TRUST 5 re-affirmedmanager-docs, then sync-auditor scores
auditIndependent 4-dimension scoring (Functionality/Security/Craft/Consistency)sync-auditor
cycle_type and quality (manager-develop)

The run-phase cycle_type selects how quality is built in:

  • tdd — Test-Driven Development (RED-GREEN-REFACTOR). Behavior is specified by a failing test first, then implemented. Best for new features.
  • ddd — Domain-Driven refactoring (ANALYZE-PRESERVE-IMPROVE). Behavior-preserving transformation of existing code. Best for refactoring and debt reduction.
  • autofix — diagnostic-driven fixing (LSP / lint / type errors). Best for /moai fix and regression recovery.

See Skill("moai-workflow-tdd"), Skill("moai-workflow-ddd"), and Skill("moai-workflow-loop") for the per-cycle mechanics.

TRUST 5 Principles

TRUST 5 is a mnemonic for five quality dimensions. Treat each as a question to ask of any change, not a score to compute.

  • T — Tested: Does the change have tests? Are they green? Is coverage at or above the project threshold (85%+ by default)? For existing untested code, are characterization tests capturing current behavior?
  • R — Readable: Is naming clear? Are comments in English (or the configured code-comments language)? Could a new contributor follow the logic without a walkthrough?
  • U — Unified: Does the change match the file's existing conventions (naming, error handling, imports)? Is it formatted with the project's formatter? Consistency within a file beats personal preference.
  • S — Secured: Are all external inputs validated? Does it follow OWASP guidance for web security? Are credentials kept out of version control (environment variables instead)? See moai-ref-owasp-checklist.
  • T — Trackable: Does the commit follow Conventional Commits? Does it reference the SPEC / issue it implements? Can the change be traced back to a requirement?

For the per-principle assessment checklist and the "not applicable" guard, see TRUST 5 Principles.

Quality Gates and the 3-Level Harness

The harness level controls how deep quality validation goes. It is auto-determined by the Complexity Estimator based on SPEC scope.

LevelWhat runsWhen
minimalFast validation only (lint + type + test)Small SPECs, low risk
standardDefault checks (lint + type + test + format)Most SPECs
thoroughFull sync-auditor + 4-dimension TRUST 5 scoringLarge SPECs, high risk

/moai gate is the lightweight pre-commit entry point: it runs lint + format + type-check + test in parallel and applies no fixes. It is the fastest way to get a quality signal. For deeper review use /moai review.

Language-Aware Toolchains

The quality gate auto-detects the project language and runs the appropriate toolchain. Tools that are not installed are skipped gracefully; projects with no recognized language marker pass the gate silently. This skill is language-neutral — the 16 supported languages are treated equally.

LanguageLintFormatTest
Gogo vet → golangci-lintgofmtgo test
Pythonruffblackpytest
TypeScript / JavaScripteslintprettierjest / mocha
Rustcargo clippyrustfmtcargo test
Java / Kotlin(per project linter)(per project)junit
Rubyrubocoprubocoprspec
PHPphpstan / phpcsphp-cs-fixerpest / phpunit
...(16 languages supported; auto-detected)

For the full toolchain mapping and how /moai gate detects the language, see Language-Aware Toolchains.

Show full SKILL.md (528 more words)Show less

Module Reference

Each module is loaded on demand. Load the one relevant to the current task.

  • TRUST 5 Principles — the five dimensions as assessment questions, per-principle checklists, and the "not applicable" guard.
  • Proactive Analysis — how /moai gate, /moai review, and /moai loop surface quality issues proactively, and how to triage findings.
  • Best Practices — using WebSearch / WebFetch for up-to-date framework/library best practices, and validating against them.
  • Integration Patterns — how quality fits into the SPEC workflow phases (plan/run/sync) and the harness levels.

Reference Files

  • examples.md — worked TRUST 5 assessment examples and gate/review triage walkthroughs. Load when applying TRUST 5 to a concrete change.
  • reference.md — the quality-mechanism reference: harness level detail, language toolchain table, agent roles, and the sync-auditor scoring model. Load when you need the authoritative mapping.

Works Well With

Agents (see .moai/config/sections/delegation.yaml for the 13-agent catalog):

  • manager-develop — run-phase implementation; owns the Tested and Unified principles through cycle_type.
  • sync-auditor — independent 4-dimension quality scoring (Functionality / Security / Craft / Consistency).
  • Explore (Anthropic built-in) — read-only codebase exploration before assessing quality.

Skills:

  • moai-foundation-core — TRUST 5 framework cross-reference and SPEC workflow foundations.
  • moai-ref-testing-pyramid — test-pyramid strategy, coverage targets, and test patterns.
  • moai-ref-owasp-checklist — OWASP Top 10 security checklist for the Secured principle.
  • moai-workflow-tdd / moai-workflow-ddd / moai-workflow-loop — the cycle_type workflows that manager-develop uses.

Commands:

  • /moai gate — pre-commit quality gate (lint + format + type + test).
  • /moai review — code review with security and MX-tag compliance.
  • /moai fix — auto-detect and fix LSP/lint/type errors.
  • /moai loop — iterative fix loop until resolved or max iterations.
<!-- moai:evolvable-start id="rationalizations" -->

Common Rationalizations

RationalizationReality
"The linter warnings are false positives"False positives should be suppressed with inline comments. Ignoring them trains the team to ignore real issues.
"Security scanning can wait until before release"Security vulnerabilities compound. Late discovery means expensive rework. Scan continuously.
"Coverage is high enough, the remaining 15% is edge cases"Edge cases are where production bugs live. The uncovered code is the riskiest code.
"Code review is subjective, automation is sufficient"Automation catches syntax and patterns. Reviews catch design flaws, naming confusion, and missing abstractions.
"TRUST 5 is too bureaucratic for a hotfix"Hotfixes without quality gates introduce the next hotfix. TRUST 5 on a hotfix is the minimum, not the maximum.

Chesterton's Fence: Before removing a quality check, understand why it was added. Removing a gate without understanding its history repeats the failure it was designed to prevent.

Shift Left: The earlier a defect is found, the cheaper it is to fix. Quality checks belong in the development loop, not at the end of it.

<!-- moai:evolvable-end -->
<!-- moai:evolvable-start id="red-flags" -->

Red Flags

  • Linter or type-checker warnings suppressed globally instead of per-line
  • OWASP checklist not consulted when handling user input or authentication
  • Coverage report not generated for a commit that adds new functionality
  • TRUST 5 dimension skipped with "not applicable" without justification
  • Quality report generated but no action taken on identified issues
<!-- moai:evolvable-end -->
<!-- moai:evolvable-start id="verification" -->

Verification

  • Linter runs clean or remaining warnings have inline suppression comments with reasons (show the command output)
  • OWASP checklist reviewed for security-relevant changes (show checklist references)
  • Coverage report generated and threshold met (show tool output)
  • All five TRUST 5 dimensions assessed (show assessment for each)
  • Quality findings triaged with a resolution plan for each
  • No global rule disabling in linter configuration
<!-- moai:evolvable-end -->

© modu-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in .claude/skills/moai-foundation-quality of modu-ai/moai-adk.

  • SKILL.md
  • modules/best-practices.md
  • modules/integration-patterns.md
  • modules/proactive-analysis.md
  • modules/trust5-validation.md
  • references/examples.md
  • references/reference.md

Open the folder on GitHubat commit 2aab5f7

Compare with similar skills

Moai Foundation Quality next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Moai Foundation Quality compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Moai Foundation Quality this skillmodu-ai/moai-adk1.2k—~2.9kAutomated safety check: PassApache-2.0
Test GuardamElnagdy/guard-skills1.3k2 repos~2.1kAutomated safety check: PassMIT
Triage Sonarqubenetdata/netdata81k—~2.8kAutomated safety check: NotesGPL-3.0
Sonarqube Analysishbmartin/graphviz2drawio275—~508Automated safety check: NotesGPL-3.0
Code SolvingHoangTheQuyen/think-better122—~3.7kAutomated safety check: PassMIT
Trellis Finish WorkOrtonY/smart-resume122—~1.3kAutomated safety check: PassApache-2.0

Similar skills

  • Test Guard

    amElnagdy/guard-skills

    Reviews newly written or edited tests against nine rules that cut test bloat, such as mock-heavy checks and near-duplicate cases, before they are committed.

    1.3k GitHub starsUsed in 2 repos~2.1k tokens
    Testing & QAAuto-check passed
  • Triage Sonarqube

    netdata/netdata

    Inspect, review, or apply authorized triage decisions to SonarCloud issues and security hotspots; also review the Sonar helpers.

    81k GitHub stars~2.8k tokensUpdated today
    Testing & QAAuto-check: notes
  • Sonarqube Analysis

    hbmartin/graphviz2drawio

    Inspect SonarQube Cloud/SonarCloud findings for this repository using local .env credentials.

    275 GitHub stars~508 tokensUpdated 2 mo ago
    Testing & QAAuto-check: notes
  • Code Solving

    HoangTheQuyen/think-better

    Structured coding workflow for non-trivial code work: debug, build features, refactor, optimize, migrate and review code through 7 steps with evidence-based quality gates.

    122 GitHub stars~3.7k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Trellis Finish Work

    OrtonY/smart-resume

    Wrap up the current session: verify quality gate passed, archive completed tasks, record session progress, push branch, and create PR.

    122 GitHub stars~1.3k tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Runs a pass, revise or block acceptance review on lo2cin4bt work, checking a deliverable against the request, repo contracts, tests, docs and the public GitHub boundary.

    289 GitHub stars~1.4k tokensUpdated 2 mo ago
    Testing & QAAuto-check passed

More from modu-ai/moai-adk

All 48 skills in this repo
  • Builds hand-editable SVG diagrams from computed layout coordinates, lints the source and renders a 2x PNG, with rules for when mermaid is the better choice.

    1.2k GitHub stars~5.2k tokensUpdated yesterday
    Auto-check: notes
  • MoAI Foundation Core

    modu-ai/moai-adk

    Reference for MoAI-ADK's core development principles: TRUST 5 quality gates, SPEC-first domain-driven workflow, agent delegation and token budgeting.

    1.2k GitHub stars~5k tokensUpdated yesterday
    Auto-check passed
  • MoAI SPEC Workflow

    modu-ai/moai-adk

    Manages SPEC documents for MoAI-ADK development, with GEARS or EARS requirement notation, acceptance criteria and a link into the Plan-Run-Sync workflow.

    1.2k GitHub stars~5.1k tokensUpdated yesterday
    Auto-check passed
  • MoAI TDD Workflow

    modu-ai/moai-adk

    Drives test-first development through the RED, GREEN, REFACTOR cycle, with a config switch that selects between TDD and a DDD workflow for existing code.

    1.2k GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • MoAI Worktree Management

    modu-ai/moai-adk

    Gives each SPEC its own Git worktree with a registry of active workspaces, base-branch sync and cleanup of merged ones, inside the MoAI-ADK workflow.

    1.2k GitHub stars~3.9k tokensUpdated yesterday
    Auto-check passed
  • Watches a pull request's CI checks after creation, separates required from auxiliary failures, applies limited safe fixes and escalates anything semantic to you.

    1.2k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check: notes

Questions about Moai Foundation Quality

What does Moai Foundation Quality do?

TRUST 5 quality principles and how MoAI enforces them through agents, the 3-level harness, /moai gate, and sync-auditor scoring. Moai Foundation Quality is an agent skill from modu-ai/moai-adk. TRUST 5 quality principles and how MoAI enforces them through agents, the 3-level harness, /moai gate, and sync-auditor scoring.

When should I use Moai Foundation Quality?

Moai Foundation Quality fits situations like: quality gate checks; coverage targets; TRUST 5 compliance.

How do I install Moai Foundation Quality in Claude Code?

Run `npx skills add modu-ai/moai-adk --skill moai-foundation-quality -a claude-code`. Or copy the skill folder (.claude/skills/moai-foundation-quality in modu-ai/moai-adk) into .claude/skills/moai-foundation-quality in your project. Claude Code loads it when a task matches its description.

How do I install Moai Foundation Quality in Codex?

Run `npx skills add modu-ai/moai-adk --skill moai-foundation-quality -a codex`. Or copy the skill folder (.claude/skills/moai-foundation-quality in modu-ai/moai-adk) into .agents/skills/moai-foundation-quality in your project. Codex loads it when a task matches its description.

Can I use Moai Foundation Quality in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add modu-ai/moai-adk --skill moai-foundation-quality -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/moai-foundation-quality, .gemini/skills/moai-foundation-quality, .github/skills/moai-foundation-quality and .opencode/skills/moai-foundation-quality in your project.

What does Moai Foundation Quality need to run?

SKILL.md names no scripts, command-line tools or credentials: Moai Foundation Quality is instructions for the agent only. Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Grep, Glob. Compatibility (from SKILL.md): Designed for Claude Code.

Does Moai Foundation Quality access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Moai Foundation Quality safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Moai Foundation Quality use?

Moai Foundation Quality is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Moai Foundation Quality use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.5k tokens, read only when the agent opens those files.

What are the alternatives to Moai Foundation Quality?

Skills that share tags, products or a category with Moai Foundation Quality: Test Guard (amElnagdy/guard-skills, 1.3k stars), Triage Sonarqube (netdata/netdata, 81k stars), Sonarqube Analysis (hbmartin/graphviz2drawio, 275 stars) and Code Solving (HoangTheQuyen/think-better, 122 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Moai Foundation Quality?

modu-ai (a GitHub organization) maintains it in modu-ai/moai-adk, which has 1,230 GitHub stars. The repository holds 48 skills in this directory. The repository was last updated on October 9, 2026.

Source: modu-ai/moai-adk on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.