Skill: omactiengartelle/book-cover-generator (version 1.0.0)

--- name: book-cover-generator description: AI book cover generator for indie authors and self-publishers — create stunning KDP book covers, novel cover art, ebook covers, and Kindle cover designs using AI. Generate genre-specific covers for fantasy, romance, thriller, sci-fi, and non-fiction books in portrait format via the Neta AI image generation API (free trial at neta.art/open). tools: Bash --- # Book Cover Generator AI book cover generator for indie authors and self-publishers — create stunning KDP book covers, novel cover art, ebook covers, and Kindle cover designs using AI. Generate genre-specific covers for fantasy, romance, thriller, sci-fi, and non-fiction books in portrait format. ## Token Requires a Neta API token (free trial at <https://www.neta.art/open/>). Pass it via the `--token` flag. ```bash node <script> "your prompt" --token YOUR_TOKEN ``` ## When to use Use when someone asks to generate or create ai book cover generator images. ## Quick start ```bash node bookcovergenerator.js "your description here" --token YOUR_TOKEN ``` ## Options - `--size` — `portrait`, `landscape`, `square`, `tall` (default: `portrait`) - `--ref` — reference image UUID for style inheritance ## Install ```bash npx skills add omactiengartelle/book-cover-generator ```

path: README.md
content: # Book Cover Generator

Generate stunning book covers from text descriptions using AI — perfect for indie authors, self-publishers, and KDP creators. Describe your book's genre, mood, characters, and setting, and receive professional-quality cover art ready for Kindle, ebook, and print-on-demand publishing.

Powered by the Neta AI image generation API (api.talesofai.com) — the same service as neta.art/open.

## Install

```bash
# Via npx skills
npx skills add omactiengartelle/book-cover-generator

# Via ClawHub
clawhub install book-cover-generator
```

## Token Setup

This skill requires a Neta API token (free trial available at <https://www.neta.art/open/>).

Pass it via the `--token` flag:

```bash
node <script> "your prompt" --token YOUR_TOKEN
```

## Usage

```bash
node bookcovergenerator.js "<description>" --token YOUR_TOKEN [--size <size>] [--ref <uuid>]
```

### Examples

```bash
# Fantasy novel cover
node bookcovergenerator.js "A lone wizard standing at the edge of a cliff overlooking a dragon-filled valley, epic fantasy, dramatic stormy sky, oil painting style" --token "$NETA_TOKEN"

# Romance novel cover
node bookcovergenerator.js "Two silhouettes embracing on a moonlit beach, soft warm tones, romantic atmosphere, cinematic lighting" --token "$NETA_TOKEN"

# Thriller cover
node bookcovergenerator.js "A shadowy figure in a rain-soaked city alley, neon reflections, dark and suspenseful mood, photorealistic" --token "$NETA_TOKEN"

# Non-fiction business book
node bookcovergenerator.js "Clean minimalist design, bold typography space, ascending graph motif, professional corporate blues and whites" --token "$NETA_TOKEN"

# Landscape size
node bookcovergenerator.js "Sci-fi spaceship battle above a ringed gas giant, cinematic, highly detailed" --token "$NETA_TOKEN" --size landscape

# With style reference
node bookcovergenerator.js "Dark gothic castle on a stormy night" --token "$NETA_TOKEN" --ref abc123-uuid-here
```

## Options

| Flag | Values | Default | Description |
|------|--------|---------|-------------|
| `--size` | `portrait`, `landscape`, `square`, `tall` | `portrait` | Output image dimensions |
| `--token` | string | — | Neta API token (required) |
| `--ref` | UUID string | — | Reference image UUID for style inheritance |

### Size Dimensions

| Size | Dimensions | Best For |
|------|-----------|----------|
| `portrait` | 832 × 1216 | Standard book covers, KDP, Kindle |
| `square` | 1024 × 1024 | Social media, thumbnails |
| `landscape` | 1216 × 832 | Wide banners, panoramic scenes |
| `tall` | 704 × 1408 | Phone wallpapers, tall formats |

## Output

Returns a direct image URL. Download or open it in your browser to save the generated cover.

## Tips for Great Book Covers

- **Be specific about genre**: "dark fantasy", "cozy mystery", "literary fiction" help set the tone
- **Describe the mood**: "eerie", "hopeful", "tense", "whimsical"
- **Mention art style**: "oil painting", "watercolor", "photorealistic", "illustrated", "minimalist"
- **Leave room for text**: add "with space for title text at top" or "negative space for typography"
- **Specify lighting**: "golden hour", "dramatic side lighting", "soft diffused light"

This skill requires a Neta API token (free trial available at https://www.neta.art/open/).


path: bookcovergenerator.js
content: #!/usr/bin/env node
import https from "https";

// --- CLI parsing ---
const args = process.argv.slice(2);
let prompt = null;
let size = "portrait";
let tokenFlag = null;
let refUuid = null;

for (let i = 0; i < args.length; i++) {
  if (args[i] === "--size" && args[i + 1]) {
    size = args[++i];
  } else if (args[i] === "--token" && args[i + 1]) {
    tokenFlag = args[++i];
  } else if (args[i] === "--ref" && args[i + 1]) {
    refUuid = args[++i];
  } else if (!args[i].startsWith("--") && prompt === null) {
    prompt = args[i];
  }
}

const [REDACTED_SECRET];

if (!TOKEN) {
  console.error("\n✗ Token required. Pass via: --token YOUR_TOKEN");
  console.error("  Get yours at: https://www.neta.art/open/");
  process.exit(1);
}

if (!prompt) {
  console.error("\n✗ Prompt required as the first positional argument.");
  console.error('  Example: node bookcovergenerator.js "your prompt" --token YOUR_TOKEN');
  process.exit(1);
}

// --- Size map ---
const SIZES = {
  square:    { width: 1024, height: 1024 },
  portrait:  { width: 832,  height: 1216 },
  landscape: { width: 1216, height: 832  },
  tall:      { width: 704,  height: 1408 },
};

const dims = SIZES[size] || SIZES.portrait;

// --- HTTP helpers ---
function request(method, url, body) {
  return new Promise((resolve, reject) => {
    const parsed = new URL(url);
    const options = {
      hostname: parsed.hostname,
      path: parsed.pathname + parsed.search,
      method,
      headers: {
        "x-token": TOKEN,
        "x-platform": "nieta-app/web",
        "content-type": "application/json",
      },
    };
    const req = https.request(options, (res) => {
      let data = "";
      res.on("data", (chunk) => (data += chunk));
      res.on("end", () => {
        try {
          resolve(JSON.parse(data));
        } catch {
          resolve(data.trim());
        }
      });
    });
    req.on("error", reject);
    if (body) req.write(JSON.stringify(body));
    req.end();
  });
}

function sleep(ms) {
  return new Promise((r) => setTimeout(r, ms));
}

// --- Main ---
async function main() {
  // Build request body
  const body = {
    storyId: "DO_NOT_USE",
    jobType: "universal",
    rawPrompt: [{ type: "freetext", value: prompt, weight: 1 }],
    width: dims.width,
    height: dims.height,
    meta: { entrance: "PICTURE,VERSE" },
    context_model_series: "8_image_edit",
  };

  if (refUuid) {
    body.inherit_params = {
      collection_uuid: refUuid,
      picture_uuid: refUuid,
    };
  }

  // Submit job
  const submitRes = await request("POST", "https://api.talesofai.com/v3/make_image", body);

  let taskUuid;
  if (typeof submitRes === "string") {
    taskUuid = submitRes;
  } else if (submitRes && submitRes.task_uuid) {
    taskUuid = submitRes.task_uuid;
  } else {
    console.error("✗ Unexpected response from image API:", JSON.stringify(submitRes));
    process.exit(1);
  }

  // Poll for result
  const MAX_ATTEMPTS = 90;
  for (let attempt = 0; attempt < MAX_ATTEMPTS; attempt++) {
    await sleep(2000);

    const pollRes = await request(
      "GET",
      `https://api.talesofai.com/v1/artifact/task/${taskUuid}`,
      null
    );

    const status = pollRes && pollRes.task_status;

    if (status === "PENDING" || status === "MODERATION") {
      continue;
    }

    // Done — extract URL
    let imageUrl = null;
    if (pollRes.artifacts && pollRes.artifacts[0] && pollRes.artifacts[0].url) {
      imageUrl = pollRes.artifacts[0].url;
    } else if (pollRes.result_image_url) {
      imageUrl = pollRes.result_image_url;
    }

    if (imageUrl) {
      console.log(imageUrl);
      process.exit(0);
    } else {
      console.error("✗ Task finished but no image URL found:", JSON.stringify(pollRes));
      process.exit(1);
    }
  }

  console.error("✗ Timed out waiting for image generation.");
  process.exit(1);
}

main().catch((err) => {
  console.error("✗ Error:", err.message || err);
  process.exit(1);
});


path: package.json
content: name: book-cover-generator
version: 1.0.0
type: module
description: Book Cover Generator — AI-powered ai book cover generator
license: MIT

Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)