
fusion-package-scribe
Systematically improves TSDoc and README documentation across packages in a TypeScript monorepo. Discovers public API surfaces, generates or improves TSDoc on all exports, rewrites READMEs to a consistent retrieval-friendly structure, and commits each package independently. USE FOR: monorepo-wide documentation passes, single-package doc improvements, TSDoc generation on public exports, README standardization, review council quality checks. DO NOT USE FOR: runtime code changes, security scanning, API reference site generation, non-TypeScript languages.
- Installs
- 956
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/equinor/fusion-skills --skill fusion-package-scribe- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads fusion-package-scribe automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Package Scribe
Experimental caveat
This skill is experimental and not yet stable. Behavior, structure, and outputs may change between versions.
When to use
Use when you need to systematically add or improve documentation across TypeScript packages — whether a full monorepo sweep or a single package.
Typical triggers:
- "document all packages"
- "improve docs for
packages/utils/observable" - "add TSDoc to all public exports in this package"
- "rewrite the README for this package"
- "run a documentation pass on the monorepo"
- "review the TSDoc quality in this package"
Implicit triggers:
- A package has public exports with missing or stub TSDoc
- A package README is outdated, inconsistent, or missing standard sections
- A documentation sweep is planned across multiple packages
When not to use
- Modifying runtime code (only doc comments and README files)
- Generating API reference sites or TypeDoc output
- Non-TypeScript languages (initial scope is TS/TSX only)
- Auto-merging PRs or bypassing review workflows
- Security vulnerability scanning or performance profiling
- Replacing existing CI-based doc generation pipelines
Required inputs
If required inputs are missing or ambiguous, ask before proceeding.
- Scope: monorepo root path or specific package path(s)
- Mode:
single(one package) orsweep(multiple packages)
Conditional inputs
- Package filter: glob or list when processing a subset of packages
- README template path: repo-specific template if not using the built-in default (for example under
.github/instructions/) - Tracking issue: issue number for lifecycle updates (assign, status, close)
- Commit style: repo-specific conventional commit format (defaults to
docs(<package>):) - Batch size: number of packages per batch for sweep mode (defaults to 5)
Defaults
- Mode:
single(if only one package path provided) - Commit prefix:
docs(<package-name>): - Batch size: 5 packages per sweep batch
- README structure: built-in template from
references/readme-template.md - Review council: enabled (runs after every package)
Precedence and standards discovery
This skill discovers and follows the target repository's own standards:
- Repository instructions — applicable files under
.github/instructions/,CONTRIBUTING.md,contribute/ - Tooling configuration —
tsconfig.json,biome.json,.editorconfig - Companion skill —
fusion-code-conventionsfor TSDoc rules, naming conventions, and intent quality (when installed) - Built-in defaults —
references/tsdoc-checklist.mdandreferences/readme-template.md
Repository-level standards always win. When no repo standards exist, the built-in defaults apply.
Agent modes
| Agent | Role | Activated for |
|---|---|---|
agents/orchestrator.agent.md | Batch coordinator | Sweep mode — plans batches, manages token budgets, tracks progress |
agents/documenter.agent.md | Per-package writer | Every package — scans API surface, generates TSDoc, rewrites README |
agents/reviewer.agent.md | Review council | After each package — verifies intent, comprehension, retrieval fitness |
In single-agent runtimes, all three roles run inline sequentially.
Instructions
Step 1 — Discover repository standards
Before generating any documentation:
- Search for repo-level documentation instructions:
- applicable files under
.github/instructions/ CONTRIBUTING.md,contribute/
- applicable files under
- Read
tsconfig.jsonto understand module structure, path aliases, and strict mode settings - Read
biome.jsonor equivalent linter config for style expectations - Check if
fusion-code-conventionsis available — if so, defer to its TSDoc rules fromreferences/typescript.conventions.md - If no repo-level standards exist, use
references/tsdoc-checklist.mdas the quality baseline
Step 2 — Discover packages
- For single mode: validate the provided package path exists and has TypeScript source files
- For sweep mode:
- Read the root
package.jsonor workspace config (pnpm-workspace.yaml,lerna.json,turbo.json) to find all packages - Filter by any provided glob/list
- Sort packages by estimated size (file count) for batch planning
- Write the discovery summary to
.tmp/scribe-discovery-<context>.md
- Read the root
Step 3 — Plan execution (sweep mode only)
Activate agents/orchestrator.agent.md (or run inline):
- Group packages into batches of the configured batch size
- Order batches: smaller packages (fewer source files) first to maximize early throughput
- Estimate token budget per package: ~100 tokens per source file for reading, ~200 tokens per export for TSDoc generation
- If a single package exceeds 60% of the estimated context window, flag it for special handling (barrel exports first, defer internal modules)
- Write the execution plan to
.tmp/scribe-plan-<context>.md
Step 4 — Process each package
Activate agents/documenter.agent.md (or run inline) for each package:
4a — Scan public API surface
- Find the barrel export file (
index.ts,index.tsx, ormainfield inpackage.json) - Trace all re-exports to identify the full public API surface
- Categorize exports: functions, classes, types/interfaces, constants, hooks, enums
- Prioritize: barrel exports first, then direct public exports, then internally-consumed-but-exported items
4b — Generate or improve TSDoc
For each public export:
- Read the existing implementation to understand intent, parameters, return values, error paths, and side effects
- Check for existing TSDoc — improve rather than replace when present
- Apply the TSDoc checklist (repo standards or
references/tsdoc-checklist.md):- Summary line: explain why and what problem it solves, not just what it does
@paramfor every parameter with meaningful descriptions@returnsfor every non-void function@templatefor every generic type parameter@throwsfor meaningful error paths@examplefor user-facing and non-trivial public APIs@deprecatedwith replacement guidance when applicable
- Flag and rewrite "name-echo" patterns (for example
/** Gets the value. */ getValue()) - Do not modify runtime code — only doc comments
4c — Rewrite or improve README
- Read the existing README (if any) to preserve valuable content
- Apply the README structure from repo instructions or
references/readme-template.md:- Package name and description
- Features / key exports
- Installation
- Usage with code examples
- API reference (summary of key exports with links or inline docs)
- Configuration (if applicable)
- Ensure the README is useful to a developer discovering the package for the first time
- Optimize for retrieval: use clear headings, keyword-rich descriptions, and concrete examples
Step 5 — Review council
Activate agents/reviewer.agent.md (or run inline) after each package:
- Intent extraction — Does the TSDoc accurately describe what the code does and why? Flag any comment that merely restates the function/type name.
- Code comprehension — Are complex algorithms, state machines, or side effects explained? Would a new developer understand the code from the docs alone?
- User-facing quality — Is the README useful to someone discovering the package for the first time? Does it have working examples?
- Retrieval fitness — Will the documentation produce good hits in RAG / semantic search? Are key terms present in headings and summaries?
The reviewer produces a pass/fail per criterion. Failures loop back to Step 4 for the specific package.
Step 6 — Commit
After the review council passes for a package:
- Stage only documentation files (
.ts/.tsxfiles for TSDoc changes,README.md) - Commit using the repo's conventional commit format, defaulting to:
docs(<package-name>): improve TSDoc and README documentation - Do not push — leave that to the user or a PR workflow
Step 7 — Report
After all packages are processed:
- Write a summary to
.tmp/scribe-report-<context>.md:- Packages processed and status (pass/fail/skipped)
- Total exports documented
- Review council pass rates per criterion
- Any packages flagged for manual review
- Commits created
- If a tracking issue was provided, update it with the summary
Expected output
- TSDoc comments on all public exports in processed packages
- Consistent README for each processed package
- One commit per package with documentation-only changes
- Summary report in
.tmp/ - Tracking issue update (when issue number provided)
Safety & constraints
This skill is mutation-capable. Repository-local workflow instructions take precedence over inline guidance when they conflict.
- Only modify doc comments and README files — never touch runtime code
- Do not push commits; leave push decisions to the user
- Do not auto-merge PRs or bypass review workflows
- Do not invent API behavior — document only what the code actually does
- Do not delete or replace existing valuable documentation without preserving its content
- When a tracking issue is referenced, update it only after explicit confirmation
- Respect
.gitignoreand do not commit temporary files from.tmp/ - If the review council fails a package twice, flag it for manual review instead of looping indefinitely
FAQ
What does the fusion-package-scribe skill do?
Systematically improves TSDoc and README documentation across packages in a TypeScript monorepo. Discovers public API surfaces, generates or improves TSDoc on all exports, rewrites READMEs to a consistent retrieval-friendly structure, and commits each package independently. USE FOR: monorepo-wide documentation passes, single-package doc improvements, TSDoc generation on public exports, README standardization, review council quality checks. DO NOT USE FOR: runtime code changes, security scanning, API reference site generation, non-TypeScript languages.
How do I install fusion-package-scribe?
Run npx skills add https://github.com/equinor/fusion-skills --skill fusion-package-scribe in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/fusion-package-scribe/ (personal) or .claude/skills/fusion-package-scribe/ (project).
Which AI agents can use fusion-package-scribe?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is fusion-package-scribe safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains fusion-package-scribe?
It is published by equinor in equinor/fusion-skills. It has 956 recorded installs.
More from equinor/fusion-skills
fusion-issue-authoring
equinor/fusion-skills
Classify issue type, activate the matching agent mode for type-specific drafting, and enforce shared safety gates before GitHub mutation.
fusion-github-review-resolution
equinor/fusion-skills
Resolves unresolved GitHub PR review threads end-to-end: evaluates whether each review comment is correct, applies a targeted fix when valid, replies with rationale when not, commits, and resolves the thread. USE FOR: unresolved review threads, PR review feedback, changes requested PRs, PR review URLs (pullrequestreview-...), fix the review comments, close the open threads, address PR feedback. DO NOT USE FOR: summarizing feedback without code changes, creating new PRs, or read-only branches.
fusion-issue-solving
equinor/fusion-skills
Handles GitHub issue resolution end-to-end for prompts like "solve 123", "lets solve 123", "work on 123", "work on https://github.com/owner/repo/issues/123", or by pasting a direct GitHub issue URL as the request. USE FOR: solve 123, continue work on issue 123, work on https://github.com/owner/repo/issues/123, paste a GitHub issue URL for implementation work. DO NOT USE FOR: issue drafting only, PR review only, or non-implementation research.
fusion-code-conventions
equinor/fusion-skills
Applies and explains code conventions across TypeScript, React, C, and Markdown. Enforces naming rules, file naming patterns, TSDoc and XML doc standards, inline comment intent (the why, not the what), code structure, error handling, async patterns, and dead code policy. Also enforces ADR and contributor doc decisions, and flags decisions that appear stale or misaligned with current tooling. USE FOR: convention questions, code review against project standards, applying naming rules, auditing intent comments, checking TSDoc completeness, enforcing recorded ADR decisions, and flagging stale architectural decisions. DO NOT USE FOR: security vulnerability scanning, performance profiling, runtime debugging, or generating net-new code without a review target.
fusion-dependency-review
equinor/fusion-skills
Review dependency PRs with structured research, existing-PR-discussion capture, multi-lens analysis (security, code quality, impact), and a repeatable verdict template. USE FOR: dependency update PRs, Renovate/Dependabot PRs, library upgrade reviews, "review this dependency PR", "should we merge this update". DO NOT USE FOR: feature PRs, application code reviews, dependency automation/bot configuration, or unattended merge without confirmation.
fusion-mcp
equinor/fusion-skills
Explain what Fusion MCP is and guide users through setting it up when they need Fusion-aware MCP capabilities in Copilot workflows.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.