ml-setup

A setup command for the Meta-Loop workflow that creates its required project folders and starter files. It first checks that the command is being run from a Git project with the needed Meta-Loop files installed.

In plain words
What is it for?
Use it once when preparing a project for Meta-Loop, or run it again to add missing directories and starter files that are not already present.
Why use it?
It prepares a project without overwriting existing files and reports missing prerequisites before making changes. This avoids starting the workflow with an incomplete setup.

Command

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.

agentmods
npx agentmods add commands/jpavley/meta-loop-ios/ml-setup
Clone the repo
git clone --depth 1 https://github.com/jpavley/meta-loop-ios
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,612 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00012 $0.01612
Opus 5 $0.00006 $0.00806
Sonnet 5 $0.00002 $0.00322
Haiku 4.5 $0.00001 $0.00161

Measured 2d ago against content hash 589bcf732928, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ml-setup 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 2d 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.

commands/ml-setup.md · 236 lines

How it starts

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

Meta-Loop: Project Setup

Scaffold the directory structure and starter files needed for the meta-loop workflow.

Mode: Agent Mode (creates files and directories)

Prerequisites

This command prepares a project to use the Meta-Loop process defined in skills/meta-loop-methodology/SKILL.md.

Run this once after installing the meta-loop plugin. It is safe to re-run — existing files are never overwritten.


Phase 1: Check Prerequisites

  1. Verify git repo root:

    • Check that .git/ exists in the current directory
    • If not, stop and tell the developer to run from the project root
  2. Check for installed skills:

    • Check that .claude/skills/ exists and contains meta-loop skill directories
    • If missing, warn: "Meta-loop skills not found. Run install.sh first, then re-run /ml-setup."
  3. Check for installed commands:

    • Check that .claude/commands/ exists and contains ml-wireframe.md, ml-spec.md, ml-impl.md, ml-retain.md
    • If missing, warn: "Meta-loop commands not found. Run install.sh first, then re-run /ml-setup."

If any prerequisite fails, stop and print the warning. Do not continue to Phase 2.


Phase 2: Create Directory Structure

Create these directories if they don't already exist. Skip and note any that already exist.

  • specs/views/
  • supporting-docs/

Phase 3: Create Starter Files

Important: Never overwrite an existing file. If a file already exists, skip it and note that it was skipped in the summary.

3.1 CLAUDE.md

Only create if CLAUDE.md does not exist in the project root.

# [App Name]

[Brief description of what this app does.]

## Build Commands

| Command                                                                                                      | Action              |
| ------------------------------------------------------------------------------------------------------------ | ------------------- |
| `xcodebuild -scheme [Scheme] -sdk iphonesimulator build`                                                     | Build for simulator |
| `xcodebuild test -scheme [Scheme] -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16'` | Run tests           |

## Project Structure

[Describe your project's file organization here]


## Key Patterns

[Document project-specific patterns, conventions, and architectural decisions here.]

## Meta-Loop Commands

| Command         | Purpose                                     |
| --------------- | ------------------------------------------- |
| `/ml-setup`     | Scaffold project for meta-loop workflow     |
| `/ml-wireframe` | Review wireframe to verify AI understanding |
| `/ml-spec`      | Create specification from wireframe         |
| `/ml-impl`      | Implement from specification                |
| `/ml-retain`    | Capture learnings before clearing context   |

## Meta-Loop Skills

Reference docs are in `.claude/skills/`:
- `meta-loop-methodology/` — Process theory and user guide
- `wireframe-design/` — Wireframe creation tips
- `view-specifications/` — Spec writing guide and template
- `project-structure/` — Directory layout and file responsibilities

Read the full file on GitHub · 236 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. 2d ago First seen · 236 lines · 12 tokens per session scan A 589bcf732928

Subscribe to this mod's changes

ml-setup is a command published in the GitHub repository jpavley/meta-loop-ios (3 stars, last pushed 6mo ago), licensed MIT. It adds 12 tokens to every session and 1,612 once invoked, about $0.0001 per session on Opus 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-31.