Skip to content

chore(claude): add Claude Code skills for docs2#9

Draft
samgutentag wants to merge 4 commits into
mainfrom
chore/claude-setup
Draft

chore(claude): add Claude Code skills for docs2#9
samgutentag wants to merge 4 commits into
mainfrom
chore/claude-setup

Conversation

@samgutentag
Copy link
Copy Markdown
Member

Summary

Adds .claude/ to docs2 — Claude Code configuration for the new Mintlify docs site. Ported from trunk-io/docs (Docusaurus) with Mintlify adaptations, then consolidated for clarity.

Final skill set: 4 skills + 1 agent.

Skill Purpose
/docs-research Audit existing docs to find gaps, recommend placement, prevent duplicate effort
/outline-docs Scaffold a brand-new .mdx page from scratch
/write-docs Trunk2 refs → draft PR pipeline (with Linear + Slack draft)
/verify-docs-pr Verify a docs PR's feature is actually live in prod

Plus the doc-researcher subagent (Sonnet 4.6) for read-only context fetching.

Mental model: research → write → verify.

What's in this PR

Two commits:

  1. cad58f0 — initial scaffold (+2,332 lines). Copied 6 skills + 1 agent from trunk-io/docs/.claude/ and gutils/claude-code/skills/trunk/, applied Mintlify adaptations:

    • .md.mdx for content refs
    • summary.mddocs.json for nav
    • .gitbook.yaml redirect audit → docs.json redirect audit
    • GitBook {% hint %} → Mintlify <Note> / <Info> / <Tip> / <Warning> / <Check>
    • GitBook [page](path.md "mention") → standard MDX [page](/path)
    • All trunk-io/docs repo refs → trunk-io/docs2
  2. 24838bc — consolidation (+160 / -880 net). After review, the original 6-skill set had naming overlap (review-docs vs. docs-review) and redundancy (draft-docs vs. write-docs direct refs). Consolidated:

    • Dropped draft-docswrite-docs already accepts raw trunk2 refs
    • Dropped review-docs — replaced by trunk check + normal PR review
    • Merged docs-reviewdocs-research — refocused on upstream audits (gaps, placement, dedup) instead of post-hoc quality checks

Files added

  • .claude/agents/doc-researcher.md — read-only research subagent
  • .claude/skills/{docs-research,outline-docs,write-docs,verify-docs-pr}/
  • .claude/drafts/TEMPLATE.md — scaffold for optional batch-mode drafts
  • .claude/settings.json — curated shared permissions baseline
  • .claude/.gitignore — excludes settings.local.json and tmp/
  • .claude/README.md — agents/skills/drafts explainer + skill reference

Test plan

  • Verify each skill loads in a fresh Claude Code session in this repo (/docs-research, /outline-docs, /write-docs, /verify-docs-pr)
  • Run /docs-research "merge queue health" — confirm it reads docs.json, returns a structured report with existing coverage, gaps, and placement suggestions
  • Run /outline-docs with a fake feature — confirm it scaffolds an .mdx (not .md) file and updates docs.json nav
  • Run /write-docs <trunk2-PR-number> end-to-end on a small feature — confirm it produces a draft PR against trunk-io/docs2 (not trunk-io/docs)
  • Run /verify-docs-pr <pr-number> on this PR or a future one — confirm it queries trunk-io/docs2 and posts a verdict comment
  • Confirm doc-researcher agent is discoverable via the Agent tool and returns the expected research-brief shape

🤖 Generated with Claude Code

samgutentag and others added 4 commits May 13, 2026 00:03
Adds Claude Code configuration for the Mintlify-based docs site:

- 1 subagent: doc-researcher (Sonnet 4.6, reads Linear/PRs/docs)
- 6 skills: outline-docs, write-docs, review-docs, draft-docs,
  verify-docs-pr, docs-review
- drafts/TEMPLATE.md as scaffold for new draft notes
- settings.json with curated shared permissions (settings.local.json
  gitignored for per-machine overrides)
- README.md documenting each skill, agent, and the gutils relationship

Skills are ported from trunk-io/docs and ~/Developer/gutils/claude-code
with Mintlify adaptations:

- Filenames .md -> .mdx for content references
- summary.md (Docusaurus nav) -> docs.json (Mintlify nav)
- .gitbook.yaml redirect audit -> docs.json redirects audit
- GitBook {% hint %} blocks -> Mintlify <Note>/<Info>/<Tip>/<Warning>
- GitBook [page](path.md "mention") -> standard MDX [page](/path)
- trunk-io/docs repo refs -> trunk-io/docs2 (verify-docs-pr,
  write-docs/OVERLAP-CHECK.md, write-docs/README.md)
- draft-docs writes directly to .claude/drafts/ (no copy step)
- Removed historical verify-docs-pr/PLAN.md (executed migration plan)
- Fixed duplicate Question block in outline-docs Phase 1

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…/docs-review -> docs-research)

Removes:
- skills/draft-docs/         — write-docs already accepts raw trunk2 refs
- skills/review-docs/        — drop pre-PR local-diff review (rely on
                                trunk check + PR review instead)
- skills/docs-review/        — fold into the new docs-research skill
- skills/verify-docs-pr/
    DESIGN.md                — historical migration artifact

Adds:
- skills/docs-research/      — upstream audit skill that runs before
                                /outline-docs or /write-docs. Identifies
                                gaps in existing coverage, recommends
                                placement for new content, prevents
                                duplicated effort.

Updates:
- .claude/README.md          — new mental model (research / write / verify),
                                skill reference rewritten, drafts section
                                clarified as optional batch scaffolding
- .claude/settings.json      — Skill() permissions match new skill set
- skills/outline-docs/SKILL.md — post-checklist no longer references
                                  /review-docs; points to trunk check
                                  and normal PR review flow

Final skill set: docs-research, outline-docs, write-docs, verify-docs-pr,
plus the doc-researcher subagent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The OVERLAP-CHECK Phase 0 in write-docs only checked GitHub for
existing/conflicting docs PRs. Adds Step 3: search Linear for an
existing planning ticket using the same Trunk Engineering team ID
the DevRel scanner uses, ask the user before duplicating.

Closes the gap surfaced by mapping the daily DevRel scanner against
the consolidated docs2 skill set: scheduled automation already
dedups against Linear in its own pipeline, but a manual
/write-docs invocation could still file a duplicate ticket.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reflects the OVERLAP-CHECK Phase 0 addition from commit 4302521.
Phase 5 also mentions linking the existing ticket from Phase 0
rather than always creating a new one.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant