agentleFS
TheunsBarnardtTheunsBarnardt/claude-fdl/.claude/skills/fdl-build-yaml/SKILL.md

fdl-build-yaml

Skill0 starsChanged 8 months agoMITView on GitHub

Export a portable YAML build pack from a natural language description — same discovery as fdl-build, but outputs YAML for use in any AI system

  • Reads credentials

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 1

    1. TheunsBarnardt/ai-fdl-kit★ 196% same

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository10 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 10 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Follow the EXACT same flow as /fdl-build for these phases:

    line 39
  2. Distinctive:

    If the user doesn't have a preference, default to Full file — it's the most reliable.

    line 72
  3. Distinctive:

    Read the FULL YAML content of every selected blueprint.

    line 84
  4. Very specific:

    Write the assembled YAML to: exports/build-pack-{description-slug}-{date}.yaml

    line 146
  5. Very specific:

    Create the exports/ directory if it doesn't exist.

    line 150
  6. Distinctive:

    After the YAML structure, append the generation prompt (see "Generation Prompt Template" section below) to the same file.

    line 154
  7. Distinctive:

    After writing the file, also output the full content in a fenced code block in chat so the user can copy-paste if they prefer.

    line 158
  8. Distinctive:

    Write each chunk to a separate file:

    line 250
  9. Distinctive:

    After generating the compact version, show the user the savings:

    line 361
  10. Distinctive:

    If the user's build pack is large AND they're targeting a small-context AI, offer the combination:

    line 377
  11. Distinctive:

    If selected, apply Phase 6C stripping first, then Phase 6B chunking on the compact output.

    line 384
  12. Very specific:

    Same discovery rigor: Don't shortcut Phases 1-5.

    line 538
  13. Distinctive:

    IP protection still applies: All vendor/company name rules from CLAUDE.md apply to the exported content.

    line 543
  14. Very specific:

    Always write to disk: Every export mode writes files to exports/.

    line 544
  15. Distinctive:

    Show size estimates: After export, always show line count and approximate token count so the user knows if it'll fit in their target AI's …

    line 545

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

FDL Build YAML — Portable AI Build Pack Exporter

Export a self-contained YAML build pack that ANY AI system (ChatGPT, Gemini, Copilot, etc.) can use to generate a complete application. This skill runs the same discovery, matching, disambiguation, and gap resolution as /fdl-build, but instead of generating code it produces a single portable document containing all selected blueprints, dependency order, stack choices, and generation instructions.

Why this exists: Claude Code with FDL skills can orchestrate a full build interactively. But other AI systems can't run FDL skills. This skill bridges that gap — it packages everything the AI needs into a single pasteable document.

Usage

/fdl-build-yaml "nextjs app with shadcn and mongoose, OTP login, full POS system"
/fdl-build-yaml "express API for expense approval workflow with email notifications"
/fdl-build-yaml "flutter mobile app with biometric login and product catalog"
/fdl-build-yaml "react app with supabase auth and drag-drop page builder"

Arguments

  • <app-description> — Same as /fdl-build. Plain-English description of the app including tech stack, features, and requirements.

Core Principles

  1. Same discovery flow as /fdl-build. Phases 1-5 are identical — parse intent, search blueprints, disambiguate overlaps, present the suggestion checklist, resolve gaps.
  2. Output is a portable YAML document, not generated code. The final output replaces Phase 6-7 of /fdl-build.
  3. The output must be self-contained. The person pasting it into another AI should NOT need access to this repo, the FDL schema, or any prior context.
  4. Include generation instructions. The YAML document includes a prompt section that tells the receiving AI how to use the blueprints to generate code.

Phases 1-5: Same as /fdl-build

Follow the EXACT same flow as /fdl-build for these phases:

  • Phase 1: Parse & Confirm Intent
  • Phase 2: Blueprint Search & Match (dynamic filesystem discovery)
  • Phase 3: Disambiguate Overlapping Blueprints
  • Phase 4: The Suggestion Checklist (grouped, selectable)
  • Phase 5: Resolve Gaps (create/extract/skip)

Refer to the /fdl-build skill for the full details of each phase. The interaction with the user is identical.


Phase 6: Choose Export Mode

Once the user has confirmed their final blueprint selection, ask how they want the export delivered. Different AI systems have different context limits.

Present export options

Use AskUserQuestion:

Your build pack has {N} blueprints. How would you like the export?

1. Full file (save to disk) — Best option. Writes a .yaml file you can upload or attach to any AI chat.
2. Chunked (one feature at a time) — For AI systems with small context windows. I'll give you a setup prompt first, then one blueprint per message you can feed in sequence.
3. Compact (rules + outcomes only) — Stripped-down version (~60% smaller). Removes descriptions, examples, and comments. Keeps only what's needed to generate code.

Options:

  • "Full file" → Phase 6A
  • "Chunked" → Phase 6B
  • "Compact" → Phase 6C

If the user doesn't have a preference, default to Full file — it's the most reliable.


Phase 6A: Full File Export

Step 1: Build dependency order

Same as /fdl-build Phase 6 Step 1 — read related arrays, build dependency graph, topologically sort.

Step 2: Assemble the build pack

Read the FULL YAML content of every selected blueprint. Assemble into a single document with this structure:

# ============================================================
# FDL BUILD PACK
# Generated by Feature Definition Language (FDL)
# https://theunsbarnardt.github.io/claude-fdl/
#
# This is a portable build specification. Upload or paste it
# into any AI assistant (ChatGPT, Gemini, Copilot, etc.)
# along with the GENERATION PROMPT at the bottom.
# ============================================================

build_pack:
  version: "1.0"
  generated: "YYYY-MM-DD"
  description: "<user's original description>"

  stack:
    framework: "<detected framework>"
    ui_library: "<detected UI lib or null>"
    database: "<detected DB/ORM or null>"
    language: "<primary language>"

  generation_order:
    - feature: "<category/feature>"
      depends_on: []
    - feature: "<category/feature>"
      depends_on: ["<dependency>"]
    # ... in topological order

  # --------------------------------------------------------
  # BLUEPRINTS
  # Each blueprint is a complete feature specification.
  # --------------------------------------------------------

  blueprints:
    - # --- FULL YAML content of blueprint 1 ---
      feature: "..."
      version: "..."
      # ... entire blueprint pasted inline

    - # --- FULL YAML content of blueprint 2 ---
      feature: "..."
      version: "..."
      # ... entire blueprint pasted inline

    # ... one entry per selected blueprint, in dependency order

  # --------------------------------------------------------
  # GAPS (features with no blueprint — need custom design)
  # --------------------------------------------------------
  gaps: []
  # or:
  # gaps:
  #   - name: "feature-name"
  #     description: "What this feature should do"
  #     notes: "Any context from the user"

Step 3: Write file to disk

Write the assembled YAML to: exports/build-pack-{description-slug}-{date}.yaml

Example: exports/build-pack-nextjs-pos-otp-2026-04-02.yaml

Create the exports/ directory if it doesn't exist. Also add exports/ to .gitignore if not already there (build packs may contain full blueprint content and shouldn't be committed).

Step 4: Append the GENERATION PROMPT

After the YAML structure, append the generation prompt (see "Generation Prompt Template" section below) to the same file.

Step 5: Also output to chat

After writing the file, also output the full content in a fenced code block in chat so the user can copy-paste if they prefer.


Phase 6B: Chunked Export (for small context windows)

For AI systems with limited context (ChatGPT free tier ~8K tokens, older models, etc.), split the build pack into digestible pieces the user feeds one at a time.

Step 1: Build dependency order

Same topological sort.

Step 2: Generate the SETUP chunk (Chunk 0)

This is the first thing the user pastes. It contains:

  • The stack definition
  • The generation order (feature list + dependencies)
  • The generation prompt (how to interpret blueprints)
  • A "handshake" instruction telling the AI to wait for blueprints
# ============================================================
# FDL BUILD PACK — SETUP (Chunk 0 of {N})
# Paste this FIRST, then paste each feature chunk one by one.
# ============================================================

build_pack:
  version: "1.0"
  generated: "YYYY-MM-DD"
  description: "<description>"
  total_chunks: {N}

  stack:
    framework: "<framework>"
    ui_library: "<ui_lib>"
    database: "<db>"
    language: "<lang>"

  generation_order:
    - feature: "<category/feature>"
      depends_on: []
    # ... full order

  gaps:
    - name: "..."
      description: "..."

Followed by the generation prompt (see template below), plus:

### CHUNKED MODE INSTRUCTIONS

This build pack is split into {N} chunks because of context size limits.

1. I've given you the setup (stack, order, and instructions) above
2. I will now paste each feature blueprint one at a time
3. After each blueprint, acknowledge it with: "Got [feature-name]. Ready for next."
4. After ALL blueprints are pasted, I'll say "ALL BLUEPRINTS LOADED"
5. THEN generate the full application following the generation_order above
6. Generate shared infrastructure first, then each feature in order

Do NOT start generating code until I say "ALL BLUEPRINTS LOADED".
Reply "Ready for Chunk 1" to begin.

Step 3: Generate per-feature chunks (Chunk 1..N)

Each chunk contains ONE blueprint's full YAML, wrapped with a header:

# ============================================================
# CHUNK {i} of {N}: {category}/{feature}
# ============================================================

feature: "..."
version: "..."
# ... full blueprint YAML

Step 4: Generate the FINAL trigger message

The last thing the user pastes:

ALL BLUEPRINTS LOADED — {N} features total.

Generate the complete application now. Follow the generation_order from the setup chunk. Start with shared infrastructure, then generate each feature in dependency order.

Step 5: Write all chunks to disk AND present in chat

Write each chunk to a separate file:

  • exports/chunks/{slug}/chunk-0-setup.md
  • exports/chunks/{slug}/chunk-1-{feature}.yaml
  • exports/chunks/{slug}/chunk-2-{feature}.yaml
  • ...
  • exports/chunks/{slug}/chunk-final-trigger.md

Also present Chunk 0 (setup) in chat immediately. Then tell the user:

CHUNKED EXPORT READY — {N+1} chunks total

Files saved to: exports/chunks/{slug}/

FEEDING ORDER:
  1. Paste chunk-0-setup.md (already shown above)
  2. Wait for AI to say "Ready for Chunk 1"
  3. Paste chunk-1-{feature}.yaml
  4. Wait for acknowledgment
  5. ... repeat for each chunk ...
  6. Paste chunk-final-trigger.md
  7. AI generates the full app

Each chunk is small enough for AI systems with limited context.
Average chunk size: ~{avg_size} lines

Phase 6C: Compact Export (stripped-down, ~60% smaller)

For maximum portability across context-limited systems. Strips out everything that isn't essential for code generation.

What gets KEPT:

  • feature, version, category
  • fields (name, type, required, validation only — no descriptions)
  • rules (full — these are non-negotiable)
  • outcomes (full — these ARE the code spec)
  • errors (code + message only)
  • events (name + payload only)
  • states (if present — state machines are critical)
  • related (feature + type only — no reason text)

What gets REMOVED:

  • description (on both blueprint and field level)
  • tags
  • flows (outcomes are sufficient for code generation)
  • actors (informational only)
  • sla (operational, not code)
  • ui_hints (nice-to-have, not essential)
  • extensions (metadata)
  • All YAML comments
  • related[].reason (the generation order already encodes this)
  • Field-level description and example values

Compact blueprint format

# Compact blueprint — fields stripped for size
feature: login
version: "1.0"
category: auth

fields:
  - name: email
    type: email
    required: true
    validation: {pattern: "^[^@]+@[^@]+$"}
  - name: password
    type: password
    required: true
    validation: {min_length: 8}

rules:
  - "Constant-time password comparison"
  - "Generic error message for invalid credentials"
  - "Lock account after 5 failed attempts"

outcomes:
  rate_limited:
    priority: 1
    given: ["5+ requests from same IP in 60 seconds"]
    then: ["reject request"]
    result: {status: 429, message: "Too many attempts"}
    error: LOGIN_RATE_LIMITED
  # ... all outcomes preserved in full

errors:
  - {code: LOGIN_RATE_LIMITED, message: "Too many login attempts", status: 429}
  - {code: LOGIN_INVALID_CREDENTIALS, message: "Invalid email or password", status: 401}

events:
  - {name: login.success, payload: [user_id, timestamp]}
  - {name: login.failed, payload: [email, reason, timestamp]}

related:
  - {feature: signup, type: required}
  - {feature: password-reset, type: recommended}

Compact export steps

  1. Build dependency order (same)
  2. For each selected blueprint, read the full YAML and strip it down to compact format
  3. Assemble into the same build pack structure as Phase 6A
  4. Append the generation prompt
  5. Write to: exports/build-pack-{slug}-compact-{date}.yaml
  6. Also output in chat

Size comparison note

After generating the compact version, show the user the savings:

COMPACT BUILD PACK:
  Full size:    ~{full_lines} lines / ~{full_tokens} tokens
  Compact size: ~{compact_lines} lines / ~{compact_tokens} tokens
  Savings:      ~{percent}% smaller

Stripped: descriptions, tags, flows, actors, SLA, UI hints, comments
Kept:     fields, rules, outcomes, errors, events, states (everything needed for code generation)

Combining Modes: Compact + Chunked

If the user's build pack is large AND they're targeting a small-context AI, offer the combination:

This is a large build pack ({N} blueprints). For small-context AI systems, I can do:
- Compact + Chunked — smallest possible chunks, stripped to essentials

If selected, apply Phase 6C stripping first, then Phase 6B chunking on the compact output.


Generation Prompt Template

This prompt is included in ALL export modes (full, chunked setup, compact). It teaches the receiving AI how to interpret blueprints.

# GENERATION PROMPT

You are building a **{description}** using **{framework}** with **{database}** and **{ui_library}**.

The build pack above contains feature blueprints in YAML format. Each blueprint defines:
- **feature** — the feature name
- **fields** — data model (field names, types, validation rules)
- **rules** — business rules and constraints (MUST be followed exactly)
- **outcomes** — acceptance criteria in given/then/result format (each outcome = a code path you must implement)
- **errors** — error codes and user-facing messages
- **events** — domain events emitted by the feature
- **related** — dependencies on other features in this pack

## How to generate code from this pack

1. **Follow the `generation_order`** — generate features in the listed order so dependencies exist before dependents.

2. **Shared infrastructure first:**
   - Database connection module (single file, shared by all features)
   - Auth middleware (if any auth features are present)
   - Shared types file (User, Session, ApiResponse, etc.)
   - Base layout with providers (if frontend)
   - `.env.example` with all required environment variables
   - `package.json` with all dependencies

3. **For each blueprint, generate code that satisfies ALL outcomes:**
   - Read outcomes sorted by `priority` (lower number = check first)
   - Each outcome's `given` conditions = the IF check
   - Each outcome's `then` actions = what happens
   - Each outcome's `result` = the response/return value
   - If an outcome has `error:`, bind it to the matching error code in `errors[]`
   - If an outcome has `transaction: true`, wrap all `then` actions atomically

4. **Rules are non-negotiable:**
   - If a rule says `constant_time: true`, use bcrypt.compare (not ===)
   - If a rule says `generic_message: true`, return identical error messages for different failure cases
   - Blueprint values are authoritative (if it says `max_attempts: 5`, use 5)

5. **Import, don't duplicate:**
   - If a previous feature created a User model, import it — don't recreate
   - Use consistent patterns across ALL features (same validation lib, error format, etc.)

6. **Handle gaps:**
   - Items listed under `gaps` have no blueprint — design and implement them based on the description provided
   - Follow the same patterns established by the blueprinted features

7. **Add trace comments:**
   - Every generated file should note which blueprint it implements:
     `// Feature: auth/login — Outcome: rate_limited (priority: 1)`

## Output structure for {framework}

{framework_structure_guidance}

Generate a complete, runnable project. The output should work after the standard install + run command for the framework.

Include ALL files: routes, components, models, middleware, config, types, and integration glue.

Framework structure guidance

Tailor the "Output structure" section based on the detected framework:

FrameworkStructure guidance
Next.js (App Router)src/app/ routes, server actions, src/components/, src/lib/
Express.jssrc/routes/, src/controllers/, src/models/, src/middleware/
Laravelapp/Http/Controllers/, app/Models/, routes/, resources/views/
Djangoapps/{feature}/models.py, views.py, urls.py, templates/
FastAPIapp/routers/, app/models/, app/schemas/, app/dependencies/
Flutterlib/screens/, lib/models/, lib/services/, lib/widgets/
React (Vite)src/pages/, src/components/, src/hooks/, src/api/
Vue/Nuxtpages/, components/, composables/, server/api/
SvelteKitsrc/routes/, src/lib/components/, src/lib/server/
Go (Gin)internal/handlers/, internal/models/, internal/middleware/
ASP.NETControllers/, Models/, Services/, Data/

Phase 7: Present the Export

For Full File (6A) and Compact (6C):

BUILD PACK EXPORTED

  File: exports/build-pack-{slug}-{date}.yaml
  Size: {lines} lines (~{tokens} tokens)
  Blueprints: {count}
  Gaps: {gap_count}

HOW TO USE:
  Option A — Upload the file as an attachment in ChatGPT/Gemini/etc.
  Option B — Copy from the code block above and paste into chat
  Then say: "Generate this application following the build pack and generation prompt"

{if compact, show size comparison}

For Chunked (6B):

CHUNKED BUILD PACK EXPORTED

  Folder: exports/chunks/{slug}/
  Chunks: {N+1} files (setup + {N} features + trigger)
  Avg chunk: ~{avg_lines} lines

FEEDING ORDER:
  1. Paste chunk-0-setup.md → AI says "Ready for Chunk 1"
  2. Paste chunk-1-{feature}.yaml → AI acknowledges
  3. ... repeat ...
  {N+1}. Paste chunk-final-trigger.md → AI generates everything

Always end with:

TIPS:
- Upload as a file attachment when possible — avoids copy-paste issues with large packs
- If using chunked mode, wait for the AI to acknowledge each chunk before pasting the next
- The generation_order ensures features are built in the right dependency sequence
- Rules in each blueprint are non-negotiable — they encode security and business logic
- You can edit the .yaml file before uploading to add/remove features

Key Differences from /fdl-build

Aspect/fdl-build/fdl-build-yaml
Phases 1-5Interactive discoverySame — identical flow
Phase 6Generate code directlyExport YAML build pack (3 modes)
Phase 7File manifest + next stepsFile path + usage instructions
OutputWorking code filesPortable YAML file(s)
TargetThis Claude Code sessionAny AI system
Needs FDL repoYes (reads blueprints)No (blueprints are inline)
Context sizeN/A (runs locally)Adapts: full / chunked / compact

Non-Negotiable Rules

  1. Blueprint content integrity. In Full mode, include the COMPLETE YAML. In Compact mode, strip only non-essential fields — never remove rules, outcomes, or errors.
  2. Same discovery rigor. Don't shortcut Phases 1-5. The user gets the same guided experience as /fdl-build.
  3. Self-contained output. Someone with zero FDL knowledge should be able to paste/upload the output and get working code from another AI.
  4. Always include the generation prompt. The YAML alone isn't enough — the prompt tells the AI HOW to use it. In chunked mode, it goes in Chunk 0.
  5. Respect dependency order. The generation_order must reflect the topological sort. In chunked mode, chunks are numbered in dependency order.
  6. Never show raw YAML during Phases 1-5. Same rule as /fdl-build — the interactive phases are plain English. YAML only appears in the final export.
  7. IP protection still applies. All vendor/company name rules from CLAUDE.md apply to the exported content.
  8. Always write to disk. Every export mode writes files to exports/. Chat output is a convenience copy — the file is the primary deliverable.
  9. Show size estimates. After export, always show line count and approximate token count so the user knows if it'll fit in their target AI's context.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.