Skip to content
Back to skills

Generate Cover

ASecurity

Generate book cover images using HTML+CSS and Playwright screenshots. No external design tools needed. Usage: /generate-cover "book title"

  • 61 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 28, 2026
ai-agentsjavascriptgojavabashnode

Security analysis

A100/100

Scanned November 28, 2026

npx -y skills add JOINCLASS/ai-ceo-framework --skill generate-cover --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Generate Cover?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Generate Cover
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/joinclass-generate-cover/badge)](https://www.skillsdirectory.com/skills/joinclass-generate-cover)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: generate-cover
description: Generate book cover images using HTML+CSS and Playwright screenshots. No external design tools needed. Usage: /generate-cover "book title"
---

# /generate-cover -- Book Cover Image Generation Skill

Design covers with HTML+CSS and render via Playwright screenshot. Fully code-based, no external tools.

## Specifications

- **Size**: 1600x2560px (standard ebook ratio 1:1.6)
- **Format**: JPG (cover.jpg)
- **Output**: `{book-slug}/cover.jpg`

## Design Guidelines

- **Background**: Dark gradient (e.g., #1e3a8a -> #0f172a)
- **Title**: White, bold, large
- **Subtitle**: White, slightly smaller
- **Accent**: Orange line (#f97316) or brand color
- **Author**: White, positioned at bottom
- **Overall feel**: Technology x Professional

Customize colors and style to match `.company/steering/brand.md` if available.

## Workflow

1. Get title and subtitle from the book's config file
2. Design cover in HTML+CSS (1600x2560px viewport)
3. Save as temporary HTML file
4. Launch Playwright headless browser -> open HTML -> screenshot
5. Save as JPG
6. Delete temporary HTML

## HTML Template Structure

```html
<!DOCTYPE html>
<html>
<head>
<style>
  body {
    margin: 0;
    width: 1600px;
    height: 2560px;
    background: linear-gradient(180deg, #1e3a8a 0%, #0f172a 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: white;
    text-align: center;
    padding: 120px;
    box-sizing: border-box;
  }
  .accent-line {
    width: 200px;
    height: 6px;
    background: #f97316;
    margin: 60px 0;
  }
  .title {
    font-size: 96px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 40px;
  }
  .subtitle {
    font-size: 48px;
    font-weight: 400;
    opacity: 0.85;
    line-height: 1.4;
  }
  .author {
    position: absolute;
    bottom: 120px;
    font-size: 42px;
    font-weight: 300;
    opacity: 0.7;
  }
</style>
</head>
<body>
  <div class="title">{TITLE}</div>
  <div class="accent-line"></div>
  <div class="subtitle">{SUBTITLE}</div>
  <div class="author">{AUTHOR}</div>
</body>
</html>
```

## Prerequisites

- Node.js installed
- Playwright installed (`npx playwright install chromium`)

## Execution Command

```bash
npx playwright screenshot --viewport-size="1600,2560" /tmp/cover.html cover.jpg
```

Or use a simple Node script:

```javascript
const { chromium } = require('playwright');
(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage();
  await page.setViewportSize({ width: 1600, height: 2560 });
  await page.goto('file:///tmp/cover.html');
  await page.screenshot({ path: 'cover.jpg', type: 'jpeg', quality: 90 });
  await browser.close();
})();
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.