npm-registry
Run and configure a local npm registry proxy that caches packages from upstream and serves them offline with the lpr CLI
Best use case
npm-registry is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Run and configure a local npm registry proxy that caches packages from upstream and serves them offline with the lpr CLI
Teams using npm-registry should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/npm-registry/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How npm-registry Compares
| Feature / Agent | npm-registry | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Run and configure a local npm registry proxy that caches packages from upstream and serves them offline with the lpr CLI
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# npm-registry Use this skill when you need to set up, configure, or interact with the local package registry proxy. ## Starting the registry ```bash lpr start ``` The registry starts on port 4873 (npm protocol) and the web dashboard on port 3600. ## Configuring npm to use lpr ### Project-level (.npmrc in project root) ``` registry=http://localhost:4873 ``` ### Global ```bash npm config set registry http://localhost:4873 ``` ### Scoped packages only ``` @myco:registry=http://localhost:4873 ``` This routes only `@myco/*` packages through lpr, leaving others going to the default registry. ## lpr.yaml configuration ```yaml port: 4873 # Registry port web_port: 3600 # Web UI port upstream: https://registry.npmjs.org cache_ttl: 86400 # 24 hours storage: ./lpr-packages # Tarball storage directory scope_map: "@myco": local # Always serve from local published packages "@azure": https://pkgs.dev.azure.com/myorg/_packaging/feed/npm/registry ``` ### scope_map values - `local` - only serve from locally published packages, never proxy upstream - A URL string - proxy this scope to the given registry instead of the default upstream ## Cache behavior - Packages are cached on first download from upstream - Cache expires after `cache_ttl` seconds (default: 24h) - Expired cache entries are re-fetched from upstream on next install - Tarballs are stored permanently; only metadata has TTL - Hit count is tracked per package version ## Viewing cache ```bash lpr cache ls # Show all cached packages with hit counts lpr cache clear # Remove all cached packages lpr cache clear lodash # Remove cache for a specific package ``` ## Environment variables | Variable | Default | Description | |----------|---------|-------------| | LPR_PORT | 4873 | Registry proxy port | | LPR_WEB_PORT | 3600 | Web dashboard port | | LPR_UPSTREAM | https://registry.npmjs.org | Default upstream registry | | LPR_CACHE_TTL | 86400 | Metadata cache TTL in seconds | | LPR_STORAGE | ./lpr-packages | Tarball storage directory | | LPR_WEB_ENABLED | 1 | Set to 0 to disable web UI | ## Web dashboard Open http://localhost:3600 to view: - Dashboard with stats (hits, misses, storage size, package count) - Published packages list - Cached packages with hit counts and expiry - Live request log with source badges (local/cached/upstream/miss) - Settings and npmrc snippet generator ## Offline operation Packages that were previously downloaded and are still within TTL are served from disk without any network access. After TTL expires they will be re-fetched, but tarballs themselves never expire from disk. To force offline-only mode: set `LPR_UPSTREAM=http://127.0.0.1:1` (unreachable), which causes all non-cached requests to fail with a miss. ## Request sources | Badge | Meaning | |-------|---------| | local | Served from locally published package | | cached | Served from disk cache | | upstream | Fetched from upstream and cached | | miss | Not found in local or upstream |
Related Skills
Skill: Uptime Monitoring
## Overview
Skill: Status Page
## Overview
Skill: unit-conversion
## Overview
Skill: recipe-scaler
## Overview
reading-list
Operate the reading-list API to save, manage, tag, search, and export articles.
email-digest
Configure, test, and troubleshoot the reading-list daily email digest delivered via nodemailer.
websocket-realtime
Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".
poll-builder
Self-hosted poll creation tool with real-time results. Use when you need to create a poll, check vote counts, close a poll, export results, or get the shareable link for a poll. Triggers include "create poll", "vote", "poll results", "survey", "collect votes", "share poll", or any task involving polling or voting.
Skill: personal-finance
## Overview
Skill: csv-import
## Overview
Skill: Syntax Highlighting
## Purpose
Skill: Pastebin Core
## Purpose