---
name: marcetplace-strip
description: >
  Extract the most valuable architecture or design part from the user's
  project and make it sellable on MarCetPlace Bundles. Use when they say
  extract, strip, sell my best part, package this design system, or unlock
  value from this codebase. If several high-value unreplicable parts exist,
  suggest multiple and let the user choose. Refuse anything Claude can rebuild
  in one sitting.
---

# MarCetPlace — Extract & sell

You extract the **most valuable** architecture or design part(s) from THIS project and turn each chosen slice into a sellable drop-in bundle. Not the whole product. Not low-value chrome Claude can regenerate.

## Loop (keep it fast)

1. **Scan** the repo for what carries real value.
2. **Surface candidates.** If you find **2+** complex, high-value, unreplicable features / components / systems, list them all (ranked). Do not silently collapse to one.
3. **User picks** which part(s) to package now. They may choose one or several — publish separately, one part per bundle.
4. **Gate each pick:** if Claude could rebuild it from a prompt in one sitting → refuse that candidate.
5. **Package** only the chosen part + short install steps + verify/rollback + a price.
6. **Auth if needed** → `publish_bundle` → return the URL. If they approved multiple, repeat packaging/publish per part.

The job is: **extract value → make it valuable.**

## When to suggest multiple

Suggest a ranked shortlist (usually 2–5) when several candidates each look:

- complex / system-level (not a thin UI stub)
- high-value relative to the rest of the project
- hard for Claude to rebuild in one sitting
- separable into an atomic drop-in

Still refuse low-value or rebuildable slices. Never merge unrelated systems into one bloated bundle — one valuable part per publish.

## Hard refuse rules

Refuse a candidate when any of these are true:

- A fresh Claude session could recreate ~80% of the behavior from a brief
- The slice is low-value chrome, a whole app, a CRUD screen, or a thin library wrapper
- Files are tightly coupled to product-only secrets, private data, or dead weight
- You cannot name what you **stripped out** to isolate the valuable core

Only publish when `claude_rebuild_test` is `"fail"`.

## Candidate shortlist (show before tools when 2+ qualify)

```
EXTRACT CANDIDATES
1. <name> — <why most/high value> — kind: architecture|design — Claude rebuild: fail
2. <name> — <why valuable> — kind: … — Claude rebuild: fail
3. …
recommended_first: <name>
ask: which should I package now? (one or several, separate publishes)
```

## Extract report (per chosen part, before publish)

```
EXTRACT REPORT
most_valuable_because: <why this slice is worth packaging>
claim: <one sentence unreplicable capability>
kind: architecture | design
why Claude fails:
- …
- …
stripped_out:
- …
paths:
- …
price_usd: <number → price_credits 1:1>
```

## Auth

Write tools need the user’s own account:

1. handle + email they control
2. `start_login` → email OTP → `confirm_login`
3. Retry the write tool; pass `auth_token` when `session_bound` is false

Never invent handles. Keep secrets out of public fields.

## `publish_bundle` payload

Required:

| Field | Rule |
|-------|------|
| kind | `architecture` or `design` |
| title / summary / description | Public, no secrets; lead with why this part is valuable |
| price_credits | USD mapped 1:1 |
| payload.files | ≤40 files, ≤~200KB, only the valuable part |
| payload.steps | 2–8 concrete drop-in steps |
| payload.strip.claim | One sentence |
| payload.strip.why_unreplicable | 2–4 bullets |
| payload.strip.stripped_out | 1–5 exclusions |
| payload.strip.claude_rebuild_test | Must be `"fail"` |
| payload.integration_contract | frameworks + ≥1 verify_step + ≥1 rollback_step |

Optional: `tech`, `preview_url`, `preview_snippet`, `beta`.

Example strip block:

```json
{
  "claim": "Deterministic command-palette ranking that keeps recents, synonyms, and keyboard density coherent under large action sets.",
  "why_unreplicable": [
    "Edge-case ranking rules accumulated from production misuse patterns",
    "Keyboard density + synonym map tuned against real action inventories"
  ],
  "stripped_out": [
    "App-specific actions",
    "Auth and billing screens",
    "Marketing chrome"
  ],
  "claude_rebuild_test": "fail"
}
```

## RESUME (no secrets)

```
RESUME — MarCetPlace extract
candidates: […]
chosen: …
kind: architecture|design
most_valuable_because: …
claim: …
why_unreplicable: […]
stripped_out: […]
paths: […]
price_credits: …
remaining: assemble payload → publish_bundle (repeat per approved part)
```

## Failure recovery

| Symptom | Do |
|---------|----|
| AUTH_REQUIRED | OTP login → retry with auth_token if needed |
| claude_rebuild_test rejected | Drop that candidate; offer the next high-value one |
| payload too large / too many files | Extract more aggressively |
| validation on strip/contract | Fix the named field; keep the loop moving |
