# Export

> Generate Claude Agent SDK Python code scaffolding from a validated MECE decomposition. Use when user says "export to Agent SDK", "generate agent code", "create SDK scaffolding", or wants to turn a decomposition tree into runnable Python code.

- **Type:** Skill
- **Install:** `agentstack add skill-fblissjr-fb-claude-skills-export`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [fblissjr](https://agentstack.voostack.com/s/fblissjr)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [fblissjr](https://github.com/fblissjr)
- **Source:** https://github.com/fblissjr/fb-claude-skills/tree/main/apps/mece-decomposer/skills/export

## Install

```sh
agentstack add skill-fblissjr-fb-claude-skills-export
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# /export

Generate Claude Agent SDK Python code from a validated MECE decomposition tree.

## Usage

```
/export 
```

Examples:
- `/export` after a `/decompose` session (exports the last output)
- `/export output.json`
- `/export` then paste decomposition JSON

## Workflow

### 1. Verify Validation

The decomposition must pass validation first (overall score >= 0.70). If not validated, I'll run `/validate` first and show any issues.

### 2. Generate Code

Using the mapping rules from `references/agent_sdk_mapping.md`:
- One `Agent` definition per agent atom
- Orchestration functions per branch type (sequential, parallel, conditional, loop)
- Cross-branch dependency wiring
- Hook-based error handling from atom error modes
- Model tier assignments

### 3. Output

```python
"""
Agent SDK scaffolding for: [Decomposition Scope]
Dimension: [temporal/functional/etc.]
"""

import asyncio
from agents import Agent, Runner, function_tool

# Node 1.1.1: Step Name
step_name_agent = Agent(
    name="step-name",
    model="claude-sonnet-4-6",
    instructions="""...""",
    tools=[...],
)

# Orchestration
async def execute_phase_1(input_data: str) -> str:
    """Phase 1 (sequential orchestration)"""
    result = input_data
    result = await execute_step_1(result)
    result = await execute_step_2(result)
    return result

async def main(input_data: str) -> str:
    return await execute_root(input_data)

if __name__ == "__main__":
    result = asyncio.run(main("initial input"))
    print(result)
```

### Export Preview (when MCP server connected)

The `mece-export-sdk` MCP tool renders a preview panel with the generated code and a copy button.

## What You Get

- Agent definitions for every agent atom in the tree
- Orchestration functions matching the tree structure
- Comments linking each section to its tree node ID
- A `main()` entry point that executes the full tree
- TODO markers for human, tool, and external atoms that need implementation

## Next Steps

- "Can we refine the prompts for each agent?" -> edit the generated code
- "I need to adjust the decomposition first" -> `/decompose` or `/interview`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [fblissjr](https://github.com/fblissjr)
- **Source:** [fblissjr/fb-claude-skills](https://github.com/fblissjr/fb-claude-skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-fblissjr-fb-claude-skills-export
- Seller: https://agentstack.voostack.com/s/fblissjr
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
