PageGun Onboarding Skill
The pagegun-onboarding skill guides an AI agent through connecting an existing TypeScript codebase to PageGun Data Mode. It is designed for Claude Code, Codex, Cursor, and similar agent tools that can inspect a local repository, call the PageGun API, and make scoped file changes after approval.
What This Skill Does
- Confirms authentication before any write action
- Lists available PageGun projects and lets the operator choose the target
- Verifies the local repo is TypeScript-based
- Scans reusable components that can become PageGun sections
- Shows a plan before modifying the repo or the PageGun project
- Enables Data Mode and surfaces the one-time
contentKey - Registers custom section types one by one
- Generates local TypeScript types and a starter renderer
- Creates the first subroute for section-based content
- Finishes with a transparency report of API calls and local file changes
When To Use It
Use this skill when you already have a TypeScript codebase with reusable UI components and want an agent to onboard that codebase to PageGun in a controlled way.
It is a good fit for:
- product marketing sites
- docs sites that want custom rendering
- app surfaces that need PageGun-managed content with local rendering
- teams that want an approval checkpoint before code changes
Prerequisites
Before you run the skill, make sure you have:
- a TypeScript project with
typescript, atsconfig.json, or.tsxfiles - a valid
PAGEGUN_API_KEY - reusable presentation components in locations such as
components/,src/components/,app/components/, orfeatures/ - an agent environment with shell access and support for local skills
The 13-Step Workflow
- Confirm authentication. The agent checks that
PAGEGUN_API_KEYis available and stops immediately if it is missing. - Discover projects. The agent lists accessible PageGun projects and waits for the operator to choose the target.
- Verify TypeScript and scan components. The agent confirms the repo shape and identifies reusable display components with stable props.
- Present the execution plan. The agent lists the intended API calls, local file changes, section registrations, and target subroute, then waits for approval.
- Enable Data Mode. The agent enables Data Mode for the selected project and captures the one-time
contentKey. - Record environment guidance. The agent tells the operator where to store the
contentKey, usually in.env.local, without writing secrets into git-tracked files by default. - Generate section schemas. The agent converts selected local components into explicit, serializable PageGun section contracts.
- Register custom sections. The agent registers each custom section through the PageGun API one item at a time.
- Generate local TypeScript definitions. The agent creates local types for the registered sections.
- Generate a local renderer. The agent scaffolds a starter renderer that maps section types to local components.
- Create the first subroute. The agent configures a subroute that can host section-based content.
- Deliver a transparency report. The agent reports every API call it made and every local file it created or changed.
- Offer self-cleanup. The agent can optionally remove the skill after the onboarding run if the operator wants a one-shot setup.
Approval Gate
The skill is intentionally approval-gated. It does not modify application code until the agent has:
- inspected the repo,
- identified likely section candidates,
- chosen the PageGun project, and
- shown the planned changes.
This keeps onboarding predictable for teams that want to review local edits before the agent writes files.
Outputs
After a successful run, you should have the following results.
In PageGun
- Data Mode enabled on the selected project
- one or more custom section types registered
- at least one subroute configured for section-based pages
In your codebase
- local TypeScript definitions for the registered sections
- a starter renderer that can render those section types
For the operator
- immediate guidance to save the one-time
contentKey - a final transparency report with every API call and file change
Security Notes
PAGEGUN_API_KEYmust be supplied by the operator.- The
contentKeyis only shown during enable or regenerate flows. Save it immediately and keep it out of version control. - The skill is designed to stop on missing auth, unsupported repo shape, or validation errors instead of guessing.
- The skill is optimized for TypeScript projects in v1.
Example Prompts
Use the pagegun-onboarding skill to connect this TypeScript repo to PageGun.
List the available projects, scan reusable components, and show me the plan before making any changes.Run the pagegun-onboarding skill for this repo.
Target my docs project, register the best section candidates, create the first subroute, and keep the content key out of git.Result Checklist
- Data Mode enabled
contentKeysaved outside git- first subroute created
- custom sections registered
- local types generated
- starter renderer created