feat(skills): add shared Cursor agent skills#7
Open
lucas-tortora wants to merge 1 commit into
Open
Conversation
…h writing, and frontmatter review
Adds .cursor/skills/ shipping four project-level Cursor agent skills that
enforce Tether's documentation standards on any repo derived from this
template:
- diataxis: classify each MDX page as tutorial / how-to / reference /
explanation, enforce mode-specific structure and voice, align with
docType in @tetherto/docs-seo-schema.
- google-tech-writing: Google developer documentation style guide
(active voice, second person, present tense, sentence-case headings,
banned filler, tiered review severity).
- docs-frontmatter: SEO frontmatter contract (description, docType,
ogImage, noIndex, lastModified) mirroring tetherSeoFrontmatterSchema.
- docs-review: orchestrator running the three skills above against a
file list or PR diff and emitting a single tiered report
(must-fix / consider / nit).
Cursor reads project skills from .cursor/skills/ automatically. To pull
updates from this repo into a consumer repo, three flows are documented
(tiged, npm run sync-skills, git subtree).
Adds scripts/sync-skills.mjs + npm run sync-skills for the second flow:
- spawnSync (no shell-quoting risks) with explicit error paths for
missing git binary, raw commit SHAs in --branch, and other failures.
- Refuses to run inside docs-template itself (package-name + git-remote
cross-check) so the source of truth cannot self-overwrite.
- Refuses to clobber dirty .cursor/skills/ in a consumer repo unless
--force is passed, so contributors do not lose local edits.
Replaces the placeholder content/docs/about/about.mdx with a real
Diataxis explanation page (content/docs/explanation/explanation.mdx,
"Why DOCS is a template, not a SaaS"), and updates index.mdx,
custom-tree.ts, and the three sibling section landings to match. Drops
the accent on "Diátaxis" -> "Diataxis" across content/docs and the
schema's warn message for consistency.
Top-level README gains a "Documentation skills" section with a skill
table and a repository-layout bullet pointing at .cursor/skills/.
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
.cursor/skills/directory shipping four project-level Cursor agent skills that enforce Tether's documentation standards on any repo derived from this template, plus a sync script and a small content rename so the template's own docs follow the new Diataxis layout.The four skills:
diataxisdocTypein@tetherto/docs-seo-schema.google-tech-writingdocs-frontmatter@tetherto/docs-seo-schema: requireddescription, recommendeddocTypematching directory, and optionalogImage,noIndex,lastModified.docs-reviewCursor reads project skills from
.cursor/skills/automatically — no install step. Three sync flows for consumer repos are documented in.cursor/skills/README.md:tiged,npm run sync-skills, orgit subtree.What's in the change
.cursor/skills/{diataxis,google-tech-writing,docs-frontmatter,docs-review}/(aSKILL.mdper skill plus supporting.mdfiles for progressive-disclosure depth content), plus.cursor/skills/README.mddocumenting the sync flows and authoring conventions.scripts/sync-skills.mjs+npm run sync-skills. UsesspawnSync(no shell-quoting risks). Surfaces actionable errors on missinggitbinary, raw commit SHAs in--branch, and other failure paths. Refuses to run insidedocs-templateitself via a package-name + git-remote cross-check, so the source of truth cannot self-overwrite. Refuses to clobber a dirty.cursor/skills/in a consumer repo unless--forceis passed, so contributors do not lose local edits.content/docs/about/about.mdxwith a real Diataxis explanation page atcontent/docs/explanation/explanation.mdx("Why DOCS is a template, not a SaaS"). Updatecontent/docs/index.mdx,src/lib/custom-tree.ts, and the three sibling section landings to match. Drop the accent on "Diátaxis" → "Diataxis" acrosscontent/docs/**and the schema's warn message for consistency..cursor/skills/.package.json—sync-skillsscript added; lifecycle scripts grouped (dev, build family,postinstall, runtime, automation).Design notes
description.max(200)intetherSeoFrontmatterSchema. That was reverted to keep the schema package source byte-identical with the published@tetherto/docs-seo-schema@1.1.0, so the publish workflow'snpm view <pkg>@<version>short-circuit stays correct and consumers do not need to coordinate. The 200-char guidance is now advisory in thedocs-frontmatterskill.SKILL.mdfollows the rules it enforces (active voice, sentence-case headings, no banned filler, parallel lists). Templates insidetutorial.md,how-to.md,reference.md, anddocs-review/SKILL.mduse 4-backtick outer fences to render correctly with their nested 3-backtick inner code blocks.scripts/sync-skills.mjsonly imports Node built-ins (node:child_process,node:fs,node:os,node:path,node:process).Test plan
tsc --noEmitclean inpackages/docs-seo-schema.node scripts/sync-skills.mjs --helplists--forceand prints help cleanly.node scripts/sync-skills.mjs --dry-runinsidedocs-templateexits 2 with the self-overwrite refusal message (validates the package-name + git-remote guard).descriptionfrontmatter values render as before; noDiátaxisleft in the tree (grepreturns 0 matches).SKILL.mdfiles use Cursor's frontmatter format (name,descriptionas a folded scalar with concrete trigger conditions).tutorial.md,how-to.md,reference.md, anddocs-review/SKILL.md: 4-backtick outer fences wrap the inner 3-backtick code samples, so each template renders intact.npm run check-linksand any existing PR-level CI.README.md,.cursor/skills/README.md) and the explanation page resolve correctly.Rollout
main. Cursor immediately picks up the new skills for anyone working in this repo.v1.x.y) when ready to roll out to consumer repos.npm run sync-skills -- --ref=v1.x.y(Option B) orgit subtree pull(Option C) to pull in the new skills.npm run sync-skillsfollowed bygit diff --exit-code .cursor/skills/.Reviewer guidance
Most of the diff is documentation. The non-doc surface is small and worth reviewing first:
scripts/sync-skills.mjs(~200 lines, all new)package.json(script added + lifecycle reorder)src/lib/custom-tree.ts(sidebar rename only)packages/docs-seo-schema/src/index.ts(one-line accent change in a warn string; otherwise unchanged on this branch)After that, the four
SKILL.mdfiles are the spec the agent reads at runtime; the supporting.mdfiles (e.g.tutorial.md,examples.md,checklist.md) are progressive-disclosure depth that the agent only reads when working in the relevant mode.