mellea-skills-compiler: Command for Claude Code

.claude/commands/mellea-fy.md

mellea-fy is a command for Claude Code from generative-computing/mellea-skills-compiler. It costs 0 tokens per session (3,597 once invoked), scanned A, original, Apache-2.0.

A workflow that turns an agent specification written in Markdown into an executable Python package using the Mellea programming library.

In plain words
What is it for?
It helps convert one or more agent specification files into Python code, create intermediate reports, and document how the source specification maps to the generated package.
Why use it?
It checks the source files, dependencies, and API references, then applies formal checks and repairs so the generated package matches the written specification more closely.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

This is generative-computing/mellea-skills-compiler's own configuration. It tells Claude Code how to work on mellea-skills-compiler itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mellea-skills-compiler configures →

Reuse

Borrowing it

Nothing to install: this file belongs to generative-computing/mellea-skills-compiler. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/generative-computing/mellea-skills-compiler/main/.claude/commands/mellea-fy.md
Clone the repo
git clone --depth 1 https://github.com/generative-computing/mellea-skills-compiler

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 mellea-fy

README.md
[![agentmods](https://agentmods.dev/badge/commands/generative-computing/mellea-skills-compiler/mellea-fy.svg)](https://agentmods.dev/commands/generative-computing/mellea-skills-compiler/mellea-fy)
Your own site
<a href="https://agentmods.dev/commands/generative-computing/mellea-skills-compiler/mellea-fy"><img src="https://agentmods.dev/badge/commands/generative-computing/mellea-skills-compiler/mellea-fy.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,597 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.
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.00000 $0.03597
Opus 5 $0.00000 $0.01799
Sonnet 5 $0.00000 $0.00719
Haiku 4.5 $0.00000 $0.00360

Measured 8d ago against content hash 865944fa18d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

mellea-fy 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 8d 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/commands/mellea-fy.md · 224 lines

How it starts

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

Melleafy: Decompose an Agent Spec into Mellea Code

Spec version: 4.3.2 (2026-04-28) — 10-step workflow with source-runtime detection, dependency audit, API reference grounding, and 14 formal lints with repair loop.

You are a Mellea decomposition specialist. Given a path to an agent .md file, produce an executable Python package using the Mellea generative programming library. This orchestrator file describes the overall workflow; step-specific guidance lives in the sub-commands listed below.

Your input: $ARGUMENTS — path to an agent .md file (or workspace directory for multi-file source runtimes). Your output: A generated Python package plus intermediate artifacts and a mapping report.


The 10-step workflow

Run these steps in order. Each step has a dedicated sub-command with the full specification.

[source spec on disk]
    │
    ▼
 Step 0: Classify the spec along five axes
    │   → classification.json
    │   Sub-command: /mellea-fy-classify
    ▼
 Steps 1a + 1b: Inventory files → tag elements + assign C1-C9 categories
    │   Step 1b Pass 1 (multi-file): [per-file section discovery — ║ parallel ║]
    │   → inventory.json
    │   Sub-command: /mellea-fy-inventory
    ▼
 Step 2: Map elements to Mellea primitives
    │   Judgment calls: [all independent elements — ║ parallel ║]
    │   → element_mapping.json (TOOL_TEMPLATE entries provisional)
    │   Sub-command: /mellea-fy-map
    ▼
 Step 2.5: Dependency audit + elicitation → commit dispositions + API reference
    │   → dependency_plan.json, element_mapping_amendments.json, mellea_api_ref.json
    │   Sub-command: /mellea-fy-deps   ← NEW in v4.0 — do not skip
    ▼
 Step 3: Emit skeleton files
    │   → empty Python files with structure (run_pipeline signature locked here)
    │
 Step 4: Generate fixtures
    │   → fixtures/ subpackage (5-8 fixtures, ≥3 C-categories)
    │   Sub-command: /mellea-fy-fixtures
    │   (uses Step 3 skeleton's run_pipeline signature as grounding source)
    ▼
 Step 5: Generate per-element code bodies (3-phase structure)
    │   Phase A: [schemas.py, config.py, requirements.py, slots.py, tools.py/constrained_slots.py, mobjects.py, loader.py — ║ parallel ║]
    │   Phase B: pipeline.py (after Phase A)
    │   Phase C: main.py (after Phase B)
    │   → populated Python files (fixtures/ available as grounding context)
    │   Sub-command: /mellea-fy-generate  (covers Steps 3 + 5)
    ▼
 Step 6: Emit supporting artifacts
    │   Narrative batching: [classification_narrative + deferred_feature_entry + judgment_call_explanation (≤3) — ║ parallel ║ where applicable]
    │   → mapping_report.md, melleafy.json, SETUP.md, README.md
    │   → SKILL.md (non-.md sources only — CLI compatibility shim, WIP)
    │   Sub-command: /mellea-fy-artifacts
    ▼
 Step 7: Static validation (14 formal lints)
    │   Tier 1: [all .py files — ast.parse() ║ parallel ║, then import check]
    │   Tier 2: [all 13 lints — ║ parallel ║]
    │   → step_7_report.json
    │   Sub-command: /mellea-fy-validate
    │
    ├── [PASS] ──────────────────────────────────────────────────────────────►
    │                                                                          ▼
    └── [FAIL — Tier 1 or structural Tier 2, repair_round < 2]        [generated package on disk]
              │
              ▼
         Re-invoke /mellea-fy-generate (repair mode, failing files only)
              │   → re-run Step 7, increment repair_round
              │
              └── [FAIL — repair_round = 2, OR session-boundary / category-specific]
                       → halt, preserve .melleafy-partial/

Read the full file on GitHub · 224 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. 8d ago First seen · 224 lines · 0 tokens per session scan A 865944fa18d7

Subscribe to this mod's changes

mellea-fy is a command published in the GitHub repository generative-computing/mellea-skills-compiler (48 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,597 tokens. 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.