All skills
softaworks avatar

/marp-slide

@1c0662a
by softaworkssoftaworks/agent-toolkit2.5k stars
230

Create professional Marp presentation slides with 7 beautiful themes (default, minimal, colorful, dark, gradient, tech, business). Use when users request slide creation, presentations, or Marp documents. Supports custom themes, image layouts, and "make it look good" requests with automatic quality improvements.

Use this Skill: https://skilld.dev/gh/softaworks/agent-toolkit/marp-slide

This session only. Nothing lands on disk.

referencestheme-css-guide.md

≈1.4k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Marp Theme CSS Creation Guide

How to create custom themes based on the official Marpit theme CSS specification.

Official documentation: https://marpit.marp.app/theme-css

Basic Theme Structure

@theme Metadata (Required)

Theme CSS requires @theme metadata:

/* @theme theme-name */

Without this metadata, it won't be recognized as a theme.

Basic Theme CSS Example

/* @theme my-theme */

section {
  background-color: #fff;
  color: #333;
  font-size: 24px;
  padding: 60px;
}

h1 {
  color: #1e40af;
  font-size: 48px;
}

h2 {
  color: #3b82f6;
  font-size: 36px;
}

HTML Structure

HTML structure generated by Marp:

<section>
  <h1>Slide Title</h1>
  <p>Content</p>
</section>

Each slide is generated as a <section> element.

Slide Size

Default Size

section {
  width: 1280px;
  height: 720px;
}

16:9 ratio (1280x720) is the default.

Custom Size Definition

/* @theme my-theme */
/* @size 4:3 960px 720px */

section {
  width: 960px;
  height: 720px;
}

Custom sizes can be defined with @size metadata.

Pagination

Styling page numbers:

section::after {
  content: attr(data-marpit-pagination) ' / ' attr(data-marpit-pagination-total);
  position: absolute;
  right: 30px;
  bottom: 20px;
  font-size: 16px;
  color: #666;
}

Available attributes:

  • data-marpit-pagination - Current page number
  • data-marpit-pagination-total - Total page count

Headers and Footers

Header

header {
  position: absolute;
  top: 30px;
  left: 60px;
  right: 60px;
  font-size: 18px;
  color: #666;
}

Footer

footer {
  position: absolute;
  bottom: 30px;
  left: 60px;
  right: 60px;
  font-size: 18px;
  color: #666;
}

Theme Extension and Inheritance

Loading with @import

/* @theme my-extended-theme */

@import 'default';

section {
  background-color: #f0f0f0;
}

You can extend existing themes.

Inheriting Named Themes with @import-theme

/* @theme my-theme */

@import-theme 'default';

h1 {
  color: red;
}

Using @import-theme allows loading by theme name.

Class-Based Variations

lead Class (Title Slide)

section.lead {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

section.lead h1 {
  font-size: 64px;
}

invert Class (Inverted Colors)

section.invert {
  background-color: #000;
  color: #fff;
}

section.invert h1,
section.invert h2 {
  color: #fff;
}

Scoped Style (Slide-Specific Styles)

Use <style scoped> in Markdown:

<style scoped>
section {
  background-color: #e3f2fd;
}
</style>

# Only this slide has blue background

Background Image Styling

Background images are processed automatically but can be adjusted with CSS:

section[data-marpit-background-image] {
  background-size: cover;
  background-position: center;
}

Math Formula Styling (Marp Core)

.katex {
  font-size: 1.2em;
}

.katex-display {
  margin: 1em 0;
}

List Styling

ul, ol {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

li {
  margin: 0.3em 0;
}

li::marker {
  color: #3b82f6;
}

Table Styling

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}

th, td {
  border: 1px solid #ddd;
  padding: 0.5em 1em;
  text-align: left;
}

th {
  background-color: #f0f0f0;
  font-weight: bold;
}

Code Block Styling

pre {
  background-color: #f5f5f5;
  border-radius: 4px;
  padding: 1em;
  overflow-x: auto;
}

code {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

pre code {
  background-color: transparent;
  padding: 0;
}

Responsive Design

@media screen and (max-width: 1280px) {
  section {
    font-size: 20px;
  }

  h1 {
    font-size: 40px;
  }
}

Practical Theme Examples

Minimal Theme

/* @theme minimal */

section {
  background-color: #ffffff;
  color: #333333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 24px;
  padding: 80px;
}

h1, h2, h3 {
  font-weight: 300;
  color: #000000;
}

h1 {
  font-size: 60px;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 40px;
  margin-bottom: 0.5em;
}

Dark Theme

/* @theme dark */

section {
  background-color: #1a1a1a;
  color: #e0e0e0;
  font-size: 22px;
  padding: 60px;
}

h1, h2, h3 {
  color: #61dafb;
}

a {
  color: #61dafb;
}

code {
  background-color: #2d2d2d;
  color: #61dafb;
}

Embedding Styles in Markdown

---
marp: true
---

<style>
section {
  background-color: #f8f8f4;
  font-family: 'Noto Sans JP', sans-serif;
}

h1 {
  color: #4f86c6;
}
</style>

# Slide

This method allows applying custom styles without using a theme.

Best Practices

  1. Ensure Contrast: Maintain a contrast ratio of 4.5:1 or higher between background and text colors
  2. Appropriate Font Sizes: Body text 22-24px, titles 40-60px
  3. Sufficient Spacing: Recommended padding of 60px or more
  4. Fallback Fonts: Specify system fonts for when web fonts fail to load
  5. Print Support: Define print styles with @media print

Official References

For details, refer to official documentation:

Source: SKILL.md on GitHub

No alerts17d5 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    The Marp Slide Creator skill is a well-documented and functional tool for generating professional presentation slides using the Marp Markdown format. It includes 7 pre-designed themes with embedded CSS and detailed reference guides for syntax and best practices. The skill only performs file-writing operations to a designated output directory and does not engage in suspicious network activity, command execution, or data harvesting. All external references target well-known and trusted services like Google Fonts.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer7mo

    23 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 1c0662a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 9 months ago
  • marp
  • presentations
  • slides
  • markdown
  • themes
  • typography
  • visual-design

README badge

README badge for softaworks/agent-toolkit/marp-slide

Creates professional Marp presentation slides with 7 pre-designed themes (default, minimal, colorful, dark, gradient, tech, business) and embedded CSS. Use when users request slide creation or ask to "make slides look good" with automatic theme selection and best-practice formatting.

Generated from the current SKILL.md.

How many themes does this skill provide?
Seven themes: default, minimal, colorful, dark, gradient, tech, and business. Each has a corresponding template file with embedded CSS.
Can I use custom themes or modify the built-in ones?
Yes. The skill references `theme-css-guide.md` for creating custom themes based on Marpit specification, and CSS files are included for reference.
Does this skill support images in slides?
Yes. It includes image patterns from the official Marpit image syntax, supporting side images, centered images, full backgrounds, and multiple images per slide.
What file format does this skill output?
Markdown files (.md) saved to `/mnt/user-data/outputs/`. The files contain embedded CSS and are ready to use with Marp.
Does this handle vague design requests like 'make it look good'?
Yes. The skill infers an appropriate theme from content type and applies best practices automatically, such as shortening titles and limiting bullet points.

Generated from the current SKILL.md. These answers refresh after source changes.