Skill: omactiengartelle/dnd-character-generator (version 1.0.0)

--- name: dnd-character-generator description: Generate cinematic D&D character portraits and tabletop RPG hero art from a text description. Ideal for Dungeons & Dragons players, dungeon masters, TTRPG campaigns, and virtual tabletop tokens — create wizards, warriors, paladins, rogues, and any fantasy character class in stunning detail via the Neta AI image generation API (free trial at neta.art/open). tools: Bash --- # D&D Character Art Generator Generate cinematic D&D character portraits and tabletop RPG hero art from a text description. Ideal for Dungeons & Dragons players, dungeon masters, TTRPG campaigns, and virtual tabletop tokens — create wizards, warriors, paladins, rogues, and any fantasy character class in stunning detail. ## 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 dnd character art generator images. ## Quick start ```bash node dndcharactergenerator.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/dnd-character-generator ```

path: README.md
content: # D&D Character Art Generator

Generate cinematic D&D character portraits and tabletop RPG hero art from text descriptions. Describe your wizard, warrior, paladin, rogue, or any fantasy character class and receive a stunning, detailed portrait — perfect for Dungeons & Dragons players, dungeon masters, TTRPG campaigns, and virtual tabletop tokens.

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

## Install

```bash
npx skills add omactiengartelle/dnd-character-generator
```

```bash
clawhub install dnd-character-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
# Default portrait — uses built-in D&D prompt
node dndcharactergenerator.js --token YOUR_TOKEN

# Describe your character
node dndcharactergenerator.js "elven ranger with a longbow, forest background, green cloak, moonlight" --token YOUR_TOKEN

# Dwarf paladin in plate armor
node dndcharactergenerator.js "dwarf paladin in gleaming plate armor, holy symbol glowing, divine light, epic fantasy" --token YOUR_TOKEN

# Tiefling warlock
node dndcharactergenerator.js "tiefling warlock with horns, purple arcane energy, dark robes, dramatic shadows" --token YOUR_TOKEN

# Landscape composition
node dndcharactergenerator.js "barbarian warrior on a cliff overlooking a battlefield" --size landscape --token YOUR_TOKEN

# Square token for virtual tabletop
node dndcharactergenerator.js "halfling rogue in leather armor, dagger, confident smirk" --size square --token YOUR_TOKEN
```

### Output

Returns a direct image URL.

## Options

| Flag | Values | Default | Description |
|------|--------|---------|-------------|
| `--token` | string | — | **Required.** Your Neta API token |
| `--size` | `portrait`, `landscape`, `square`, `tall` | `portrait` | Image dimensions |
| `--ref` | UUID string | — | Reference image UUID for style inheritance |

### Size Dimensions

| Size | Dimensions | Best for |
|------|-----------|----------|
| `portrait` | 832 × 1216 | Character portraits, VTT tokens |
| `landscape` | 1216 × 832 | Scene illustrations, wide banners |
| `square` | 1024 × 1024 | Profile pictures, token art |
| `tall` | 704 × 1408 | Full-body character art |

## Prompt Tips

- Name the character race and class: "half-orc barbarian", "high elf wizard"
- Describe armor, weapons, and accessories in detail
- Mention lighting: "dramatic torchlight", "moonlit forest", "divine radiance"
- Add mood or setting: "battle-worn", "ancient dungeon background", "heroic pose"
- Include art style cues: "oil painting style", "highly detailed fantasy art", "cinematic"

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


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

const args = process.argv.slice(2);

const PROMPT = args.find(a => !a.startsWith('--')) ||
  'DnD fantasy character portrait, detailed armor and weapons, dramatic lighting, epic fantasy art style, highly detailed character design, tabletop RPG hero';

const tokenIndex = args.indexOf('--token');
const tokenFlag = tokenIndex !== -1 ? args[tokenIndex + 1] : null;

const sizeIndex = args.indexOf('--size');
const sizeArg = sizeIndex !== -1 ? args[sizeIndex + 1] : 'portrait';

const refIndex = args.indexOf('--ref');
const refArg = refIndex !== -1 ? args[refIndex + 1] : null;

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);
}

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

const { width, height } = SIZES[sizeArg] || SIZES.portrait;

const HEADERS = {
  'x-token': TOKEN,
  'x-platform': 'nieta-app/web',
  'content-type': 'application/json',
};

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: { ...HEADERS },
    };
    if (body) {
      const data = JSON.stringify(body);
      options.headers['content-length'] = Buffer.byteLength(data);
      const req = https.request(options, res => {
        let raw = '';
        res.on('data', c => raw += c);
        res.on('end', () => {
          try { resolve(JSON.parse(raw)); } catch { resolve(raw); }
        });
      });
      req.on('error', reject);
      req.write(data);
      req.end();
    } else {
      const req = https.request(options, res => {
        let raw = '';
        res.on('data', c => raw += c);
        res.on('end', () => {
          try { resolve(JSON.parse(raw)); } catch { resolve(raw); }
        });
      });
      req.on('error', reject);
      req.end();
    }
  });
}

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

async function main() {
  const body = {
    storyId: 'DO_NOT_USE',
    jobType: 'universal',
    rawPrompt: [{ type: 'freetext', value: PROMPT, weight: 1 }],
    width,
    height,
    meta: { entrance: 'PICTURE,VERSE' },
    context_model_series: '8_image_edit',
  };

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

  let taskUuid;
  const makeRes = await request('POST', 'https://api.talesofai.com/v3/make_image', body);

  if (typeof makeRes === 'string') {
    taskUuid = makeRes.trim();
  } else if (makeRes && makeRes.task_uuid) {
    taskUuid = makeRes.task_uuid;
  } else {
    console.error('✗ Unexpected response from make_image:', JSON.stringify(makeRes));
    process.exit(1);
  }

  console.error(`Generating... (task: ${taskUuid})`);

  for (let i = 0; i < 90; i++) {
    await sleep(2000);
    const poll = await request('GET', `https://api.talesofai.com/v1/artifact/task/${taskUuid}`);
    const status = poll && poll.task_status;

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

    const url =
      (poll.artifacts && poll.artifacts[0] && poll.artifacts[0].url) ||
      poll.result_image_url;

    if (url) {
      console.log(url);
      process.exit(0);
    } else {
      console.error('✗ Task finished but no image URL found:', JSON.stringify(poll));
      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: dnd-character-generator
version: 1.0.0
type: module
description: D&D Character Art Generator — AI-powered dnd character art generator
license: MIT

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