open-press

Skill

openpress-create-pages

Create page-based OpenPress artifacts: reports, proposals, books, class notes, whitepapers, and other fixed-page documents.

Skill Impl

# openpress-create-pages

Create page-based OpenPress artifacts such as reports, proposals, or whitepapers.

skills/openpress-create-pages/SKILL.md

This document explains how to use the openpress-create-pages skill to create fixed-page projects.

Step 1: Environment Check

Before starting, please ensure your environment has Node.js 20 or newer installed, along with npm and npx.

Step 2: Initialize Workspace (For New Projects Only)

If you are creating a completely new project environment, run this first:

npm create @open-press@latest <your-project-name> -- --type pages

If you are adding a document to an existing workspace, scaffold only the new Press:

open-press create <slug> --type pages --title "<title>"

Step 3: Generate Page Structure with the Skill

Call the Agent or run the openpress-create-pages workflow. Please provide the following information to generate the structure:

  • Artifact type (e.g., report, proposal)
  • Target audience and title
  • Page size (e.g., a4)

This operation will create a Press Tree containing MDX sources, page components, and the first topic file.

For example, the generated Press structure will look like this:

<Press
  slug="proposal"
  title="Investor Proposal"
  page="a4"
  sources={[
    mdxSource({ id: "proposal", preset: "section-folders", root: "proposal/chapters" }),
  ]}
>
  <Cover />
  <Toc source="proposal" maxLevel={2} />
  <Sections source="proposal" />
  <BackCover />
</Press>

Step 4: Force a Page Break When Needed

When automatic pagination cannot express an author’s explicit page boundary, place <PageBreak /> immediately before the content that should start on a new page:

This content ends the current page.

<PageBreak />

## Start on a new page

PageBreak accepts no props or children and produces no visible content. Do not simulate it with empty paragraphs, spacers, or increasingly specific CSS rules.

Step 5: Validate Structure

Once the structure is generated, please run the build command to ensure all files and configurations are correct:

npm run build

Note: If you need to create a presentation, refer to using openpress-create-slide. If deployment is needed, use openpress-deploy after confirmation.