docs-and-examples

Guidance for writing documentation for a TypeScript library, including README files, installation steps, API examples, and migration notes.

In plain words
What is it for?
Use it when documenting a library's installation, quick start, API, runtime support, error handling, or changes between versions.
Why use it?
It reduces the chance that users copy outdated or non-working examples and helps them start using the library quickly.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/samplexbro/agentsmesh/docs-and-examples
Any agent
npx skills add sampleXbro/agentsmesh --skill docs-and-examples
Clone the repo
git clone --depth 1 https://github.com/sampleXbro/agentsmesh

Made for: Claude Code, Codex.

Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 435 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.00435
Opus 5 $0.00016 $0.00217
Sonnet 5 $0.00006 $0.00087
Haiku 4.5 $0.00003 $0.00044

Measured 2d ago against content hash 3339fe5adc40, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs-and-examples scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/docs-and-examples/SKILL.md · 88 lines

What it actually says

Purpose

Docs and Examples

You are responsible for documentation quality for a TypeScript library.

Goals

  • Make first use successful in minutes.
  • Keep examples aligned with the actual shipped API.
  • Optimize for copy-paste correctness.
  • Keep docs concise, practical, and version-accurate.

Documentation priorities

  1. README must explain the value quickly.
  2. Installation must be correct.
  3. Quick start must work from a clean consumer perspective.
  4. API examples must reflect actual exports and runtime behavior.
  5. Edge cases, caveats, and environment constraints must be documented.

README structure

Prefer this structure unless the project needs otherwise:

  • Title and one-sentence value proposition
  • Key features
  • Installation
  • Quick start
  • Core examples
  • API overview
  • Environment/runtime support
  • Error handling or caveats
  • Migration notes if relevant
  • License

Example rules

Every example should be:

  • minimal
  • correct
  • runnable or nearly runnable
  • aligned with the package's real import paths
  • typed correctly

Avoid:

  • pseudo-code disguised as real usage
  • undocumented helper functions
  • stale imports
  • examples depending on unpublished internals

Migration documentation

When behavior changes, document:

  • what changed
  • why it changed
  • who is affected
  • exact before/after usage
  • any codemod or manual migration path

Accuracy rules

Before writing docs, verify:

  • exported names are correct
  • installation commands match package manager realities
  • examples match module system expectations
  • options/defaults reflect current implementation
  • limitations are honestly documented

Tone

  • direct
  • technical
  • practical
  • not marketing-heavy

Output format

When asked to write or revise documentation, provide:

  1. Gaps or inaccuracies
  2. Revised documentation text
  3. Example validation notes
  4. Migration section if needed

Never invent APIs. Favor correctness over polish.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 88 lines · 32 tokens per session scan A 3339fe5adc40

Subscribe to this mod's changes

docs-and-examples is a skill published in the GitHub repository sampleXbro/agentsmesh (24 stars, last pushed 2d ago), licensed MIT. It adds 32 tokens to every session and 435 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ultracite

Ultracite is a zero-config linting and formatting preset for JavaScript/TypeScript projects. Use when: (1) Setting up or initializing Ultracite in a project (ultracite init), (2) Running linting or formatting commands (check, fix, doctor), (3) Writing or reviewing JS/TS code in a project that uses Ultracite — to…

haydenbleasel/ultracite · 142 tokens

type-safety

TypeScript type safety conventions for the Playwright scaffold — the "no any" rule, Zod 4 schema patterns (z.strictObject, top-level validators like z.uuid / z.email / z.url / z.int / z.enum), schemas built directly from the documented OpenAPI / Swagger contract (response envelope spelled out per endpoint), type…

idavidov13/agentic-playwright · 208 tokens

enums

TypeScript enum conventions for the Playwright scaffold — PascalCase enum names, SCREAMINGSNAKECASE members, location rules for app-specific (enums/{area}/) vs shared/utility (enums/util/) constants, and the rules for adding or extending enums. Use when adding a new API endpoint path, UI message, role, storage-state…

idavidov13/agentic-playwright · 148 tokens

refactor-values

Safe refactoring workflow for enum values, enum keys, and static test data in test-data/static/.ts — mandatory impact analysis, cascading updates, and verification. Use BEFORE changing any enum member's string value (ApiEndpoints., Messages., Roles, StorageStatePaths), renaming any enum key, or editing any existing…

idavidov13/agentic-playwright · 125 tokens

typescript-best-practices

Enforces TypeScript best practices and modern patterns.

rohitg00/skillkit · 15 tokens

tdmcp-tool-builder

How to author one new tdmcp MCP tool the house way — the file shape (XImpl + registerX), the Python-bridge pattern (buildPayloadScript/parsePythonReport over executePythonScript), the result helpers (errorResult/guardTd/jsonResult/structuredResult), fail-forward error handling, ESM/.js + Biome style, and the offline…

Pantani/tdmcp · 144 tokens