js-library-packaging

js-library-packaging is a skill for Claude Code, Codex from event4u-app/agent-config. It costs 42 tokens per session (2,191 once invoked), scanned A, original, MIT.

A guide for packaging JavaScript and TypeScript libraries for use by other packages. It covers the package's public exports, dependencies, included files, and whether source code needs building.

In plain words
What is it for?
Use it when publishing or changing a library package, its package.json exports, peer dependencies, or workspace packaging rules.
Why use it?
It helps prevent consumer-side failures such as broken imports, incorrect React dependency placement, and workspace installation problems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when publishing or changing a library package, its package.json exports, peer dependencies, or workspace packaging rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/event4u-app/agent-config/js-library-packaging
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.

Any agent
npx skills add event4u-app/agent-config --skill js-library-packaging
Clone the repo
git clone --depth 1 https://github.com/event4u-app/agent-config

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for js-library-packaging

README.md
[![agentmods](https://agentmods.dev/badge/skills/event4u-app/agent-config/js-library-packaging/github.svg)](https://agentmods.dev/skills/event4u-app/agent-config/js-library-packaging)
Your own site
<a href="https://agentmods.dev/skills/event4u-app/agent-config/js-library-packaging"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/js-library-packaging/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for js-library-packaging

Your own site · 80×15
<a href="https://agentmods.dev/skills/event4u-app/agent-config/js-library-packaging"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/js-library-packaging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,191 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00042 $0.02191
Opus 5.5 $0.00017 $0.00876
Sonnet 5.5 $0.00008 $0.00438
Haiku 4.5 $0.00004 $0.00219

Measured 24d ago against content hash ecdb9ffcf512, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

js-library-packaging 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 24d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/check_package_surface.mjs, scripts/check_package_surface.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

src/skills/js-library-packaging/SKILL.md · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.

js-library-packaging

Pack placement. engineering-base. The step asked for it to be suggested by the react and typescript packs, and the skill schema carries no suggested_by key — so the intent is recorded here rather than expressed in frontmatter that would fail validation. A React or TypeScript consumer receives this skill through engineering-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.

The Iron Law

`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.

When to use

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.

Procedure

  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 this workspace?
    • Verify: the exports targets all point into one of the two worlds (src/ or the build directory), never a mix.
  2. Read the surface rather than asserting it. Run the check below over the package root.
    • Source of truth: package.json — exports, dependencies, peerDependencies, files, private, publishConfig.
    • Verify: zero error-severity findings.
  3. Fix peer placement before anything else. A library carrying react in dependencies gives the consumer a second copy of React.
    • Verify: react and react-dom appear under peerDependencies only.
  4. Order the conditions. types first, then import / require.
    • Verify: the check reports no types-not-first.
  5. Cut the release through the repository's own mechanism — never by editing a version field. See § Release.
    • Verify: the version change is produced by the tool the repository already carries.

Read the full file on GitHub · 175 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 24d ago Changed · +1 lines ecdb9ffcf512
  2. 1mo ago Changed 6b3d2eeb3bcd
  3. 2mo ago First seen · 174 lines · 42 tokens per session scan A be62ed5a8aea

Subscribe to this mod's changes

js-library-packaging is a skill published in the GitHub repository event4u-app/agent-config (19 stars, last pushed yesterday), licensed MIT. It adds 42 tokens to every session and 2,191 once invoked, about $0.0002 per session on Opus 5.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-09-03.

Related

js-library-packaging compared with skills from other repositories

js-library-packaging next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
js-library-packagingevent4u-app/agent-configSkill19yesterdayMITA42Claude Code, Codex
ultracitehaydenbleasel/ultraciteSkill3.4k5d agoMITA179Claude Code, Codex
jest-unitPramodDutta/qaskillsSkill2453d agoMITA32Claude Code
type-safetyidavidov13/agentic-playwrightSkill2623d agoMITA80Claude Code, Codex
refactor-valuesidavidov13/agentic-playwrightSkill2623d agoMITA55Claude Code, Codex
typescriptPyModel/react-frontend-skillsSkill423d agoMITA15Claude Code, Codex
vitestPyModel/react-frontend-skillsSkill423d agoMITA12Claude Code, Codex