Best for
- A package in the repository is imported by another package, or is about to be published: an exports map is being written or changed, a hook fails at runtime with "invalid hook call", an install fails on a workspace: ran…
event4u-app/agent-config/src/skills/js-library-packaging/SKILL.md
Use when a JavaScript/TypeScript package is consumed by another package — exports map, peer vs. direct dependencies, files allow-list, and whether it should be built at all.
Decision brief
Pack placement. engineering-base. The step asked for it to be suggested by the react and typescript packs, and the skill schema carries no suggestedby key — so the intent is recorded here rather than expressed in frontmatter that would fail validation. A React or TypeScript cons…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/js-library-packaging"Inspect the Agent Skill "js-library-packaging" from https://github.com/event4u-app/agent-config/blob/6a5670b7881a676c0da90d2afb950298087c4ccb/src/skills/js-library-packaging/SKILL.md at commit 6a5670b7881a676c0da90d2afb950298087c4ccb. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Answer buildable-vs-source-consumed FIRST. It determines the exports map, the files list, and whether a build step exists at all — deciding it after writing the map means rewriting the map. - Source of truth: is the package published to a registry, or only consumed inside thi…
Review the “The Iron Law” section in the pinned source before continuing.
A package in the repository is imported by another package, or is about to be published: an exports map is being written or changed, a hook fails at runtime with "invalid hook call", an install fails on a workspace: range, a release needs cutting, or the buildable-vs-source ques…
scripts/checkpackagesurface.ts beside this skill. Deterministic, JSON on stdout, no network and no subprocess. It reports:
Default to source-consumed inside a workspace. A build step exists to serve publication; adding one for a package nobody publishes is a maintenance cost with no consumer.
Permission review
The documentation asks the agent to read local files, directories, or repositories.
Read the repository, then take exactly one branch — **Class A**, perEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 96/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 9 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Pack placement.
engineering-base. The step asked for it to be suggested by thereactandtypescriptpacks, and the skill schema carries nosuggested_bykey — so the intent is recorded here rather than expressed in frontmatter that would fail validation. A React or TypeScript consumer receives this skill throughengineering-base, which both of those packs require.
The JavaScript twin of composer-packages. A component is
a file; a library is a package with a public surface, and that surface is declared in
package.json rather than inferred. Most of the failures below are silent at author time
and loud at the consumer's — which is why the surface is read, not assumed.
`react` AND `react-dom` ARE peerDependencies. NEVER dependencies.
`types` IS THE FIRST KEY OF EVERY CONDITIONS OBJECT.
DECIDE buildable-VS-source-consumed BEFORE WRITING THE EXPORTS MAP.
NEVER HAND-BUMP A VERSION.
A package in the repository is imported by another package, or is about to be published:
an exports map is being written or changed, a hook fails at runtime with "invalid hook
call", an install fails on a workspace: range, a release needs cutting, or the
buildable-vs-source question has not been answered yet.
files
list, and whether a build step exists at all — deciding it after writing the map means
rewriting the map.
src/ or the
build directory), never a mix.package.json — exports, dependencies, peerDependencies,
files, private, publishConfig.error-severity findings.react in
dependencies gives the consumer a second copy of React.
react and react-dom appear under peerDependencies only.types first, then import / require.
types-not-first.check_package_surface <library-root> [<library-root> …]
scripts/check_package_surface.ts beside this skill. Deterministic, JSON on stdout, no
network and no subprocess. It reports:
| Code | Severity | Why |
|---|---|---|
peer-as-dependency | error | two copies of React in one tree break hooks at runtime, with a message that names neither package |
export-target-missing | error | the manifest promises a file the package does not ship |
no-exports-map | warn | main/module without exports — the entry point resolves by bundler convention, not by declaration |
types-not-first | warn | conditions match in declaration order, so a later types is never seen and the package silently ships untyped |
workspace-range-publishable | warn | a workspace: range does not resolve outside the workspace; published, the consumer's install fails |
It classifies from the declared export targets, never from a directory name. A package
directory called ui-lib-vite is not evidence about Vite, and one called buildable is not
evidence that anything builds. A mixed declaration is reported as undeclared rather
than resolved to a guess — declaring both is the ambiguity worth surfacing.
What it does not do: it never compiles and never runs a bundler, so it cannot tell you the declared layout is producible. A checker that grew a parser would report compile errors as packaging errors, and the two have different fixes.
| source-consumed | buildable | |
|---|---|---|
| exports point at | src/ | the build directory |
| build step | none | one, and it must run before publish |
files | not needed (nothing published) | the build directory, as an allow-list |
private | true on a workspace-only package | absent; publishConfig.access set instead |
| cost | consumer compiles it | a build to maintain, and output that can go stale |
Default to source-consumed inside a workspace. A build step exists to serve publication; adding one for a package nobody publishes is a maintenance cost with no consumer.
Read the repository, then take exactly one branch — Class A, per
standards-from-config: the config is the answer.
.changeset/ present → changesets. Add a changeset describing the change and let the
release job bump and publish. Never edit version by hand.nx release) → that command. It owns
version, tag, and changelog together; splitting them by hand desynchronises them.A breaking change carries the ! marker and the footer — see
conventional-commits-writing. The marker is
what a release tool reads to decide the major bump, so omitting it publishes a breaking
change as a patch.
error finding with its fix, then the warnings.{ "import": …, "types": … } type-checks fine at author
time and ships untyped to the consumer.src/. Only a real build proves that.files is an allow-list, not a deny-list. Adding a directory to the package means
adding it here, and forgetting is invisible until a consumer imports a missing path.workspace: range is not a version. It resolves in the workspace and nowhere else.react or react-dom in dependencies.types after import or require.version field by hand, in any of the three release branches.scripts/check_package_surface.ts is read-only and offline by construction, and the
constraint is worth stating because a packaging tool is a tempting place to lose it:
package.json and tests path existence. It never edits a manifest,
so it can never "fix" a version field, which is the one thing § Release forbids.Widening any of these turns a metadata reader into something that runs a third party's code. If a future check needs a build, it belongs in a separate integration test with its own declared cost — never here.
composer-packages — the PHP twin; same surface discipline, different manifest.standards-from-config — the Class-A rule the § Release branch follows.conventional-commits-writing — the ! marker a release tool reads.ui-component-architect — the component inside the library; this skill is the package around it.Frequently asked questions
Pack placement. engineering-base. The step asked for it to be suggested by the react and typescript packs, and the skill schema carries no suggestedby key — so the intent is recorded here rather than expressed in frontmatter that would fail validation. A React or TypeScript cons…
The source record exposes this install command: npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/js-library-packaging". Inspect the command and pinned source before running it.
Static rules flagged read-files in the source; the page lists the matching lines and excerpts.
Alternatives
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
garrytan/gbrain
Generate a publication-quality PDF from any brain page via the gstack make-pdf binary. Strips YAML frontmatter, sanitizes emoji, applies running headers and page numbers. Brain page is always the source of truth; PDF is a rendering.
NVIDIA/skills
How to swap the DeepStream CV detection model in the VSS Alerts Blueprint verification (2d_cv) mode - covers ONNX export, custom bbox parsers, compose mount gotchas, nvinfer config, runtime TRT engine build, deployment, and a segmentation-capable model addendum handoff.
awslabs/agent-plugins
Evaluate, configure, and migrate workloads to AWS Lambda Managed Instances (LMI). Triggers on: Lambda Managed Instances, LMI, capacity provider, multi-concurrency Lambda, dedicated instance Lambda, EC2-backed Lambda, cold start elimination, Graviton Lambda, instance type for Lambda, scheduled scaling for LMI, Lambda cost optimization with Reserved Instances or Savings Plans. Also trigger when users describe high-volume predictable workloads seeking cost savings, want to scale LMI capacity on a s