.agents/skills/js-docs-sync/SKILL.md
Keep hand-written docs/ documentation in JS packages accurate and up to date with their source code. Use this skill whenever: (1) source files in a JS package that has a docs/ folder are modified — especially exports, function signatures, types, or public API changes, (2) the user asks to "update docs", "sync docs", "check if docs are accurate", "review the documentation", or similar, (3) new exports or features are added to a JS package and the docs need to reflect them. Also trigger when the user mentions documentation drift, stale examples, or missing API coverage in any JS package under js/packages/.
npx skillsauth add arize-ai/openinference js-docs-syncInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Verify and update hand-written docs/ documentation in a JS package so it stays
accurate against the actual source code. These docs ship in the npm package (via
the files field in package.json) for coding agents to read from node_modules.
The docs are the contract between the package and coding agents that consume it. Stale signatures, missing exports, or invalid examples mean agents write broken code. Source code is the single source of truth — docs must reflect it exactly.
Determine which JS package to sync. If not clear from context, check which
packages have a docs/ directory:
find js/packages -maxdepth 2 -name docs -type d
If only one package has docs, use it. Otherwise ask the user.
Read docs/README.md in the target package. It contains:
This is your roadmap — it tells you what each doc file covers and where to look in the source to verify it.
If this is triggered by source edits, focus on the changed files:
git diff --name-only HEAD~1 -- js/packages/<package>/src/
Map changed source files to the doc files that cover them (using the Source Code Map in README.md). You only need to re-verify the affected docs.
If this is a full review (user asks to "check all docs"), verify everything.
For each doc file that needs checking, compare it against the source code. Check these things in order:
Read the barrel files (src/index.ts and any sub-module index.ts files) to get
the full list of public exports. Compare against what's listed in docs/README.md
under "All Exports at a Glance". Flag any export that is:
For each documented function signature, read the actual source and compare:
Pay special attention to:
| string vs | \${SomeEnum}``)<Fn extends AnyFn>)For each documented type or interface:
If the docs list enum values (like span kinds), verify the list is complete against the actual enum definition. Enums grow over time — new values get added but docs often lag behind.
For each code example in the docs:
[0.1, 0.2, ...] — the
spread operator needs an iterable; use /* ... */ for truncated arrays)If source files were added, removed, or renamed, update the Source Code Map tree
in docs/README.md to match the current src/ directory structure.
For each discrepancy found, edit the affected doc file. When updating:
After making changes, do a final pass:
cd js && pnpm run -r buildTemplate literal types vs plain strings: TypeScript template literal types
like `${SomeEnum}` restrict to specific string values. Don't document these
as | string — that's misleadingly broad. Show the actual type.
Internal vs public exports: A function may be exported from its own file
but not re-exported through the barrel index.ts chain. Only document functions
that are reachable from the package's main entry point.
Type-only exports: Exports using export type { ... } are erased at runtime.
They should still be documented (they're part of the TypeScript API) but note
that they're type-only if relevant.
Generated docs conflict: The repo has TypeDoc-generated API docs at js/docs/
(gitignored). The hand-written docs in js/packages/*/docs/ are separate — don't
confuse the two. Hand-written docs focus on usage patterns and examples, not
exhaustive API surface.
development
Investigate and propose fixes for Python canary cron failures in the openinference repo. Use when the user mentions Python canary failures, Python cron failures, or when the auto-fix CI job reports Python instrumentation canary issues.
development
Review Python OpenInference instrumentation code for correctness and completeness. Use this skill when reviewing a Python instrumentor package — whether it's a new instrumentor, a PR that modifies one, or when the user asks to audit/review/check an existing instrumentor's code quality. Trigger on phrases like "review the instrumentor", "check the code", "audit the package", "is this instrumentor correct", or any request to validate an OpenInference Python instrumentation package against project standards.
tools
Debug LLM applications using the Phoenix CLI. Fetch traces, analyze errors, review experiments, inspect datasets, and query the GraphQL API. Use when debugging AI/LLM applications, analyzing trace data, working with Phoenix observability, or investigating LLM performance issues.
development
Review Java OpenInference instrumentation code for correctness and completeness. Use this skill when reviewing a Java instrumentor package — whether it's a new instrumentor, a PR that modifies one, or when the user asks to audit/review/check an existing instrumentor's code quality. Trigger on phrases like "review the instrumentor", "check the Java code", "audit the package", "is this instrumentor correct", or any request to validate an OpenInference Java instrumentation package against project standards.