Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

Close 8 completed monetization prompts (07–13)

nirholasd53051a23c23
diff --git a/prompts/monetization/12-sales-analytics-api.md b/prompts/monetization/12-sales-analytics-api.md
deleted file mode 100644
index 952c78799..000000000
--- a/prompts/monetization/12-sales-analytics-api.md
+++ /dev/null
@@ -1,80 +0,0 @@
-# Prompt 12: Sales Analytics API
-
-## Objective
-Create a secure backend API endpoint that retrieves and aggregates sales data for a creator's agents.
-
-## Explanation
-The creator dashboard needs data to display. This endpoint will be responsible for querying the database (or blockchain data) to provide the necessary analytics, such as total revenue and sales volume, for the currently logged-in creator.
-
-## Instructions
-1. **Record Sales Data:**
- * First, you need data to query. In the `/api/skills/mint` endpoint from Prompt 7, after a successful mint, you must save a record of the sale to a new `sales` table in your database.
- * The `sales` table should include `id`, `agent_id`, `skill_name`, `price`, `currency`, `buyer_wallet`, `transaction_signature`, and a `timestamp`.
-
-2. **Create Analytics Endpoint:**
- * Create a new endpoint, `/api/dashboard/analytics`.
- * This endpoint must be authenticated, ensuring a user can only access their own sales data. It should get the `user_id` from the session.
-
-3. **Query and Aggregate Data:**
- * In the endpoint logic:
- * Find all agents owned by the logged-in user.
- * Query the `sales` table for all sales related to those agents.
- * Use SQL `SUM()` and `COUNT()` to aggregate the data to calculate:
- * Total revenue.
- * Total number of sales.
- * Sales data grouped by day or month for the chart.
-
-4. **Return Data:**
- * Return the aggregated data in a structured JSON format that the frontend can easily consume.
-
-## Code Example (Backend Endpoint - `/api/dashboard/analytics.js`)
-```javascript
-// This is a conceptual example using a SQL-like query builder
-
-async function getAnalytics(req, res) {
- const userId = req.session.userId; // Get user ID from session
- if (!userId) {
- return res.status(401).json({ error: 'Unauthorized' });
- }
-
- // Query the database
- const result = await db.query(
- `SELECT
- SUM(price) as total_revenue,
- COUNT(id) as total_sales,
- DATE_TRUNC('day', timestamp) as date,
- COUNT(id) as daily_sales
- FROM sales
- WHERE agent_id IN (SELECT id FROM agents WHERE owner_id = $1)
- GROUP BY DATE_TRUNC('day', timestamp)
- ORDER BY date ASC;
- `, [userId]
- );
-
- // Process and return data
- const analyticsData = {
- totalRevenue: result.rows.reduce((acc, row) => acc + parseFloat(row.total_revenue), 0),
- totalSales: result.rows.reduce((acc, row) => acc + parseInt(row.total_sales), 0),
- salesOverTime: result.rows.map(row => ({
- date: row.date,
- sales: row.daily_sales
- }))
- };
-
- res.status(200).json(analyticsData);
-}
-```
-
-<!-- AUTO:self-delete-on-complete -->
-
----
-
-## ✅ On completion — delete this file
-
-This file is a unit of work, not a permanent doc. The moment every item above is **built, wired, verified, and committed** to the "Definition of done" in the repo-root `CLAUDE.md`, remove it in the same change:
-
-```bash
-git rm "prompts/monetization/12-sales-analytics-api.md"
-```
-
-Stage the deletion alongside your implementation and include it in the completion commit. This directory is the backlog: a file that still exists is unfinished work; a file that is gone has shipped. Do not delete early, and never leave a completed prompt behind.
diff --git a/prompts/monetization/12-user-purchase-history.md b/prompts/monetization/12-user-purchase-history.md
deleted file mode 100644
index 14480d416..000000000
--- a/prompts/monetization/12-user-purchase-history.md
+++ /dev/null
@@ -1,129 +0,0 @@
----
-status: not-started
----
-
-# Prompt 12: User Purchase History
-
-## Objective
-Create a new section in the user's profile or dashboard page to display a history of their skill purchases.
-
-## Explanation
-Users should have a record of their transactions and purchased items. A purchase history page provides transparency and allows users to see the value they've received from the platform.
-
-## Instructions
-1. **Create a Backend Endpoint for Purchase History:**
- * Create a new authenticated API endpoint, e.g., `GET /api/users/me/purchase-history`.
- * This endpoint should query the `user_unlocked_skills` table for the current user.
- * It should join with the `agents` and `agent_skill_prices` tables to retrieve richer data for each entry, such as the agent's name, the skill name, the price paid, the currency, the transaction signature, and the purchase date.
- * The endpoint should support pagination (e.g., using `LIMIT` and `OFFSET`).
-
-2. **Create a New Frontend Page/Section:**
- * In the user's main dashboard or profile area, add a new tab or link for "Purchase History".
- * Create the HTML structure for this section, which will primarily be a table to display the history.
- * The table should have columns for: Agent, Skill, Date, Price, and a link to the transaction on a block explorer.
-
-3. **Implement Frontend Logic:**
- * When the user navigates to the purchase history section, a JavaScript function should be called to fetch the data from the new API endpoint.
- * The script should then dynamically render the rows of the table using the fetched data.
- * Format the data for display (e.g., format dates, format prices, create the block explorer link).
- * If you implemented pagination, add "Next" and "Previous" buttons.
-
-## Code Example (Backend - SQL Query)
-
-```sql
-SELECT
- u.skill_name,
- u.transaction_signature,
- u.created_at AS purchase_date,
- a.name AS agent_name,
- p.amount,
- p.currency_mint
-FROM
- user_unlocked_skills u
-JOIN
- agents a ON u.agent_id = a.id
-LEFT JOIN
- agent_skill_prices p ON u.agent_id = p.agent_id AND u.skill_name = p.skill_name
-WHERE
- u.user_id = $1
-ORDER BY
- u.created_at DESC
-LIMIT 20 OFFSET $2;
-```
-
-## Code Example (HTML Structure)
-
-```html
-<!-- In user-dashboard.html or similar -->
-<div id="purchase-history-section">
- <h2>Purchase History</h2>
- <div class="table-container">
- <table>
- <thead>
- <tr>
- <th>Date</th>
- <th>Agent</th>
- <th>Skill</th>
- <th>Price</th>
- <th>Transaction</th>
- </tr>
- </thead>
- <tbody id="purchase-history-table-body">
- <!-- Rows will be rendered here -->
- </tbody>
- </table>
- </div>
- <div class="pagination-controls">
- <button id="history-prev-btn">Previous</button>
- <button id="history-next-btn">Next</button>
- </div>
-</div>
-```
-
-## Code Example (Frontend JavaScript)
-
-```javascript
-async function renderPurchaseHistory(page = 1) {
- const tbody = document.getElementById('purchase-history-table-body');
- try {
- const response = await fetch(`/api/users/me/purchase-history?page=${page}`);
- const history = await response.json();
-
- if (history.length === 0 && page === 1) {
- tbody.innerHTML = '<tr><td colspan="5">No purchases yet.</td></tr>';
- return;
- }
-
- tbody.innerHTML = history.map(item => {
- const price = item.amount ? `${(item.amount / 1e6).toFixed(2)} USDC` : 'N/A';
- const explorerUrl = `https://solscan.io/tx/${item.transaction_signature}`;
- return `
- <tr>
- <td>${new Date(item.purchase_date).toLocaleDateString()}</td>
- <td>${escapeHtml(item.agent_name)}</td>
- <td>${escapeHtml(item.skill_name)}</td>
- <td>${price}</td>
- <td><a href="${explorerUrl}" target="_blank" rel="noopener">View on Solscan</a></td>
- </tr>
- `;
- }).join('');
- } catch (error) {
- tbody.innerHTML = '<tr><td colspan="5">Failed to load purchase history.</td></tr>';
- console.error(error);
- }
-}
-```
-
-<!-- AUTO:self-delete-on-complete -->
-
----
-
-## ✅ On completion — delete this file
-
-This file is a unit of work, not a permanent doc. The moment every item above is **built, wired, verified, and committed** to the "Definition of done" in the repo-root `CLAUDE.md`, remove it in the same change:
-
-```bash
-git rm "prompts/monetization/12-user-purchase-history.md"
-```
-
-Stage the deletion alongside your implementation and include it in the completion commit. This directory is the backlog: a file that still exists is unfinished work; a file that is gone has shipped. Do not delete early, and never leave a completed prompt behind.
diff --git a/prompts/monetization/13-api-for-owned-skills.md b/prompts/monetization/13-api-for-owned-skills.md
deleted file mode 100644
index 076c4ec73..000000000
--- a/prompts/monetization/13-api-for-owned-skills.md
+++ /dev/null
@@ -1,82 +0,0 @@
-# Prompt 13: API for Owned Skills (Backend)
-
-## Objective
-Create the backend API endpoint that provides a list of skills owned by the currently authenticated user.
-
-## Explanation
-This endpoint will power the "My Purchased Skills" page (from the previous prompt). It needs to query the database, joining across several tables (`user_skill_ownership`, `agents`, `agent_skill_prices`) to gather all the necessary information for display.
-
-## Instructions
-1. **Create the API Endpoint:**
- * Create a new file: `/api/users/me/owned-skills.js`.
- * This endpoint should handle `GET` requests and must be protected by authentication.
-
-2. **Implement the Database Query:**
- * The core of this endpoint is the SQL query. You need to:
- * Select all records from `user_skill_ownership` that match the authenticated `user_id`.
- * `JOIN` with the `agents` table on `agent_id` to get the agent's name.
- * `LEFT JOIN` with the `agent_skill_prices` table on both `agent_id` and `skill_name` to get the price information. Note that price could have changed, so you might want to store the purchase price in the ownership table itself for historical accuracy (a task for a future prompt). For now, joining to get the *current* price is acceptable.
- * Select the required fields: `skill_name`, `agent_id`, `agent_name`, `purchase_date` (`created_at` from the ownership table), and the price info.
-
-3. **Return the Data:**
- * Execute the query and return the resulting list of skill objects as a JSON array.
-
-## Code Example (Backend - `api/users/me/owned-skills.js`)
-
-```javascript
-import { db } from '../../_lib/database-client';
-
-export default async function handler(req, res) {
- if (req.method !== 'GET') return res.status(405).end();
-
- try {
- const userId = req.user.id; // From auth middleware
-
- const { rows } = await db.query(
- `
- SELECT
- uso.skill_name,
- uso.created_at AS purchase_date,
- a.id AS agent_id,
- a.name AS agent_name,
- asp.amount AS price_amount,
- asp.currency_mint AS price_currency
- FROM
- user_skill_ownership AS uso
- JOIN
- agents AS a ON uso.agent_id = a.id
- LEFT JOIN
- agent_skill_prices AS asp ON uso.agent_id = asp.agent_id AND uso.skill_name = asp.skill_name
- WHERE
- uso.user_id = $1
- ORDER BY
- uso.created_at DESC;
- `,
- [userId]
- );
-
- res.status(200).json(rows);
-
- } catch (error) {
- console.error('Failed to fetch owned skills:', error);
- res.status(500).json({ error: 'Internal Server Error' });
- }
-}
-```
-
-## Future Improvement Note
-For true historical accuracy, the `user_skill_ownership` table should be modified to store the `amount` and `currency_mint` at the time of purchase. This prevents the user's purchase history from changing if the creator later updates the skill price. This could be its own future prompt: "Refine Purchase History for Price Accuracy."
-
-<!-- AUTO:self-delete-on-complete -->
-
----
-
-## ✅ On completion — delete this file
-
-This file is a unit of work, not a permanent doc. The moment every item above is **built, wired, verified, and committed** to the "Definition of done" in the repo-root `CLAUDE.md`, remove it in the same change:
-
-```bash
-git rm "prompts/monetization/13-api-for-owned-skills.md"
-```
-
-Stage the deletion alongside your implementation and include it in the completion commit. This directory is the backlog: a file that still exists is unfinished work; a file that is gone has shipped. Do not delete early, and never leave a completed prompt behind.
diff --git a/prompts/monetization/13-db-schema-access-grants.md b/prompts/monetization/13-db-schema-access-grants.md
deleted file mode 100644
index 18d8221a7..000000000
--- a/prompts/monetization/13-db-schema-access-grants.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# Prompt 13: Database Schema for Skill Access Grants
-
-## Objective
-Design and create the database table schema for `skill_access_grants` to track which users have permission to use specific paid skills.
-
-## Explanation
-After a user pays for a skill, we need a persistent record of their access rights. This table will serve as the source of truth for the backend to check before executing a potentially paid skill. It needs to be flexible enough to support different access models, such as time-based expiry or a fixed number of uses.
-
-## Instructions
-1. **Define the Table Schema:**
- * Create a new table named `skill_access_grants`.
- * The table should include the following columns:
- * `id`: A unique primary key (e.g., UUID or auto-incrementing integer).
- * `user_id`: Foreign key referencing the `users` table. This identifies who bought the skill.
- * `agent_id`: Foreign key referencing the `agents` table.
- * `skill_name`: A string that matches the name of the skill.
- * `payment_id`: Foreign key referencing the `skill_payments` table, linking the grant to the specific purchase.
- * `created_at`: Timestamp of when the grant was created.
- * `expires_at`: A nullable timestamp. If set, the grant is valid until this time. This supports time-based access (e.g., 24-hour pass).
- * `uses_left`: A nullable integer. If set, the grant is valid for this many uses. This supports pay-per-use models.
-
-2. **Create Indexes:**
- * Create a composite index on `(user_id, agent_id, skill_name)` for fast lookups when checking for access before skill execution.
- * Also, add an index on `expires_at` to efficiently query for expired grants if you need a cleanup job later.
-
-3. **Write the SQL Migration:**
- * Create a new SQL migration file to apply this schema change to your database.
-
-## SQL Schema Example
-
-```sql
-CREATE TABLE skill_access_grants (
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
- user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
- agent_id UUID NOT NULL REFERENCES agents(id) ON DELETE CASCADE,
- skill_name VARCHAR(255) NOT NULL,
- payment_id UUID NOT NULL REFERENCES skill_payments(id),
- created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
- expires_at TIMESTAMPTZ,
- uses_left INTEGER,
-
- -- A user can have multiple grants for the same skill over time, so a unique constraint isn't on user/agent/skill
- CONSTRAINT check_positive_uses_left CHECK (uses_left IS NULL OR uses_left >= 0)
-);
-
--- Index for fast access checks
-CREATE INDEX idx_skill_access_grants_check ON skill_access_grants(user_id, agent_id, skill_name);
-
--- Index for cleaning up expired grants
-CREATE INDEX idx_skill_access_grants_expires_at ON skill_access_grants(expires_at);
-
--- You'll also need a skill_payments table
-CREATE TABLE skill_payments (
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
- user_id UUID NOT NULL REFERENCES users(id),
- agent_id UUID NOT NULL,
- skill_name VARCHAR(255) NOT NULL,
- amount BIGINT NOT NULL,
- currency_mint VARCHAR(255) NOT NULL,
- status VARCHAR(50) NOT NULL DEFAULT 'pending', -- pending, completed, failed
- signature VARCHAR(255) UNIQUE, -- The on-chain transaction signature
- created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
- updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
-);
-```
-
-<!-- AUTO:self-delete-on-complete -->
-
----
-
-## ✅ On completion — delete this file
-
-This file is a unit of work, not a permanent doc. The moment every item above is **built, wired, verified, and committed** to the "Definition of done" in the repo-root `CLAUDE.md`, remove it in the same change:
-
-```bash
-git rm "prompts/monetization/13-db-schema-access-grants.md"
-```
-
-Stage the deletion alongside your implementation and include it in the completion commit. This directory is the backlog: a file that still exists is unfinished work; a file that is gone has shipped. Do not delete early, and never leave a completed prompt behind.
diff --git a/prompts/monetization/13-platform-fee-implementation.md b/prompts/monetization/13-platform-fee-implementation.md
deleted file mode 100644
index d4598e198..000000000
--- a/prompts/monetization/13-platform-fee-implementation.md
+++ /dev/null
@@ -1,88 +0,0 @@
-# Prompt 13: Platform Fee Implementation
-
-## Status
-- [ ] Not Started
-
-## Objective
-Implement a platform fee on every skill purchase, where a percentage of the sale amount is sent to a platform-owned treasury wallet.
-
-## Explanation
-To ensure the platform is sustainable, a platform fee is essential. This requires modifying the transaction creation logic to split the payment between the seller and the platform.
-
-## Instructions
-1. **Configure Treasury Wallet:**
- * Store the platform's treasury wallet address in a secure configuration file or environment variable (e.g., `PLATFORM_TREASURY_WALLET`).
-
-2. **Modify Transaction Creation API:**
- * In the `/api/payments/prepare-transaction` endpoint, calculate the platform fee based on the total price (e.g., a 5% fee).
- * The total price is `priceInfo.amount`.
- * `platformFee = priceInfo.amount * 0.05`
- * `sellerAmount = priceInfo.amount - platformFee`
-
-3. **Create a Multi-Instruction Transaction:**
- * The Solana transaction will now have two `createTransferInstruction` calls:
- 1. A transfer of `sellerAmount` from the buyer to the seller.
- 2. A transfer of `platformFee` from the buyer to the platform's treasury wallet.
- * Add both instructions to the same transaction. This ensures the payment split is atomic—either both transfers succeed, or neither does.
-
-## Code Example (Backend - `/api/payments/prepare-transaction.js` Update)
-```javascript
-// ... (imports and initial setup)
-
-// Inside the handler function, after fetching priceInfo and sellerPublicKey
-const PLATFORM_FEE_BPS = 500; // 500 basis points = 5%
-const PLATFORM_TREASURY = new PublicKey(process.env.PLATFORM_TREASURY_WALLET);
-
-const totalAmount = priceInfo.amount;
-const platformFee = Math.floor(totalAmount * (PLATFORM_FEE_BPS / 10000));
-const sellerAmount = totalAmount - platformFee;
-
-// ... (setup connection, buyer, seller, mint)
-
-const buyerTokenAccount = await getOrCreateAssociatedTokenAccount(connection, buyer, mint, buyer);
-const sellerTokenAccount = await getOrCreateAssociatedTokenAccount(connection, buyer, mint, seller);
-const treasuryTokenAccount = await getOrCreateAssociatedTokenAccount(connection, buyer, mint, PLATFORM_TREASURY);
-
-// Create the transaction with TWO transfer instructions
-const transaction = new Transaction();
-
-// 1. Transfer to seller
-transaction.add(
- createTransferInstruction(
- buyerTokenAccount.address,
- sellerTokenAccount.address,
- buyer,
- sellerAmount
- )
-);
-
-// 2. Transfer to platform treasury
-transaction.add(
- createTransferInstruction(
- buyerTokenAccount.address,
- treasuryTokenAccount.address,
- buyer,
- platformFee
- )
-);
-
-// ... (set blockhash, feePayer, serialize and send)
-```
-
-## Important Considerations
-* **Rounding:** Be mindful of potential rounding errors when calculating fees. Using integer math with basis points (BPS) is generally safer.
-* **Associated Token Accounts:** Ensure the platform's treasury wallet has an associated token account for each currency you support. The `getOrCreateAssociatedTokenAccount` function helps with this, but the transaction to create it might need to be handled separately or signed by the platform.
-
-<!-- AUTO:self-delete-on-complete -->
-
----
-
-## ✅ On completion — delete this file
-
-This file is a unit of work, not a permanent doc. The moment every item above is **built, wired, verified, and committed** to the "Definition of done" in the repo-root `CLAUDE.md`, remove it in the same change:
-
-```bash
-git rm "prompts/monetization/13-platform-fee-implementation.md"
-```
-
-Stage the deletion alongside your implementation and include it in the completion commit. This directory is the backlog: a file that still exists is unfinished work; a file that is gone has shipped. Do not delete early, and never leave a completed prompt behind.
diff --git a/prompts/monetization/13-subscription-model-database-schema.md b/prompts/monetization/13-subscription-model-database-schema.md
deleted file mode 100644
index 01b011291..000000000
--- a/prompts/monetization/13-subscription-model-database-schema.md
+++ /dev/null
@@ -1,83 +0,0 @@
-# Prompt 13: Subscription Model Database Schema
-
-## Objective
-Design and create the necessary database tables to support a subscription-based monetization model for agent skills.
-
-## Explanation
-To move beyond one-time purchases, we need to support subscriptions. This will allow creators to offer bundles of skills for a recurring fee (e.g., monthly). This task focuses on the database design, which is the foundation for the subscription feature. We will need tables to manage subscription plans (tiers), and to track which users are subscribed to which plans.
-
-## Instructions
-1. **Design `agent_subscription_tiers` Table:**
- * This table will store the different subscription plans a creator can offer for an agent.
- * It should include columns for the agent it belongs to, a name (e.g., "Pro"), a price, a currency, and a billing interval (e.g., 'month', 'year').
- * It should also include an array of skill names that are included in this tier.
-
-2. **Design `user_subscriptions` Table:**
- * This table will track active user subscriptions.
- * It should link a user to a subscription tier.
- * It needs columns to manage the subscription's lifecycle, such as `status` (e.g., 'active', 'canceled'), `current_period_start`, and `current_period_end`.
-
-3. **Write SQL Schema:**
- * Write the `CREATE TABLE` SQL statements for these new tables. Include appropriate foreign keys, constraints, and indexes.
-
-## SQL Schema Definition
-
-```sql
--- Table to define the subscription plans for an agent
-CREATE TABLE agent_subscription_tiers (
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
- agent_id UUID REFERENCES agents(id) NOT NULL,
- name TEXT NOT NULL,
- description TEXT,
- price_amount BIGINT NOT NULL, -- Price in smallest unit
- price_currency_mint TEXT NOT NULL,
- billing_interval TEXT NOT NULL CHECK (billing_interval IN ('month', 'year')), -- e.g., monthly, yearly
- included_skills TEXT[] NOT NULL, -- An array of skill names included in this tier
- is_active BOOLEAN DEFAULT TRUE,
- created_at TIMESTAMPTZ DEFAULT NOW(),
-
- UNIQUE(agent_id, name)
-);
-
--- Table to track which user is subscribed to which tier
-CREATE TABLE user_subscriptions (
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
- user_id UUID REFERENCES auth.users(id) NOT NULL,
- tier_id UUID REFERENCES agent_subscription_tiers(id) NOT NULL,
- status TEXT NOT NULL CHECK (status IN ('active', 'canceled', 'past_due')),
- current_period_start TIMESTAMPTZ NOT NULL,
- current_period_end TIMESTAMPTZ NOT NULL,
- cancel_at_period_end BOOLEAN DEFAULT FALSE,
- created_at TIMESTAMPTZ DEFAULT NOW(),
- updated_at TIMESTAMPTZ DEFAULT NOW()
-);
-
--- Add indexes for performance
-CREATE INDEX idx_user_subscriptions_user_id ON user_subscriptions(user_id);
-CREATE INDEX idx_user_subscriptions_tier_id ON user_subscriptions(tier_id);
-
--- RLS Policies
-ALTER TABLE agent_subscription_tiers ENABLE ROW LEVEL SECURITY;
-CREATE POLICY "Creators can manage their own subscription tiers"
-ON agent_subscription_tiers FOR ALL
-USING (auth.uid() = (SELECT creator_id FROM agents WHERE id = agent_id));
-
-ALTER TABLE user_subscriptions ENABLE ROW LEVEL SECURITY;
-CREATE POLICY "Users can view their own subscriptions"
-ON user_subscriptions FOR SELECT
-USING (auth.uid() = user_id);
-```
-
-<!-- AUTO:self-delete-on-complete -->
-
----
-
-## ✅ On completion — delete this file
-
-This file is a unit of work, not a permanent doc. The moment every item above is **built, wired, verified, and committed** to the "Definition of done" in the repo-root `CLAUDE.md`, remove it in the same change:
-
-```bash
-git rm "prompts/monetization/13-subscription-model-database-schema.md"
-```
-
-Stage the deletion alongside your implementation and include it in the completion commit. This directory is the backlog: a file that still exists is unfinished work; a file that is gone has shipped. Do not delete early, and never leave a completed prompt behind.
diff --git a/prompts/monetization/13-subscription-tiers-db-schema.md b/prompts/monetization/13-subscription-tiers-db-schema.md
deleted file mode 100644
index 67a156fee..000000000
--- a/prompts/monetization/13-subscription-tiers-db-schema.md
+++ /dev/null
@@ -1,97 +0,0 @@
----
-status: not-started
----
-
-# Prompt 13: Subscription Tiers Database Schema
-
-## Objective
-Design and create the necessary database tables to support agent-specific subscription tiers.
-
-## Explanation
-To move beyond one-time purchases, we need a system for recurring subscriptions. This starts with a robust database schema that allows creators to define different subscription tiers for their agents, and for the system to track user subscriptions.
-
-## Instructions
-1. **Create `agent_subscription_tiers` Table:**
- * This table will store the different subscription plans offered by a creator for a specific agent.
- * **Columns:**
- * `id`: Primary key (e.g., UUID or SERIAL).
- * `agent_id`: Foreign key to the `agents` table.
- * `name`: The name of the tier (e.g., "Supporter", "Pro").
- * `description`: A short description of the tier's benefits.
- * `price_amount`: The recurring price in the smallest unit (e.g., lamports).
- * `price_currency_mint`: The currency of the price.
- * `interval`: The billing cycle (e.g., 'day', 'week', 'month', 'year').
- * `interval_count`: The number of intervals per cycle (e.g., 1 for monthly, 3 for quarterly).
- * `active`: A boolean to allow creators to enable/disable tiers.
- * `created_at`, `updated_at`: Timestamps.
-
-2. **Create `user_subscriptions` Table:**
- * This table will track which users are subscribed to which tiers.
- * **Columns:**
- * `id`: Primary key.
- * `user_id`: Foreign key to the `users` table.
- * `tier_id`: Foreign key to the `agent_subscription_tiers` table.
- * `status`: The status of the subscription (e.g., 'active', 'past_due', 'canceled', 'expired').
- * `current_period_start`: Timestamp for the beginning of the current billing cycle.
- * `current_period_end`: Timestamp for the end of the current billing cycle.
- * `canceled_at`: Timestamp if the user has canceled but the subscription is still active until the period end.
- * `ended_at`: Timestamp when the subscription fully ended.
- * `latest_transaction_signature`: The signature of the most recent payment transaction.
- * `created_at`, `updated_at`: Timestamps.
-
-## SQL Schema Example (PostgreSQL)
-
-```sql
--- Table for creators to define their subscription tiers
-CREATE TABLE agent_subscription_tiers (
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
- agent_id UUID NOT NULL REFERENCES agents(id) ON DELETE CASCADE,
- name VARCHAR(100) NOT NULL,
- description TEXT,
- price_amount BIGINT NOT NULL CHECK (price_amount >= 0),
- price_currency_mint VARCHAR(44) NOT NULL,
- interval VARCHAR(20) NOT NULL, -- e.g., 'day', 'week', 'month'
- interval_count INT NOT NULL DEFAULT 1,
- active BOOLEAN NOT NULL DEFAULT TRUE,
- created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
- updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
- UNIQUE (agent_id, name) -- An agent can't have two tiers with the same name
-);
-
--- Table to track active user subscriptions
-CREATE TYPE subscription_status AS ENUM ('active', 'past_due', 'canceled', 'expired', 'incomplete');
-
-CREATE TABLE user_subscriptions (
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
- user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
- tier_id UUID NOT NULL REFERENCES agent_subscription_tiers(id),
- status subscription_status NOT NULL DEFAULT 'incomplete',
- current_period_start TIMESTAMPTZ,
- current_period_end TIMESTAMPTZ,
- canceled_at TIMESTAMPTZ,
- ended_at TIMESTAMPTZ,
- latest_transaction_signature VARCHAR(88),
- created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
- updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
- UNIQUE(user_id, tier_id) -- A user can only have one subscription to a specific tier at a time.
-);
-
--- Indexes for performance
-CREATE INDEX idx_user_subscriptions_user_id ON user_subscriptions(user_id);
-CREATE INDEX idx_agent_subscription_tiers_agent_id ON agent_subscription_tiers(agent_id);
-```
-**Note:** This is a foundational schema. A real-world implementation might be more complex, potentially involving a separate `subscription_periods` table for a more detailed history, but this is a strong starting point.
-
-<!-- AUTO:self-delete-on-complete -->
-
----
-
-## ✅ On completion — delete this file
-
-This file is a unit of work, not a permanent doc. The moment every item above is **built, wired, verified, and committed** to the "Definition of done" in the repo-root `CLAUDE.md`, remove it in the same change:
-
-```bash
-git rm "prompts/monetization/13-subscription-tiers-db-schema.md"
-```
-
-Stage the deletion alongside your implementation and include it in the completion commit. This directory is the backlog: a file that still exists is unfinished work; a file that is gone has shipped. Do not delete early, and never leave a completed prompt behind.
diff --git a/prompts/monetization/13_platform_fee_integration.md b/prompts/monetization/13_platform_fee_integration.md
deleted file mode 100644
index 059426792..000000000
--- a/prompts/monetization/13_platform_fee_integration.md
+++ /dev/null
@@ -1,84 +0,0 @@
----
-status: not-started
-last_updated: 2026-05-04
----
-# Prompt 13: Platform Fee Integration
-
-## Objective
-Modify the skill purchase transaction to include a platform fee that is sent to the company's treasury wallet.
-
-## Explanation
-To create a sustainable business model, the platform will take a small percentage of each skill sale. This needs to be handled on-chain and transparently. The backend will now construct a transaction with two transfers instead of one: one for the creator's payout and one for the platform fee.
-
-## Instructions
-1. **Update Configuration:**
- * Store the platform's treasury wallet address and the fee percentage in a secure configuration file or environment variables (e.g., `PLATFORM_FEE_BPS=500` for 5%, `PLATFORM_TREASURY_WALLET="...address..."`).
-
-2. **Modify the Purchase Preparation API:**
- * Locate the `POST /api/skills/purchase-prep` endpoint.
- * Inside the transaction construction logic, calculate the platform fee from the total skill price. For example, if the fee is 5% (500 basis points), `fee_amount = total_price * 500 / 10000`.
- * The creator's payout is now `creator_amount = total_price - fee_amount`.
- * **Add a second `spl-token` transfer instruction** to the transaction.
- * The first instruction transfers `creator_amount` to the creator's wallet.
- * The second instruction transfers `fee_amount` to the platform's treasury wallet.
- * The user still signs a single transaction, but it now atomically handles both the payout and the platform fee.
-
-3. **Update Purchase Confirmation:**
- * The `POST /api/skills/purchase-confirm` endpoint should be updated to verify this new transaction structure. It now needs to look for *two* `spl-token` transfers and validate that both the creator payout and the platform fee were sent correctly.
-
-## Code Example (Inside `purchase-prep` API)
-
-```javascript
-// ... after fetching price and wallets
-const PLATFORM_FEE_BPS = 500; // 5%
-const PLATFORM_TREASURY_WALLET = new PublicKey("...");
-const totalAmount = skillPrice.amount;
-
-const feeAmount = Math.floor(totalAmount * PLATFORM_FEE_BPS / 10000);
-const creatorAmount = totalAmount - feeAmount;
-
-// ...
-const tx = new Transaction({ /* ... */ });
-
-// Instruction for Creator Payout
-tx.add(
- createTransferInstruction(
- buyerAta.address,
- creatorAta.address,
- buyerPublicKey,
- creatorAmount
- )
-);
-
-// Instruction for Platform Fee
-const platformTreasuryAta = await getOrCreateAssociatedTokenAccount(
- connection,
- buyerPublicKey,
- usdcMint,
- PLATFORM_TREASURY_WALLET
-);
-tx.add(
- createTransferInstruction(
- buyerAta.address,
- platformTreasuryAta.address,
- buyerPublicKey,
- feeAmount
- )
-);
-
-// ... serialize and return the transaction with two instructions
-```
-
-<!-- AUTO:self-delete-on-complete -->
-
----
-
-## ✅ On completion — delete this file
-
-This file is a unit of work, not a permanent doc. The moment every item above is **built, wired, verified, and committed** to the "Definition of done" in the repo-root `CLAUDE.md`, remove it in the same change:
-
-```bash
-git rm "prompts/monetization/13_platform_fee_integration.md"
-```
-
-Stage the deletion alongside your implementation and include it in the completion commit. This directory is the backlog: a file that still exists is unfinished work; a file that is gone has shipped. Do not delete early, and never leave a completed prompt behind.