home / skills / open-circle / valibot / repo-website-guide-create

repo-website-guide-create skill

/skills/repo-website-guide-create

This skill helps you create well-structured guide pages for the Valibot website, covering categories, MDX templates, and frontmatter.

npx playbooks add skill open-circle/valibot --skill repo-website-guide-create

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.3 KB
---
name: repo-website-guide-create
description: Create conceptual documentation and tutorial pages for the Valibot website at website/src/routes/guides/. Use when adding guides about schemas, pipelines, async validation, migration, or other topics. Covers directory structure, MDX templates, frontmatter, and content guidelines.
---

# Adding Guides to Website

Guide for creating conceptual documentation at `website/src/routes/guides/`.

## Directory Structure

```
website/src/routes/guides/
├── menu.md                    # Navigation menu
├── (get-started)/             # Intro, installation, quick start
├── (main-concepts)/           # Schemas, pipelines, parsing
├── (schemas)/                 # Objects, arrays, unions
├── (advanced)/                # Async, i18n, JSON Schema
├── (migration)/               # Version upgrades, Zod migration
└── (category)/guide-slug/
    └── index.mdx              # Guide content
```

Note: Category folders use parentheses (Qwik route grouping).

## Process

1. Review 2-3 existing guides in the target category to understand style
2. Choose category from existing or create new
3. Create folder: `(category)/guide-slug/`
4. Create `index.mdx` with content
5. Update `menu.md`

## index.mdx Template

```mdx
---
title: Guide Title
description: >-
  A concise description of what this guide covers.
contributors:
  - github-username
---

import { ApiList, Link } from '~/components';

# Guide Title

Opening paragraph explaining what the reader will learn.

## Section Heading

Content with clear, concise language.

\`\`\`ts
import \* as v from 'valibot';

const Schema = v.object({
name: v.string(),
email: v.pipe(v.string(), v.email()),
});
\`\`\`

## Another Section

Continue with additional sections as needed.

Use <Link href="/api/pipe/">\`pipe\`</Link> for internal links.
```

## Frontmatter

Required fields:

- **title**: Page title and navigation label
- **description**: SEO description (use `>-` for multi-line)
- **contributors**: Array of GitHub usernames

## Content Guidelines

### Code Examples

- Use TypeScript (`ts` language)
- Import as `import * as v from 'valibot';`
- Include comments for complex code

### Links

Internal links use the `Link` component:

```mdx
<Link href="/guides/schemas/">schemas guide</Link>
<Link href="/api/pipe/">\`pipe\`</Link>
```

### Components

```mdx
<ApiList label="Related schemas" items={['object', 'array', 'string']} />
```

### Formatting

- `inline code` for API names, variables, file names
- **bold** for emphasis
- Proper heading hierarchy (h1 title, h2 sections, h3 subsections)

### Images

Place images in the same folder as `index.mdx`:

```mdx
![Alt text](./diagram-light.jpg)
```

Consider light/dark theme variants if applicable (e.g., `diagram-light.jpg`, `diagram-dark.jpg`).

## Update menu.md

Add to `/website/src/routes/guides/menu.md`:

```markdown
## Category Name

- [Existing Guide](/guides/existing/)
- [New Guide Title](/guides/guide-slug/)
```

Maintain logical ordering within categories.

## Checklist

- [ ] Reviewed existing guides in the same category
- [ ] Folder structure: `(category)/guide-slug/index.mdx`
- [ ] Frontmatter: title, description, contributors
- [ ] Internal links use `Link` component
- [ ] Code examples use `import * as v from 'valibot';`
- [ ] Added to `menu.md`
- [ ] Style matches existing guides

Overview

This skill creates conceptual documentation and tutorial pages for the Valibot website under website/src/routes/guides/. It provides a consistent folder layout, MDX template, frontmatter rules, and content guidelines so new guides match the site's style, structure, and SEO needs.

How this skill works

Follow the prescribed process: pick or create a category, add a parenthesized folder (Qwik route grouping), create an index.mdx using the template, and update menu.md. The MDX template includes required frontmatter fields, importable components, TypeScript code blocks, and examples for images and internal links.

When to use it

  • Adding a new conceptual guide about schemas, parsing, pipelines, or async validation
  • Documenting migration steps or compatibility notes between versions
  • Creating tutorials that teach a workflow (e.g., building a schema pipeline)
  • Adding diagrams or asset-backed explanations that need local images
  • Extending site navigation with new topic categories or ordering

Best practices

  • Review 2–3 existing guides in the same category to match tone and structure
  • Use a category folder formatted with parentheses, e.g., (schemas)/guide-slug
  • Provide frontmatter: title, description (use >- for multi-line), and contributors
  • Write TypeScript blocks and import APIs as import * as v from 'valibot';
  • Use the Link component for internal links and ApiList for related API items
  • Keep headings hierarchical: H1 for title, H2 for major sections, H3 for subsections

Example use cases

  • Create a migration guide explaining breaking changes and code transforms
  • Write a tutorial showing how to build and compose schema pipelines
  • Document async validation patterns and examples with comments
  • Add a conceptual page that explains parsing internals with diagrams
  • Publish a 'getting started' quick start guide with installation and examples

FAQ

What frontmatter fields are mandatory?

title, description (use >- for multi-line), and contributors (array of GitHub usernames) are required.

How should code examples be formatted?

Use ts code blocks, import APIs with import * as v from 'valibot'; and add comments for complex snippets.

How do I add images?

Place images in the same folder as index.mdx and reference them with relative paths; include light/dark variants if needed.