Skip to content

Commit f153fab

Browse files
chore: add contributing router skill, consolidate authoring skills (#31501)
* [Chore] Add contributing router skill, consolidate authoring skills Introduce .agents/skills/contributing as the single entry point for contributing to the docs. It routes to task-specific references and absorbs the pr, changelog, docs-review, and code-review skills. - Add SKILL.md router with ground rules, intake, task index, validation - Add writing-docs, content-types, choosing-components, and information-architecture references - Move pr/changelog/docs-review/code-review into contributing/references - Remove the changelog, pr, review-code-examples, and styleguide commands and their dangling symlinks; adopt a skill-first approach - Update AGENTS.md to document the contributing skill * style: format * [Chore] Broaden contributing skill description to trigger on PR actions * [Chore] Add PR-sync guidance to pr.md; keep ground rules minimal * [Chore] Tighten contributing skill: delegate style rules, refine safety wording * [Chore] Make component selection exhaustive; add Type/MetaInfo, Icon, RSSButton, Example to catalog * style: format * [Chore] Align component catalog with styleGuide.component sync check --------- Co-authored-by: cloudflare-docs-bot[bot] <cloudflare-docs-bot[bot]@users.noreply.github.com>
1 parent 7a6ecfe commit f153fab

21 files changed

Lines changed: 548 additions & 208 deletions

‎.agents/commands/changelog.md‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎.agents/commands/pr.md‎

Lines changed: 0 additions & 61 deletions
This file was deleted.

‎.agents/commands/review-code-examples.md‎

Lines changed: 0 additions & 19 deletions
This file was deleted.

‎.agents/commands/styleguide.md‎

Lines changed: 0 additions & 59 deletions
This file was deleted.

‎.agents/references/components.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,3 +870,34 @@ import { AvailableNotifications } from "~/components";
870870
```
871871

872872
Props: `product` (required, product name or slug), `notificationFilter` (optional, filter to a specific notification type by name).
873+
874+
---
875+
876+
## Type / MetaInfo
877+
878+
Inline annotations for documenting parameters, fields, and properties — used heavily on API and reference pages. `Type` renders a pill-shaped data-type badge; `MetaInfo` renders a metadata annotation (constraints, defaults).
879+
880+
```mdx
881+
import { Type, MetaInfo } from "~/components";
882+
883+
- `name` <Type text="string" />
884+
- The name of your service.
885+
- `local` <Type text="boolean" /> <MetaInfo text="(default: true) optional" />
886+
- If the service should run locally or not.
887+
```
888+
889+
Props: both take a single `text` string. Use `Type` for data types (`string`, `boolean`, `Promise<T>`); use `MetaInfo` for constraints and defaults (`required`, `optional`, `read-only`, `(default: false)`).
890+
891+
---
892+
893+
## Example
894+
895+
Wraps content in a styled box to set it apart from the surrounding prose — useful for showcasing a sample without it blending into the page.
896+
897+
```mdx
898+
import { Example } from "~/components";
899+
900+
<Example title="Hello world">Hello, world!</Example>
901+
```
902+
903+
Props: `title` (optional string, customizes the box's title).
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
name: contributing
3+
description: The entry point for ANY contribution to the Cloudflare Docs repository (developers.cloudflare.com). Load this whenever working on the docs repo: creating, editing, or adding documentation pages, partials, images, or changelog entries; choosing a content type or component; deciding where content belongs; reviewing docs or code examples; or learning how to contribute. ALSO load this for ANY pull request action — creating, opening, submitting, updating, or editing a PR, or writing a PR title or description. This skill is a router that dispatches to task-specific references (writing docs, PRs, changelogs, reviews, components, style).
4+
---
5+
6+
# Contributing to Cloudflare Docs
7+
8+
This is the single skill to load for any change to the Cloudflare Docs repository. It does not contain the detail itself — it routes you to the right reference for the task in front of you. Read the reference that matches your task, then follow it.
9+
10+
Do not guess at conventions. The references below are the source of truth for how this repo expects content to be written, structured, and validated.
11+
12+
## Ground rules
13+
14+
These apply to every task below.
15+
16+
- **This is an open-source, public repository.** Never put private Cloudflare information, secrets, credentials, internal URLs, or environment variable values into pages, code examples, commits, pull requests, comments, or anywhere else in this repository. If there is any doubt — even slight — about whether something is safe to publish, stop and ask the user.
17+
- **Branch off the latest `production`.** Before starting work, create your branch from an up-to-date `production` commit (`git fetch origin` then branch from `origin/production`), unless the user asks for a different base. This repo's default branch is `production`, not `main`.
18+
- **Never commit or push automatically.** Make the file changes, then ask the user whether they want to commit and push. Do not run `git commit` or `git push` unprompted.
19+
20+
## Before you start: gather context
21+
22+
When the source material is thin or ambiguous, pause and ask the user before writing. You need enough to write something accurate, not just well-formatted. Ask for whatever is missing:
23+
24+
- **Source of truth** — a PR, RFC, engineering spec, API schema, existing page, or product owner to verify behavior against. Do not invent technical claims.
25+
- **Product and feature area** — which Cloudflare product, and where in that product the change belongs.
26+
- **Audience and intent** — who reads this and what they are trying to do (get started, look something up, follow a procedure, understand a concept).
27+
- **Availability** — plan availability (Free/Pro/Business/Enterprise) and lifecycle status (GA, Beta, Alpha).
28+
- **Scope** — is this a new page, an edit, a restructure, or a changelog entry.
29+
30+
If the user already provided a clear spec or PR, proceed without interrogating them.
31+
32+
## Task index
33+
34+
Find your task and read the listed reference(s). Paths are relative to this skill directory unless prefixed with `.agents/`.
35+
36+
| Your task | Read |
37+
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
38+
| Write or edit a documentation page | `references/writing-docs.md` (the authoring workflow — start here) |
39+
| Decide which `pcx_content_type` and page shape | `references/content-types.md` |
40+
| Decide how to present data / which component | `references/choosing-components.md` |
41+
| Decide where a page belongs, redirects, reuse | `references/information-architecture.md` |
42+
| Look up writing and formatting rules | `.agents/references/style-guide.md` (canonical) and `.agents/references/procedures.md` for step-by-steps |
43+
| Look up a component's props and examples | `.agents/references/components.md` |
44+
| Add or edit a changelog entry | `references/changelog.md` |
45+
| Review docs / post PR suggestions | `references/reviewing-docs.md` |
46+
| Review the code examples in docs | `references/code-review/index.md` |
47+
| Create or edit a pull request | `references/pr.md` |
48+
49+
The authoring workflow in `references/writing-docs.md` ties these together: gather context → locate where the page belongs → pick a content type → draft against the style guide → choose components for each piece of data → validate → open a PR.
50+
51+
## Validate before you finish
52+
53+
Run validation after any content change. Match the command set to your environment — a full build is local-only.
54+
55+
```bash
56+
pnpm run check # Type-check: validates frontmatter schemas + Astro types
57+
pnpm run build # Full build: validates MDX parsing, image paths, internal links — LOCAL ONLY (times out in CI)
58+
pnpm run format # Auto-fix Prettier formatting on edited files
59+
```
60+
61+
In CI (`CI=true`), skip `pnpm run build`; run `pnpm run check`, `pnpm run lint`, and `pnpm run format:core:check` only.
62+
63+
If you modified `public/__redirects`, also run:
64+
65+
```bash
66+
pnpm exec tsm bin/validate-redirects.ts
67+
```
68+
69+
Always run `pnpm run format` on files you touched — CI fails on unformatted content.

.agents/skills/changelog/SKILL.md renamed to .agents/skills/contributing/references/changelog.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
---
2-
name: changelog
3-
description: Creates, updates, and reviews product changelog entries for the Cloudflare documentation site. Load when generating changelog MDX files, editing existing entries, reviewing changelog style, or validating frontmatter.
4-
---
1+
# Changelog Entries
52

6-
Use this skill when creating, editing, or reviewing changelog entries under `src/content/changelog/`.
3+
Use this reference when creating, editing, or reviewing changelog entries under `src/content/changelog/`.
74

85
**Style reference:** `.agents/references/style-guide.md` contains the canonical rules for writing style, formatting, links, code blocks, and frontmatter. The changelog-specific additions below extend those rules — they do not replace them.
96

0 commit comments

Comments
 (0)