add-package

add-package is a command for coding agents from davepoon/buildwithclaude. It costs 6 tokens per session (758 once invoked), scanned A, original, MIT.

A workspace package setup command for adding a new library, application, tool, service, or component package. It creates the package structure and project configuration, including source, test, documentation, scripts, and dependencies.

In plain words
What is it for?
It is for adding a package under locations such as packages/, apps/, or libs/, checking names, and configuring its package.json, entry points, exports, and development commands.
Why use it?
It removes the repetitive work of creating a package in the right workspace location and aligning its metadata and scripts with the project.

Command

Part of the all-commands plugin — 23 commands shipped together

About the project

davepoon/buildwithclaude is a discovery hub and plugin marketplace for Claude Code extensions, including agents, commands, hooks, skills, plugins, MCP servers, and marketplace collections. Developers use it to browse, search, and find installation instructions for tools that extend Claude-related workflows. Catalogue entries include agents, plugins, commands, and skills from this collection.

davepoon/buildwithclaude · 3,415 stars · on GitHub · buildwithclaude.com

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 commands/davepoon/buildwithclaude/add-package
Clone the repo
git clone --depth 1 https://github.com/davepoon/buildwithclaude

Or install all-commands, the plugin that ships this one along with the rest of its 23 commands.

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 add-package

README.md
[![agentmods](https://agentmods.dev/badge/commands/davepoon/buildwithclaude/add-package.svg)](https://agentmods.dev/commands/davepoon/buildwithclaude/add-package)
Your own site
<a href="https://agentmods.dev/commands/davepoon/buildwithclaude/add-package"><img src="https://agentmods.dev/badge/commands/davepoon/buildwithclaude/add-package.svg" alt="Measured on agentmods" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 758 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.1 $0.00006 $0.00758
Opus 5 $0.00003 $0.00379
Sonnet 5 $0.00001 $0.00152
Haiku 4.5 $0.00001 $0.00076

Measured today against content hash d642568315c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

add-package 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 today.

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.

plugins/all-commands/commands/add-package.md · 89 lines

How it starts

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

Add Package to Workspace

Add and configure new project dependencies

Instructions

  1. Package Definition and Analysis

    • Parse package name and type from arguments: $ARGUMENTS (format: name [type])
    • If no arguments provided, prompt for package name and type
    • Validate package name follows workspace naming conventions
    • Determine package type: library, application, tool, shared, service, component-library
    • Check for naming conflicts with existing packages
  2. Package Structure Creation

    • Create package directory in appropriate workspace location (packages/, apps/, libs/)
    • Set up standard package directory structure based on type:
      • src/ for source code
      • tests/ or __tests__/ for testing
      • docs/ for package documentation
      • examples/ for usage examples (if library)
      • public/ for static assets (if application)
    • Create package-specific configuration files
  3. Package Configuration Setup

    • Generate package.json with proper metadata:
      • Name following workspace conventions
      • Version aligned with workspace strategy
      • Dependencies and devDependencies
      • Scripts for build, test, lint, dev
      • Entry points and exports configuration
    • Configure TypeScript (tsconfig.json) extending workspace settings
    • Set up package-specific linting and formatting rules
  4. Package Type-Specific Setup

    • Library: Configure build system, export definitions, API documentation
    • Application: Set up routing, environment configuration, build optimization
    • Tool: Configure CLI setup, binary exports, command definitions
    • Shared: Set up common utilities, type definitions, shared constants
    • Service: Configure server setup, API routes, database connections
    • Component Library: Set up Storybook, component exports, styling system
  5. Workspace Integration

    • Register package in workspace configuration (nx.json, lerna.json, etc.)
    • Configure package dependencies and peer dependencies
    • Set up cross-package imports and references
    • Configure workspace-wide build order and dependencies
    • Add package to workspace scripts and task runners

Read the full file on GitHub · 89 lines

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. today First seen · 89 lines · 6 tokens per session scan A d642568315c0

Subscribe to this mod's changes

add-package is a command published in the GitHub repository davepoon/buildwithclaude (3,415 stars, last pushed yesterday), licensed MIT. It adds 6 tokens to every session and 758 once invoked, about $0.0000 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-09-05.