-
Notifications
You must be signed in to change notification settings - Fork 7
docs: add custom agent skills hosting to Agent skills page #5757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
000e3a6
docs: add Agent Skills documentation page
devin-ai-integration[bot] 54c5975
docs: fix manifest format descriptions and use plant-themed examples
devin-ai-integration[bot] e91b77b
docs: add page-actions.options.skills config and cross-reference
devin-ai-integration[bot] 3f30a16
docs: add changelog entries for agent skills hosting and install-skil…
devin-ai-integration[bot] f88cfa9
docs: add install skills modal config section to agent-skills page
devin-ai-integration[bot] fef0c1c
docs: restructure agent-skills page — lead with docs.yml config, well…
devin-ai-integration[bot] 9c0ec20
structural edits for clarity
devalog 943789c
Merge branch 'main' into devin/1781112454-agent-skills-docs
devalog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,127 @@ | ||
| --- | ||
| title: Custom skills | ||
| description: Serve author-supplied agent skills from your Fern docs site and configure the Install skills button. | ||
| availability: beta | ||
| --- | ||
|
|
||
| Fern Docs sites can serve your own [Agent Skills](https://www.skills.sh) so your users can discover and install them with the [skills CLI](https://www.skills.sh). You can also add an "Install skills" button to your docs UI that opens a modal with the install command and your skill list. | ||
|
|
||
| <Note> | ||
| This is separate from installing Fern's own [`fern-docs` skill](/learn/docs/ai-features/agent-skills) into your agent. | ||
| </Note> | ||
|
|
||
| <Steps toc={true} tocDepth={2}> | ||
| <Step title="Lay out the bundle"> | ||
|
|
||
| Place your skills in your `fern/` folder under `.well-known/agent-skills/` (the current v0.2.0 spec) or `.well-known/skills/` (the legacy v0.1.0 layout). Both are supported and can coexist. Each skill is a subdirectory holding at least a `SKILL.md`, with optional supporting files alongside it. | ||
|
|
||
| <Files> | ||
| <Folder name="fern" defaultOpen> | ||
| <File name="docs.yml" /> | ||
| <Folder name=".well-known" defaultOpen> | ||
| <Folder name="agent-skills" defaultOpen> | ||
| <File name="index.json" comment="discovery manifest (required)" /> | ||
| <Folder name="plant-care" defaultOpen> | ||
| <File name="SKILL.md" comment="skill instructions" /> | ||
| </Folder> | ||
| <Folder name="garden-planner" defaultOpen> | ||
| <File name="SKILL.md" /> | ||
| <Folder name="references" defaultOpen> | ||
| <File name="api.md" comment="supporting files (optional)" /> | ||
| </Folder> | ||
| </Folder> | ||
| </Folder> | ||
| </Folder> | ||
| </Folder> | ||
| </Files> | ||
|
|
||
| </Step> | ||
| <Step title="Write each SKILL.md"> | ||
|
|
||
| Each `SKILL.md` needs YAML frontmatter with `name` and `description`, following the [Agent Skills spec](https://agentskills.io): | ||
|
|
||
| ```markdown title="fern/.well-known/agent-skills/plant-care/SKILL.md" | ||
| --- | ||
| name: plant-care | ||
| description: Guide for diagnosing and treating common plant diseases. | ||
| --- | ||
|
|
||
| # Plant Care | ||
|
|
||
| When diagnosing a plant issue, check for... | ||
| ``` | ||
|
|
||
| </Step> | ||
| <Step title="Add the discovery manifest"> | ||
|
|
||
| The `index.json` at the root of the skills directory is required. It enumerates every skill so clients can discover them in a single request, referencing each by `url` and `digest`: | ||
|
|
||
| ```json title="fern/.well-known/agent-skills/index.json" | ||
| { | ||
| "$schema": "https://schemas.agentskills.io/discovery/0.2.0/schema.json", | ||
| "skills": [ | ||
| { | ||
| "name": "plant-care", | ||
| "type": "skill-md", | ||
| "description": "Guide for diagnosing and treating common plant diseases.", | ||
| "url": "/.well-known/agent-skills/plant-care/SKILL.md", | ||
| "digest": "sha256:c4d5e6f7..." | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| The legacy v0.1.0 manifest lists a `files` array per skill instead of `url` and `digest`. | ||
|
|
||
| </Step> | ||
| <Step title="Publish"> | ||
|
|
||
| Fern uploads the bundle during `fern generate --docs` and serves the files as-is — no `docs.yml` configuration is required. `fern check` validates the bundle at upload time, flagging a missing or unparseable `index.json` and any `SKILL.md` whose frontmatter doesn't conform to the spec. | ||
|
|
||
| Once published, skills are served at: | ||
|
|
||
| - `https://your-docs-domain.com/.well-known/agent-skills/index.json` (discovery manifest) | ||
| - `https://your-docs-domain.com/.well-known/agent-skills/<skill-name>/SKILL.md` (individual skill) | ||
| - `https://your-docs-domain.com/.well-known/skills/index.json` (legacy v0.1.0 manifest) | ||
|
|
||
| For sites with a basepath like `/docs`, the endpoints live under that basepath (e.g., `https://example.com/docs/.well-known/agent-skills/index.json`). | ||
|
|
||
| </Step> | ||
| <Step title="Install the skills"> | ||
|
|
||
| With the bundle published, anyone can install your skills with: | ||
|
|
||
| ```bash | ||
| npx skills add https://your-docs-domain.com | ||
| ``` | ||
|
|
||
| The `https://` scheme is required: a bare domain is treated as a GitHub repository shorthand. | ||
|
|
||
| </Step> | ||
| <Step title="Configure the Install skills button"> | ||
|
|
||
| Surface your skills in the docs UI by adding an "Install skills" button to the [page action bar](/learn/docs/configuration/site-level-settings#page-actions-configuration). Set `page-actions.options.skills` in `docs.yml` and the button opens a modal with a copyable install command, the list of available skills, and an optional link to the source repository. | ||
|
|
||
| ```yaml docs.yml | ||
| page-actions: | ||
| options: | ||
| skills: | ||
| title: Plant API Skills | ||
| description: Skills for working with the Plant Store API. | ||
| repository: https://github.com/your-org/plant-api-skills | ||
| install-command: npx skills add https://your-docs-domain.com | ||
| skills: | ||
| - name: plant-care | ||
| description: Guide for diagnosing and treating common plant diseases. | ||
| url: https://github.com/your-org/plant-api-skills/tree/main/plant-care | ||
| - name: garden-planner | ||
| description: Plan garden layouts and planting schedules. | ||
| ``` | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| ## Install skills properties | ||
|
|
||
| Configure the Install skills button under `page-actions.options.skills` in `docs.yml`. | ||
|
|
||
| <Markdown src="/products/docs/snippets/install-skills-properties.mdx" /> |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| <ParamField path="page-actions.options.skills" type="object" required={false} toc={true}> | ||
| Enables the "Install skills" page action and configures the modal it opens. Omit to hide it. | ||
| </ParamField> | ||
|
|
||
| <ParamField path="page-actions.options.skills.title" type="string" required={false} toc={true}> | ||
| Overrides the modal title. | ||
| </ParamField> | ||
|
|
||
| <ParamField path="page-actions.options.skills.description" type="string" required={false} toc={true}> | ||
| Overrides the modal description. | ||
| </ParamField> | ||
|
|
||
| <ParamField path="page-actions.options.skills.learn-more-url" type="string" required={false} toc={true}> | ||
| URL for a "Learn more" link shown alongside the description. | ||
| </ParamField> | ||
|
|
||
| <ParamField path="page-actions.options.skills.repository" type="string" required={false} toc={true}> | ||
| Source repository URL displayed as a "View source" button in the modal. | ||
| </ParamField> | ||
|
|
||
| <ParamField path="page-actions.options.skills.install-command" type="string or list of strings" required={false} toc={true}> | ||
| Command(s) shown as a copyable block in the modal. A single string is shown as-is; an array is joined with newlines for multi-step installs. Defaults to `npx skills add https://<your-docs-domain>` when omitted. | ||
| </ParamField> | ||
|
|
||
| <ParamField path="page-actions.options.skills.skills" type="list of objects" required={false} toc={true}> | ||
| List of skills displayed in the modal. Each entry has a `name` (required), `description` (optional), and `url` (optional link to the skill source). When the site serves a `/.well-known/agent-skills/index.json` or `/.well-known/skills/index.json` manifest, the manifest replaces this list. | ||
| </ParamField> | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [vale] reported by reviewdog 🐶
[Microsoft.URLFormat] Use 'of' (not 'for') to describe the relationship of the word URL to a resource.