Skip to content
Skills Library
Programming · Building & coding

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

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

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

  1. Ordering
  2. Verifying what came back
Original SKILL.md headings · 41 lines, 286 words
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…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.