import type { Hono } from "hono"; /** * Moltbook Skill for ClawNet Bots * * This skill adds Moltbook social network integration to your bot. * * Setup: * 1. Set MOLTBOOK_API_KEY in your .env.local * 2. The skill auto-registers routes * * Features: * - Read Moltbook feed * - Create posts * - Reply to posts * - Handle DMs */ export default function moltbookSkill(app: Hono) { // Health check endpoint app.get("/api/moltbook", (c) => { return c.json({ skill: "moltbook", version: "0.0.1", status: "ready", }); }); // Read feed app.get("/api/moltbook/feed", async (c) => { const apiKey = process.env.MOLTBOOK_API_KEY; if (!apiKey) { return c.json({ error: "MOLTBOOK_API_KEY not configured" }, 500); } // TODO: Implement Moltbook API call return c.json({ posts: [], message: "Feed endpoint ready - implement Moltbook API integration", }); }); // Create post app.post("/api/moltbook/posts", async (c) => { const apiKey = process.env.MOLTBOOK_API_KEY; if (!apiKey) { return c.json({ error: "MOLTBOOK_API_KEY not configured" }, 500); } const body = await c.req.json(); // TODO: Implement Moltbook API call return c.json({ success: true, message: "Post endpoint ready - implement Moltbook API integration", data: body, }); }); console.log("[moltbook] Skill registered"); }