docs-companion-examples
/docs-companion-examples
How to commission and verify a page's companion example files — the standalone runnable Scala a page pulls in with mdoc:embed or SourceFile.print. Use when a documentation page embeds example files rather than relying only on inline mdoc blocks, to delegate the build and check what came back.
- Author
- zio ↗
- Repository
- zio-skills ↗
- Licence
- Apache-2.0
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
How to commission and verify a page's companion example files — the standalone runnable Scala a page pulls in with mdoc:embed or SourceFile.print. Use when a documentation page embeds example files rather than relying only on inline mdoc blocks, to delegate the build and check what came back.
Original author description
How to commission and verify a page's companion example files — the standalone runnable Scala a page pulls in with mdoc:embed or SourceFile.print. Use when a documentation page embeds example files rather than relying only on inline mdoc blocks, to delegate the build and check what came back.
How it works
- Ordering
- Verifying what came back
SKILL.md preview
---
name: docs-companion-examples
description: How to commission and verify a page's companion example files — the standalone runnable Scala a page pulls in with mdoc:embed or SourceFile.print. Use when a documentation page embeds example files rather than relying only on inline mdoc blocks, to delegate the build and check what came back.
allowed-tools: Read, Grep, Glob, Bash(sbt:*), Bash(scala-cli:*), Task, Skill
---
# Companion Examples
A page's runnable examples come in two forms. **Inline** mdoc blocks compile as part of the page and
need nothing here. **Embedded** files — pulled in with `mdoc:embed:<path>` or `SourceFile.print` — are
real `.scala` files that must exist on disk before mdoc runs. `docs-examples` owns every rule about
them.
Delegate the build to the **`docs-examples-builder`** agent with the `Task` tool — it must NOT share
your conversation, so its only knowledge of the page is what you tell it:
```
Task(
description: "Build companion examples for <page-id>",
subagent_type: "documentation:docs-examples-builder",
prompt: "Page: <path to the page being documented>
Page shape: <one-program | recipes, from the page plan; reference pages: reference>
Embeds this page declares: <every mdoc:embed:<path> or SourceFile.print path it names,
each of which must end up at exactly that path>"
)
```
## Ordering
Commission the examples **before** mdoc verification. An `mdoc:embed:<path>` block fails outright when
the file it names is absent, so a page that embeds examples cannot pass mdoc until they exist.
## Verifying what came back
The delegation is done when:
- every `mdoc:embed:<path>` or `SourceFile.print` call in the page resolves to a real file,
- the builder ran every file and reported no output that contradicts the page — fix the page or the
file for each difference it lists,
- everything the builder added beyond page code is named on the page (e.g. in the section's
`<summary>` or the "Putting It Together" prose), and no section embeds a file the builder reported
as "wrapper only".
If mdoc later reports an unresolved embed, the file is missing or at the wrong path — fix the path or
re-commission it rather than deleting the embed to make the page compile.
Versions
The database has no other skills named docs-companion-examples.
Database snapshot: 13.11.2026 · package version 21dce6b0bf08 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100companion-examples
How to commission and verify a page's companion example files — the standalone runnable Scala a page pulls in with mdoc:embed. Use when a documentation page embeds example files rather than relying only on inline mdoc blocks. - 100check-docs-style
Check modified Nx documentation pages against the astro-docs style guide. Auto-trigger after writing or editing docs content in the nx repo. Also trigger on "check style", "style guide", "docs review", "validate docs". Should run as a final step whenever docs files are modified.… - 100embed-agent-in-react
Embed a three.ws 3D agent in a React app with the @three-ws/react Agent3D component and drive it through its ref. Use when a React or Next.js page should show or control a three.ws avatar. - 100add-plugin-doc
Use when adding or updating yaebal plugin docs under apps/docs/src/routes/docs/plugins, including package api tables, runnable examples, nav, seo, and docs health. - 100write-docs
Use when writing or updating a hand-written docs.sodax.com page — a guide, how-to, quickstart, network page, blog post or example under docs/ — so it cannot drift from the SDK: TypeScript comes from compiled examples in apps/docs-examples, existing SDK docs are linked rather…