monorepo-add-shared-package

monorepo-add-shared-package is a skill for Claude Code from lukedj78/dev-flow. It costs 179 tokens per session (1,585 once invoked), scanned A, original, MIT.

A tool for moving reusable code from a web or mobile app into a shared package in a Turborepo monorepo.

In plain words
What is it for?
It creates an empty shared package or extracts existing logic, then updates workspace dependencies, TypeScript path aliases, and project metadata.
Why use it?
It reduces duplicated code and sets up the package so both apps can depend on and import it consistently.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 .../dev-flow/scripts/update_meta.py <project-root> append-history \.

Part of the dev-flow plugin — 47 skills shipped together

Good fit It creates an empty shared package or extracts existing logic, then updates workspace dependencies, TypeScript path aliases, and project metadata.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/lukedj78/dev-flow
agentmods
npx agentmods add skills/lukedj78/dev-flow/monorepo-add-shared-package

Made for: Claude Code.

Or install dev-flow, the plugin that ships this one along with the rest of its 47 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/lukedj78/dev-flow/monorepo-add-shared-package.svg)](https://agentmods.dev/skills/lukedj78/dev-flow/monorepo-add-shared-package)
Your own site
<a href="https://agentmods.dev/skills/lukedj78/dev-flow/monorepo-add-shared-package"><img src="https://agentmods.dev/badge/skills/lukedj78/dev-flow/monorepo-add-shared-package.svg" alt="Measured on agentmods" height="20"></a>
Per session 179 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,585 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 warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 88
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 90
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
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.00179 $0.01585
Opus 5 $0.00089 $0.00792
Sonnet 5 $0.00036 $0.00317
Haiku 4.5 $0.00018 $0.00159

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

Security

Grade A, and why

monorepo-add-shared-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 7d ago.

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.

monorepo-add-shared-package/SKILL.md · 131 lines

How it starts

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

monorepo-add-shared-package — factor shared logic into packages/

Contract

See references/contracts.md (vendored from dev-flow). Key facts:

  • Reads <project-root>/.workflow/meta.json#stack.framework — must be "monorepo".
  • Requires meta.json#phase ≥ "scaffolded".
  • Adds entries to:
    • tsconfig.base.json#paths (new alias @<slug>/<pkg-name>/*)
    • apps/web/package.json#dependencies AND apps/mobile/package.json#dependencies (as workspace:*)
    • meta.json#stack_config.shared_packages array
  • Does NOT modify phase.

When this skill applies

  • User says: "estrai questa logica in shared", "create a shared @/foo package", "spostala in packages/shared", "factor X out of the apps".
  • Orchestrator does NOT route here automatically — invoked on demand.

Knowledge dependencies

  • monorepo-bootstrap/references/structure.md — for the canonical layout.
  • monorepo-bootstrap/references/patterns.md — for the workspace protocol + import conventions.

Workflow

Step 1 — Verify preconditions

Read .workflow/meta.json. Abort with clear message if:

  • stack.framework != "monorepo" → "This skill is monorepo-only. For non-monorepo projects use plain TS path aliases inside the app."
  • phase < "scaffolded" → "Need at least scaffolded — run monorepo-bootstrap first."

Read meta.json#project_slug for the namespace.

Step 2 — Determine the package name

Ask the user (one round-trip):

"Package name (without namespace)? E.g. 'shared', 'design', 'api', 'ui', 'config-eslint'. Or a topic-specific one like 'forms', 'analytics', 'payments-client'."

Validate:

  • kebab-case only (lowercase a-z, 0-9, hyphens).
  • Reject reserved names: web, mobile, root (those are app names, not packages).
  • If the user picks shared, design, or api and the package already exists, route to that existing package (add files there instead of creating a new one).

Resulting package: @<slug>/<name> lives at packages/<name>/.

Step 3 — Decide the source mode

Read the full file on GitHub · 131 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. 7d ago First seen · 131 lines · 179 tokens per session scan A be1a8ec6d75d

Subscribe to this mod's changes

monorepo-add-shared-package is a skill published in the GitHub repository lukedj78/dev-flow (6 stars, last pushed yesterday), licensed MIT. It adds 179 tokens to every session and 1,585 once invoked, about $0.0009 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-08-31.