Agent skill

MoAI Harness Learning Coordinator

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

Fetches harness learning proposals from the moai CLI, hands them to the orchestrator for approval and applies, rejects or rolls back the resulting changes.

Apache-2.0Auto-check: notesAgent Workflows

Install MoAI Harness Learning Coordinator

skills CLI
$ npx skills add modu-ai/moai-adk --skill moai-harness-learner -a claude-code

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

GitHub CLI
$ gh skill install modu-ai/moai-adk moai-harness-learner --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-harness-learner .claude/skills/moai-harness-learner && 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-harness-learner
GitHub stars
1.2k
Token cost
~1.9k tokens
SKILL.md length
699 words
Files
1
Skills in repo
48
Repo updated
First seen
Licence
Apache-2.0

At a glance

Fetches harness learning proposals from the moai CLI, hands them to the orchestrator for approval and applies, rejects or rolls back the resulting changes.

  • Works in 5 steps: Status Check → Fetch Proposal Payload → Produce structured payload for… → …
  • Harness learning proposals are waiting for review
  • SKILL.md covers Quick Reference, Implementation Guide, Works Well With and Safety Architecture Reference
  • Calls git

What it does

This skill coordinates MoAI's harness learning subsystem. It sits between the `moai harness` command line and the orchestrator's approval question: the CLI never prompts you itself, so the skill fetches a proposal payload and hands it to the orchestrator, which asks you to approve or reject. It keeps the four-tier ladder of the earlier harness-learning policy and focuses on tier 4 auto-update proposals.

The workflow is to run `moai harness status`, which reports whether learning is enabled, the tier distribution (observation, heuristic, rule, auto update), the rate-limit window and the pending proposal count, then `moai harness apply` to load the next proposal as JSON. The payload carries an ID, the target file, whether the `description` or `triggers` field changes, the new value, the pattern that triggered it and how often it was observed. On approval the skill writes the approval to the proposals directory and signals the CLI to proceed; on rejection it deletes the proposal file and changes nothing.

The same command line restores a snapshot by date with `moai harness rollback` and turns learning off with `moai harness disable`. The skill is allowed to use Bash, Read, Write and Edit.

When your agent uses it

  • Harness learning proposals are waiting for review
  • Checking the tier distribution and pending proposals of the learning subsystem
  • Rolling back a harness auto-update to an earlier snapshot
  • Turning harness learning off for a project

Example prompts

  • “Check the harness learning status and tell me how many proposals are pending.”
  • “Load the next harness proposal and show me what it would change before I decide.”
  • “Roll the harness back to yesterday's snapshot.”

Requirements

  • The `moai` CLI
  • A MoAI project with harness learning enabled
  • Pre-approved tools (allowed-tools): Bash, Read, Write, Edit

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Status Check
  2. Fetch Proposal Payload
  3. Produce structured payload for orchestrator consumption
  4. On Approve
  5. On Reject

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:

    • Bash
    • Read
    • Write
    • Edit

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

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

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    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.

Context cost

MoAI Harness Learning Coordinator loads about 1.9k tokens when it runs. Until then it costs about 78 tokens; SKILL.md has 699 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~78
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Write, Edit

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). 699 words, ~1,910 tokens.

Download SKILL.mdSave it as .claude/skills/moai-harness-learner/SKILL.md (or your agent's skills folder).
name
moai-harness-learner
description
Harness learning subsystem coordinator. Produces Tier 4 auto-update proposal payloads consumed by the orchestrator (which surfaces them via AskUserQuestion) and orchestrates Apply/Rollback flows. Triggers when harness learning proposals are pending or learning lifecycle management is needed.
allowed-tools
Bash, Read, Write, Edit
when_to_use
Use for harness learning lifecycle management: producing Tier 4 auto-update proposal payloads for the orchestrator (surfaced via AskUserQuestion), and…
user-invocable
false

moai-harness-learner

<!-- @MX:NOTE: [AUTO] this skill body is preserved unchanged per the harness foundation policy §10 exclusion #10 (text annotation only, no behavioral change). The 4-tier observation/heuristic/rule/auto_update ladder defined here is preserved verbatim. The orchestrator-only AskUserQuestion contract is asserted by the harness foundation policy (cross-reference: .claude/rules/moai/core/agent-common-protocol.md § User Interaction Boundary). The downstream replacement of the frequency-count classifier with an embedding-cluster algorithm is deferred to the harness classifier-upgrade policy. -->

Coordinator skill for the Harness Learning Subsystem. The harness foundation policy is the active contract; the 4-tier ladder from the earlier harness-learning policy is preserved unchanged. Produces Tier 4 auto-update proposal payloads consumed by the MoAI orchestrator; the orchestrator surfaces them to the user via AskUserQuestion and orchestrates Apply/Rollback flows. Canonical contract: .claude/rules/moai/core/askuser-protocol.md § Orchestrator-Subagent Boundary.

Quick Reference

Role: Orchestrator-side bridge between CLI (moai harness) and AskUserQuestion.

Key constraint [HARD]: moai harness apply returns a JSON payload representing a Tier 4 auto-update proposal. This skill produces the payload; the orchestrator surfaces it via AskUserQuestion. The CLI itself does NOT prompt the user. Canonical contract: .claude/rules/moai/core/askuser-protocol.md § Orchestrator-Subagent Boundary.

Common triggers:

  • moai harness status — check tier distribution and pending proposals
  • moai harness apply — load next pending proposal (returns JSON payload)
  • moai harness rollback <date> — restore snapshot
  • moai harness disable — set learning.enabled: false

Workflow:

  1. Run moai harness status to inspect state.
  2. Run moai harness apply to get the proposal payload.
  3. Hand payload to the orchestrator for AskUserQuestion surfacing (approve / reject).
  4. On approve: write approval to proposals dir and signal CLI to proceed.
  5. On reject: remove proposal file (no changes applied).

Implementation Guide

Step 1: Status Check
bash
moai harness status --project-root <project_root>

Output includes:

  • enabled state
  • Tier distribution (observation / heuristic / rule / auto_update)
  • Rate limit window status
  • Number of pending proposals
Step 2: Fetch Proposal Payload
bash
moai harness apply --project-root <project_root>

The command outputs a JSON block with:

  • id — proposal identifier
  • target_path — file to be modified
  • field_key — description or triggers
  • new_value — proposed new content
  • pattern_key — what triggered this proposal
  • observation_count — how many times this pattern was observed
Step 3: Produce structured payload for orchestrator consumption

[HARD] This skill produces a structured payload representing the Tier 4 auto-update proposal; the MoAI orchestrator surfaces it via AskUserQuestion. Canonical contract: .claude/rules/moai/core/askuser-protocol.md § Orchestrator-Subagent Boundary.

Payload schema:

  • proposal_id — proposal identifier
  • target_path — file to be modified
  • field_key — description or triggers
  • current_value — existing content (for diff context)
  • new_value — proposed new content
  • observation_count — pattern observation count
  • confidence — auto-update confidence score (0.0–1.0)
  • recommended_action — approve (default) | reject | inspect | defer

The skill emits this payload as its tool output. The orchestrator reads the payload, preloads AskUserQuestion via ToolSearch(query: "select:AskUserQuestion"), and surfaces the four-option decision (approve / reject / inspect / defer) to the user. On user approval, the orchestrator re-delegates to this skill with action=apply; on rejection, action=skip. The "(권장)" recommendation suffix and per-option descriptions are constructed by the orchestrator from the payload's recommended_action field per askuser-protocol.md § Socratic Interview Structure.

Show full SKILL.md (303 more words)Show less
Step 4: On Approve

Without --execute, moai harness apply only surfaces the payload. The write happens on the opt-in execute path (Applier.Apply()), gated by the 5-Layer Safety Pipeline, and --execute requires --id — the proposal it applies is named explicitly, never inferred from "the next pending one".

For the coordinator skill, the simplest flow is:

  1. User selects "approve"
  2. Write approved: true to .moai/harness/proposals/<id>.decision
  3. Run the execute path, naming the approved proposal id and the project root the write targets:
bash
moai harness apply --execute --id <proposal-id> --project-root <project_root>

--project-root defaults to the current directory. Pass it explicitly when the session is working inside a worktree — its value is that worktree's own git rev-parse --show-toplevel, so the write lands in the tree the proposal was raised against rather than in the primary checkout.

Step 5: On Reject
  1. Delete .moai/harness/proposals/<id>.json
  2. Confirm deletion to user.
Rollback Flow
bash
# List available snapshots
ls .moai/harness/learning-history/snapshots/

# Rollback to a specific snapshot
moai harness rollback 2026-04-27T00-00-00.000000000Z --project-root <project_root>
Disable Learning
bash
moai harness disable --project-root <project_root>

Sets learning.enabled: false in .moai/config/sections/harness.yaml. Comments and key ordering are preserved (YAML round-trip).


Works Well With

  • moai-meta-harness — generates the hns-* skills that are targets of auto-updates
  • moai-workflow-tdd — TDD cycle generates events that feed into the observer
  • moai-foundation-quality — quality gates run after auto-updates to validate correctness

Safety Architecture Reference

The 5-Layer Safety Pipeline (L1 Frozen Guard → L2 Canary Check → L3 Contradiction Detector → L4 Rate Limiter → L5 Human Oversight) protects every Tier 4 auto-update:

LayerGuardAction on violation
L1Frozen GuardBlock — FROZEN paths are never modified
L2Canary CheckBlock — if effectiveness drops >0.10
L3Contradiction DetectorBlock — if trigger conflicts arise
L4Rate LimiterBlock — max 3 per week, 24h cooldown
L5Human OversightOrchestrator surfaces user-approval via AskUserQuestion (this skill emits payload)

[HARD] L1 Frozen paths (never auto-modified at runtime):

  • ~/.claude/agents/** (template-managed agents; .claude/agents/harness/ is a user-owned allowed-write target, NOT frozen)
  • ~/.claude/skills/moai-*/**
  • .claude/rules/moai/**

Only user-area skills (.claude/skills/hns-*/, plus legacy .claude/skills/harness-*/ and .claude/skills/my-harness-*/ generations) and agents (.claude/agents/harness/) are valid auto-update targets.

© 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

Just SKILL.md in .claude/skills/moai-harness-learner of modu-ai/moai-adk.

Open the folder on GitHubat commit 2aab5f7

Compare with similar skills

MoAI Harness Learning Coordinator 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 Harness Learning Coordinator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
MoAI Harness Learning Coordinator this skillmodu-ai/moai-adk1.2k—~1.9kAutomated safety check: NotesApache-2.0
Darwin Skill Optimizeralchaincyf/darwin-skill6.2k1 repos~4.7kAutomated safety check: PassMIT
Show Me Your Work Decision Logcursor/plugins10k8 repos~1.6kAutomated safety check: PassNone
Using Agent Skillsaddyosmani/agent-skills103k4 repos~2.4kAutomated safety check: PassMIT
Ponytail Help CardDietrichGebert/ponytail159k—~726Automated safety check: PassMIT
Skill Creatorzhayujie/CowAgent47k—~4.7kAutomated safety check: NotesMIT

Similar skills

  • Darwin Skill Optimizer

    alchaincyf/darwin-skill

    Scores SKILL.md files on a nine-dimension rubric, then improves them in a keep-or-revert loop with independent judge agents, test prompts, git history and human checkpoints.

    6.2k GitHub starsUsed in 1 repo~4.7k tokens
    Agent WorkflowsAuto-check passed
  • Official

    Keeps a TSV decision log for long or unattended agent runs, one row per decision with what, why, evidence and result, so a reviewer can check the work later.

    10k GitHub starsUsed in 8 repos~1.6k tokens
    Agent WorkflowsAuto-check passed
  • Using Agent Skills

    addyosmani/agent-skills

    Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.

    103k GitHub starsUsed in 4 repos~2.4k tokens
    Agent WorkflowsAuto-check passed
  • Ponytail Help Card

    DietrichGebert/ponytail

    Shows a one-shot quick-reference card for the ponytail skills: intensity levels, the six commands, and how to turn it off, set a default mode and update.

    159k GitHub stars~726 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Skill Creator

    zhayujie/CowAgent

    Guides creating, installing and updating agent skills in a workspace: SKILL.md frontmatter, bundled scripts and references, with scripts to scaffold, validate and package.

    47k GitHub stars~4.7k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Task Observer

    rebelytics/one-skill-to-rule-them-all

    Monitors task execution for skill improvement opportunities.

    3.2k GitHub starsUsed in 1 repo~12k tokens
    Agent WorkflowsAuto-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 today
    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 today
    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 today
    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 today
    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 today
    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 today
    Auto-check: notes

Categories

Questions about MoAI Harness Learning Coordinator

What does MoAI Harness Learning Coordinator do?

Fetches harness learning proposals from the moai CLI, hands them to the orchestrator for approval and applies, rejects or rolls back the resulting changes. This skill coordinates MoAI's harness learning subsystem. It sits between the `moai harness` command line and the orchestrator's approval question: the CLI never prompts you itself, so the skill fetches a proposal payload and hands it to the orchestrator, which asks you to approve or reject.

When should I use MoAI Harness Learning Coordinator?

MoAI Harness Learning Coordinator fits situations like: harness learning proposals are waiting for review; checking the tier distribution and pending proposals of the learning subsystem; rolling back a harness auto-update to an earlier snapshot; turning harness learning off for a project.

How do I install MoAI Harness Learning Coordinator in Claude Code?

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

How do I install MoAI Harness Learning Coordinator in Codex?

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

Can I use MoAI Harness Learning Coordinator 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-harness-learner -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-harness-learner, .gemini/skills/moai-harness-learner, .github/skills/moai-harness-learner and .opencode/skills/moai-harness-learner in your project.

What does MoAI Harness Learning Coordinator need to run?

Going by SKILL.md and its folder, MoAI Harness Learning Coordinator needs the command-line tools its instructions call (git). Our summary lists: The `moai` CLI; A MoAI project with harness learning enabled. Its frontmatter pre-approves these tools: Bash, Read, Write, Edit.

Does MoAI Harness Learning Coordinator access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is MoAI Harness Learning Coordinator safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does MoAI Harness Learning Coordinator use?

MoAI Harness Learning Coordinator is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does MoAI Harness Learning Coordinator use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to MoAI Harness Learning Coordinator?

Skills that share tags, products or a category with MoAI Harness Learning Coordinator: Darwin Skill Optimizer (alchaincyf/darwin-skill, 6.2k stars), Show Me Your Work Decision Log (cursor/plugins, 10k stars), Using Agent Skills (addyosmani/agent-skills, 103k stars) and Ponytail Help Card (DietrichGebert/ponytail, 159k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains MoAI Harness Learning Coordinator?

modu-ai (a GitHub organization) maintains it in modu-ai/moai-adk, which has 1,232 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.