Shared instructions and Claude Skill for documentation sites. Gives AI agents consistent guidance across all docs repos.
Install the Cyfrin marketplace, then the claude-docs-prompts skill.
# Open a claude code terminal, and in the claude prompt run:
/plugin marketplace add Cyfrin/claude-docs-prompts
/plugin install claude-docs-prompts@Cyfrin/claude-docs-prompts
# Press Ctrl+C then run claude again. Or type /exit to quit first.
/exit
claude --continue- Consistent docs site structure across all Cyfrin repos
- Enforces required features (PrevNextNav, PageActions, link checker, llms.txt, search index)
- Follows Diataxis framework for content organization
- Technical conventions for MDX, Tailwind CSS, pinned dependencies, and GitHub Actions
Build the PrevNextNav component using config/docs.json
Add the PageActions dropdown to docs pages
Set up the broken link checker script
Generate llms.txt and search index
- Project structure — where to find pages, components, config, and scripts
- PrevNextNav — bottom-of-page navigation driven by
config/docs.json - PageActions — dropdown to copy as markdown, open in Claude, open in ChatGPT
- Edit this page — link to the GitHub edit URL
- Broken link checker —
scripts/check-links.ts+ GitHub Action - llms.txt generation —
scripts/build-llms-txt.tsas prebuild - Search index —
scripts/build-search-index.tsas prebuild - Technical conventions — MDX, Tailwind,
'use client', lucide-react, pinned actions - Content organization — Diataxis framework (quickstart, tutorials, how-tos, reference, explanation)
The original installation method downloads a CLAUDE.md template directly into your repo root via curl.
curl -fsSL https://raw.githubusercontent.com/Cyfrin/claude-docs-prompts/main/install.sh | bashThis does two things:
- Downloads
CLAUDE.mdinto your repo root (updates the template portion, preserves your customizations) - Creates
.docs-config.jsonif it doesn't exist — prompts you for repo-specific values
Pin to a specific version:
curl -fsSL https://raw.githubusercontent.com/Cyfrin/claude-docs-prompts/main/install.sh | bash -s v1.0.0Add this to your package.json:
{
"scripts": {
"update-claude": "curl -fsSL https://raw.githubusercontent.com/Cyfrin/claude-docs-prompts/main/install.sh | bash"
}
}Then run pnpm update-claude whenever you want the latest template.
Add .github/workflows/update-claude-md.yml to auto-update weekly and open a PR:
name: Update CLAUDE.md
on:
schedule:
- cron: "0 9 * * 1" # Every Monday at 9am UTC
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@<sha> # pin to latest
with:
persist-credentials: false
- name: Update CLAUDE.md
run: curl -fsSL https://raw.githubusercontent.com/Cyfrin/claude-docs-prompts/main/install.sh | bash
- name: Create PR if changed
uses: peter-evans/create-pull-request@<sha> # pin to latest
with:
commit-message: "Update CLAUDE.md from claude-docs-prompts"
title: "Update CLAUDE.md template"
branch: update-claude-md
delete-branch: trueRe-run the install command directly. It updates the template section of CLAUDE.md while preserving your local customizations, and leaves .docs-config.json untouched.
The legacy install script creates a .docs-config.json in your repo:
{
"github_repo": "Cyfrin/docs-main",
"github_branch": "main",
"production_url": "https://docs.cyfrin.io",
"site_title": "Cyfrin Docs",
"site_description": "Documentation for Cyfrin"
}| Field | Required | Default |
|---|---|---|
github_repo |
Yes | Inferred from git remote |
github_branch |
No | main |
production_url |
Yes | — |
site_title |
No | Inferred from package.json name |
site_description |
No | — |
Commit this file to version control. It is never overwritten on update.
The CLAUDE.md has a marker line near the bottom:
<!-- LOCAL CUSTOMIZATIONS — everything below this line is preserved on update -->
Add any repo-specific agent instructions below this marker. When you re-run the install script, everything above the marker gets updated to the latest template, and everything below it is preserved.
Patrick Collins and the Cyfrin team.