Skip to content

Surface agent skills on the Diffs and Trees sites - #1078

Merged
mdo merged 5 commits into
mainfrom
docs/surface-agent-skills
Aug 18, 2026
Merged

Surface agent skills on the Diffs and Trees sites#1078
mdo merged 5 commits into
mainfrom
docs/surface-agent-skills

Conversation

@mdo

@mdo mdo commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
  • Adds a "For Agents" button to the Diffs and Trees heroes, opening a menu with the npx skills add command, a paste-ready prompt for agents without skill support, and a link to the skills.sh listing. Copying leaves the menu open so both can be taken in one visit.
  • Adds a "Build with agents" docs section to both sites, covering the skill install command, the paste-ready prompt, and the plain-text docs. It sits near the top of the sidebar rather than buried under Installation (Diffs) or Overview (Trees). Also registered with the llms.txt generator, which walks an explicit section list rather than the directory.
  • Adds skillUrl, skillInstallCommand, and a getAgentPrompt helper to the product config, so the skill location lives in one place.
  • Extracts a shared CopyStateIcon so the install button and the menu rows confirm a copy identically. Both icons stay mounted and stacked in a fixed box, and the check pops in on the Bootstrap checkbox timing.
  • The pop transition names the scale property rather than transform, since Tailwind v4 emits scale utilities on standalone scale and leaves transform as none — naming transform animates nothing and the size snaps.
  • Folds h-11 rounded-lg px-5 text-sm md:h-12 md:text-base into the xl button size. Every hero button already overrode the variant with exactly these, so its own rounded-md px-7 never rendered anywhere.
  • EditHero pins md:h-[auto] md:text-sm to opt out of the now-responsive xl. It strips sizing with an unqualified h-[auto], and tailwind-merge only reconciles utilities sharing a modifier, so that would not have suppressed the new md:h-12.
  • The menu centers under the trigger below 460px, where the hero buttons stack full width, and left-aligns once they sit inline. Verified at both widths.

Worth a look in review: the install button is now a default-variant Button rather than the hand-rolled bg-neutral-900 element, and it no longer carries a "Copy to clipboard" tooltip.

mdo added 4 commits August 17, 2026 12:56
Each product now knows where its published agent skill lives and how to
install it, so the site can point people at the skill instead of leaving
them to find it on skills.sh by hand.

Add `skillUrl` and `skillInstallCommand` to the product config, and a
`getAgentPrompt` helper that builds a paste-ready prompt: install the
skill through the Skills CLI, then read the docs and `llms-full.txt`.
Nothing consumes these yet.
Someone reading the Diffs install page or the Trees overview had no way
to discover that we publish an agent skill for the package. They now get
a short "Agent skill" section with the `npx skills add` command, a link
to the skills.sh listing, and a pointer to `llms.txt` for agents that
read plain text instead.

Add the install command as a docs code example in each section's
constants and wire it through the MDX scope, so it copies and renders
like every other snippet on the page.
Every hero button asked for `size="xl"` and then overrode it with the
same `h-11 rounded-lg px-5 text-sm md:h-12 md:text-base`, so the size's
own `rounded-md px-7` never actually rendered anywhere. Move those
styles onto the variant so call sites can just ask for the size.

The xl size now grows at the `md` breakpoint. `EditHero` opts out of
that: it strips its own sizing with an unqualified `h-[auto]`, and
tailwind-merge only reconciles utilities that share a modifier, so a
bare `h-[auto]` does not suppress the new `md:h-12`. Pin `md:h-[auto]`
and `md:text-sm` there to hold its current rendering.
The Diffs and Trees heroes gain a "For Agents" button next to the
install command. Opening it offers the Skills CLI command that installs
the package's agent skill, a paste-ready prompt for agents with no skill
support, and a link to the skills.sh listing. Copying leaves the menu
open, so both the command and the prompt can be taken in one visit.

Extract the copy affordance into a shared `CopyStateIcon` so the install
button and the menu rows confirm the same way. Both icons stay mounted
and stacked in a fixed box, and the check pops in on the timing the
Bootstrap checkbox mark uses. The transition names the `scale` property
rather than `transform`, because Tailwind v4 emits scale utilities on
standalone `scale` and leaves `transform` as `none`.

The menu centers under the trigger below the breakpoint where the hero
buttons stack full width, and left-aligns once they sit inline.
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pierre-docs-diffs Ready Ready Preview Aug 17, 2026 10:06pm
pierre-docs-diffshub Ready Ready Preview Aug 17, 2026 10:06pm
pierre-docs-trees Ready Ready Preview Aug 17, 2026 10:06pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
pierrejs-diff-demo Skipped Skipped Aug 17, 2026 10:06pm

Request Review

The agent skill was a subsection of Installation on Diffs and Overview on
Trees, which buried it and left no room to cover anything beyond the install
command. Promote it to its own top-level section on both sites so the skill,
a paste-ready prompt for agents without skill support, and the plain-text
docs sit together near the top of the sidebar.

Register the section with the llms.txt generator as well. That script works
off an explicit section list rather than the directory, so without this the
new page would be missing from llms.txt and llms-full.txt.
@mdo
mdo merged commit 8fe0f55 into main Aug 18, 2026
8 checks passed
@mdo
mdo deleted the docs/surface-agent-skills branch August 18, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants