
Npm Git Install
- 210 installs
- 40 repo stars
- Updated August 4, 2026
- akillness/oh-my-skills
Install npm packages directly from Git URLs, branches, or tags when a fix or fork is not yet published to the registry.
About
Documents and executes correct npm installation from Git repositories—URL formats, ref pinning, semver overrides, and lockfile implications—so agents can wire unpublished forks, monorepo subpaths, or hotfix branches without breaking CI reproducibility.
- npm install from git URLs
- Branch, tag, and commit pinning
- Fork and PR-dependency workflows
- Registry fallback awareness
- Safer lockfile expectations
Npm Git Install by the numbers
- 210 all-time installs (skills.sh)
- Ranked #197 of 550 CLI & Terminal skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/akillness/oh-my-skills --skill npm-git-installAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 210 |
|---|---|
| repo stars | ★ 40 |
| Last updated | August 4, 2026 |
| Repository | akillness/oh-my-skills ↗ |
What it does
Install npm packages directly from Git URLs, branches, or tags when a fix or fork is not yet published to the registry.
Files
Git-Based Node Package Install
Use this skill when the main question is "what install packet should we trust, what delivery path fits this dependency, and what should we do next?"
The job is not to dump every syntax variant or treat raw Git installs as normal infrastructure. The job is to: 1. normalize the package-delivery packet already in hand, 2. choose one primary delivery mode, 3. make durability, auth, and build consequences explicit, 4. tailor commands to the package manager actually in use, 5. leave a clear exit path when a temporary Git bridge is starting to become permanent.
Read references/intake-packets-and-route-outs.md before handling an unfamiliar delivery packet. Read references/delivery-decision-matrix.md when deciding between Git, tarball, workspace, or publish-first. Read references/package-manager-behavior.md for manager-specific caveats. Read references/private-auth-and-ci.md when CI or private auth is already part of the packet.
When to use this skill
- The user wants to install a Node package from GitHub or another Git host
- The package is unpublished, forked, branch-pinned, tag-pinned, commit-pinned, or private
- The package lives in a monorepo and the user is unsure whether Git install, workspace linking, tarball, or publish-first is the honest answer
- The user asks about
git+ssh,git+https,github:owner/repo, tarball installs,npm pack, orfile:/ workspace links - A shared dependency is still being treated like a temporary Git shortcut and someone needs to decide whether that shortcut should continue
When not to use this skill
- The main task is fixing local Git branch/history problems → use
git-workflow - The main task is creating or operating GitHub repos, packages, or releases at the admin level → use
github-repo-management - The main task is monorepo/task-runner automation rather than package-delivery choice → use
workflow-automation - The main task is broader runtime, machine, container, or service setup → use
system-environment-setup - The user already has a normal registry dependency and only needs an ordinary version bump
Instructions
Step 1: Start from the delivery packet already in hand
Use references/intake-packets-and-route-outs.md.
Normalize the request into one of these packet shapes:
temporary-bridge-packet— unpublished fix, fork, PR branch, or short-lived bridge to unblock work nowshared-bridge-packet— teammates or CI need the bridge too, so branch drift and lockfile stability matterprivate-auth-packet— the install path is private and the real risk is credential parity across local and CIartifact-fallback-packet— raw Git source installs are too brittle, but a full registry workflow is still too heavyworkspace-inner-loop-packet— both the app and package are being developed together locally or inside a monorepodurable-distribution-packet— the dependency is no longer a one-off bridge and should probably stop behaving like one
Capture the minimum useful frame:
Packet: shared-bridge-packet
Package manager: pnpm
Package state: unpublished fork fix
Audience: CI + teammates
Current ref: feature branch
Main risk: branch drift and auth parityRule: start from the packet the user already has. Do not force them through a perfect release-management template before answering.
Step 2: Choose one primary delivery mode
Pick exactly one primary mode:
direct-git-bridge— local-only or clearly temporary bridge from Gitsha-pinned-shared-bridge— Git is still the bridge, but shared reproducibility mattersprivate-git-auth-path— the short-term answer is still private Git, and the key constraint is auth paritytarball-or-pack-artifact— package the dependency without relying on raw Git source install behaviorworkspace-or-file-link— keep co-development local or monorepo-scopedpublish-first-registry-path— move to a durable distribution channel
Optional: mention one fallback mode, but do not flatten every request into a six-option menu.
Step 3: Classify durability
Use a small durability model:
- Tier 0 — local-only
- Tier 1 — team / CI bridge
- Tier 2 — durable shared package
- Tier 3 — production / release infrastructure
Capture only what changes the decision:
- who consumes it
- whether the ref is floating or fixed
- whether raw source install behavior is acceptable
- whether local and CI already share one auth story
- what the exit path should be if the dependency stays around
If the packet spans multiple tiers, plan for the highest one.
Step 4: Pick the safest mode from the ladder
Use references/delivery-decision-matrix.md.
Default order: 1. publish-first-registry-path 2. workspace-or-file-link 3. sha-pinned-shared-bridge 4. tarball-or-pack-artifact 5. direct-git-bridge
Rules:
- prefer SHA pins over floating branches for shared use
- prefer artifact or publish-first when raw Git build/prepare behavior is the risk
- prefer workspace / file when both sides move together locally
- treat private auth as a constraint, not proof that Git is the right long-term channel
Step 5: Tailor commands to the manager in use
Give the narrowest correct syntax only.
Common patterns:
- SHA-pinned bridge:
npm install github:owner/repo#<commit>/pnpm add github:owner/repo#<commit>/yarn add owner/repo#<commit>/bun add github:owner/repo#<commit> - Git URL forms:
git+https://github.com/owner/repo.git#<commit>orgit+ssh://git@github.com/owner/repo.git#<commit> - Tarball:
npm install https://.../package.tgz(or equivalent for pnpm / Yarn / Bun) - Local path:
"dep": "file:../relative-path"or the normal workspace flow
If publish-first is the right answer, give the handoff plan before dumping temporary Git syntax.
Step 6: Make auth, build, and reproducibility visible
Every answer must cover:
- chosen ref / artifact / published version strategy
- whether install pulls raw source + lifecycle/build behavior
- local + CI auth story
- deterministic install expectation (
npm ci, frozen lockfile equivalents, pinned ref) - replacement path once the dependency stops being temporary
Defaults:
- floating branches are convenience shortcuts, not shared infrastructure
- private Git is only as good as the worst environment's auth setup
- tarballs trade Git surprises for artifact ownership
- publish-first is usually the honest answer once the package becomes routine shared infrastructure
Step 7: Route the next owner immediately
This skill owns package-delivery choice, not every downstream task.
Typical route-outs:
git-workflow— fix or shape the underlying branch/history stategithub-repo-management— operate repos, packages, releases, or package-host settingsworkflow-automation— wire repeatable repo scripts or monorepo automation around the chosen package flowsystem-environment-setup— handle machine/runtime/container/service setup once the dependency question is no longer the main blocker
If the user asks “how should we consume this package?” stay here. If they ask “how do we administer hosting or fix auth at the platform level?” route out.
Step 8: Produce one concise install brief
Return a short operator-style brief with:
- packet
- primary mode
- durability tier
- 1-3 recommended steps
- only the needed commands
- auth / build / reproducibility notes
- exit strategy
- next owner if the work leaves this skill
If the honest answer is “publish this or package it properly,” say that directly.
Output format
Always return a Git package install brief, artifact recommendation brief, or publish-first handoff brief.
Required qualities:
- identify the packet already in hand
- choose one primary delivery mode
- classify durability explicitly
- make auth/build/reproducibility consequences visible
- tailor commands to the package manager actually in use
- leave a clear exit strategy
- route package hosting, repo admin, workflow glue, or environment setup to the right neighboring skill
Examples
Example 1: unpublished fix shared in CI
Input
We need an unpublished fix from a GitHub repo for our npm app. Should we install from the branch or do something safer for CI?
Good output direction
shared-bridge-packetsha-pinned-shared-bridge- rejects floating branch use for shared CI
- gives one npm-specific command plus an exit path
Example 2: private package auth trouble
Input
Our package is in a private GitHub repo and pnpm install keeps failing in CI. What path should we take?
Good output direction
private-auth-packet- chooses
private-git-auth-pathorpublish-first-registry-path - clarifies CI credential parity and avoids committed secrets
Example 3: monorepo or durable shared package
Input
The package lives in a monorepo. I use Yarn locally but the rest of the team just needs the package in normal projects. Should we install straight from GitHub?
Good output direction
workspace-inner-loop-packetordurable-distribution-packet- prefers workspace /
file:for local co-development or publish-first for durable use - does not oversell raw Git install
Best practices
1. Start from the delivery packet already in hand, not from a favorite syntax form. 2. Treat Git refs as a bridge, not a default release channel. 3. Prefer SHA pins over floating branches whenever a Git dependency will be shared. 4. Surface lifecycle/build behavior early; raw Git installs can behave like source packaging, not registry downloads. 5. Keep local, team/CI, and durable shared usage clearly separated. 6. Treat private-auth pain as a signal to re-evaluate the delivery path, not just patch credentials forever. 7. Recommend a durable exit path once the dependency stops being temporary. 8. Update compact and discovery surfaces when the front-door wording changes materially.
References
- Intake packets and route-outs
- Delivery decision matrix
- Package-manager behavior
- Private auth and CI notes
../git-workflow/SKILL.md../github-repo-management/SKILL.md../workflow-automation/SKILL.md../system-environment-setup/SKILL.md- npm package spec: https://docs.npmjs.com/cli/v11/using-npm/package-spec
- npm package.json Git docs: https://docs.npmjs.com/cli/v11/configuring-npm/package-json
- npm pack: https://docs.npmjs.com/cli/v11/commands/npm-pack
- pnpm add: https://pnpm.io/cli/add
- pnpm workspaces: https://pnpm.io/workspaces
- Yarn Git protocol: https://yarnpkg.com/protocol/git
- Yarn workspaces: https://yarnpkg.com/features/workspaces
- Bun add: https://bun.sh/docs/pm/cli/add
- GitHub Packages: https://docs.github.com/en/packages/learn-github-packages/introduction-to-github-packages
{
"skill_name": "npm-git-install",
"evals": [
{
"id": 1,
"prompt": "We need an unpublished fix from a GitHub repo for our npm app. Should we install from the branch or do something safer for CI?",
"expected_output": "Chooses SHA-pinned direct Git install or an even safer artifact/publish path, explains why floating branch refs are risky, and includes npm-focused commands.",
"assertions": [
"Output names exactly one primary delivery mode",
"Output warns against floating branch refs for shared/CI usage",
"Output includes npm-specific install syntax",
"Output includes an exit strategy back to a packaged release"
]
},
{
"id": 2,
"prompt": "Our package is in a private GitHub repo and pnpm install keeps failing in CI. What path should we take?",
"expected_output": "Explains private Git vs private registry tradeoff, clarifies auth/CI requirements, and avoids suggesting committed secrets.",
"assertions": [
"Output includes auth or CI notes",
"Output avoids recommending committed secrets",
"Output mentions pnpm-specific command or context",
"Output recommends a durable registry/artifact path when appropriate"
]
},
{
"id": 3,
"prompt": "The package lives in a monorepo. I use Yarn locally but the rest of the team just needs the package in normal projects. Should we install straight from GitHub?",
"expected_output": "Prefers workspace/file flow for local co-dev or publish-first for durable external use, and does not oversell raw Git installs for monorepo packages.",
"assertions": [
"Output distinguishes local co-development from shared external consumption",
"Output mentions Yarn/monorepo considerations",
"Output chooses one primary mode",
"Output warns that Git install is not always the best durable answer"
]
},
{
"id": 4,
"prompt": "Our marketing automation repo and game build tools both depend on the same internal Node package, and we still install it from main. Should we keep doing that or finally package it properly?",
"expected_output": "Treats the package as durable shared infrastructure, rejects floating-branch installs as the long-term answer, and recommends publish-first or artifact-based distribution with a clear handoff.",
"assertions": [
"Output identifies the dependency as durable shared usage rather than a temporary bridge",
"Output warns against continuing to install from a floating branch",
"Output recommends publish-first or tarball/artifact distribution as the primary path",
"Output routes package-host or release administration to github-repo-management when needed"
]
}
]
}
Delivery Decision Matrix
Use this matrix before giving commands.
| Situation | Prefer | Why |
|---|---|---|
| Need an unpublished fix or fork right now | Direct Git install with SHA pin | Fast bridge with better reproducibility than a floating branch |
| Need a private package for one repo or short-lived internal test | Private Git install | Acceptable if SSH/token auth is already solved everywhere it must run |
| Need a package shared across teammates, CI, or production for more than a short bridge | Publish-first / private registry | Best release hygiene, onboarding, lockfile clarity, and CI reliability |
| Need packaged output without registry overhead | Tarball / npm pack artifact | Safer than raw Git when build/prepare behavior is risky |
| Developing package + app together on the same machine or monorepo | Workspace / file: / local link | Best inner-loop speed; not a remote distribution strategy |
User asks for #main / #master on a dependency that will be shared | Push them to SHA pin or publish | Branches drift and make incident response harder |
| Monorepo package root is not repo root | Prefer workspace-aware tooling or publish-per-package | Raw Git install support varies; avoid pretending all managers behave the same |
Default recommendation order
1. Publish-first / private registry for durable shared usage 2. Workspace / file: for active local co-development 3. SHA-pinned Git install for short-lived bridges 4. Tarball / npm pack when packaged artifacts are needed without full registry setup 5. Floating-branch Git install only as an explicitly temporary convenience
Intake Packets and Route-outs
Start from the package-delivery packet the user already has. Do not force every request through a giant syntax tour.
temporary-bridge-packet
Use when the request is about an unpublished fix, fork, PR branch, or short-lived unblocker.
Capture:
- package manager
- repo/ref currently being considered
- whether the bridge is local-only or already shared
- how long the bridge is expected to live
Good outcomes:
- one direct Git bridge recommendation
- one warning if the user is about to use a floating branch for shared work
- one exit strategy note
Route out when:
- the real work is fixing the underlying branch/history state →
git-workflow - the real work is publishing or administering the package host →
github-repo-management
shared-bridge-packet
Use when teammates or CI need the same bridge and reproducibility now matters.
Capture:
- current ref type: branch, tag, SHA
- whether lockfiles and deterministic install commands are already part of the workflow
- whether multiple repos or deploy environments depend on the same bridge
Look for:
- SHA pin over floating branch
- one clear package-manager-specific command
- one honest recommendation for when to stop bridging and publish/package properly
Route out when:
- the next job is wiring scripts or repeatable repo automation around the chosen flow →
workflow-automation
private-auth-packet
Use when the install path is private and auth parity is the real blocker.
Capture:
- SSH vs HTTPS token vs registry token path
- whether local and CI use the same auth story
- whether the bridge is still temporary or has become routine infrastructure
Good outcomes:
- one chosen auth path
- one explicit CI parity note
- one warning against committing secrets into manifests or docs
Route out when:
- package hosting/repo admin is now the real work →
github-repo-management - machine/runtime provisioning is the blocker rather than package choice →
system-environment-setup
artifact-fallback-packet
Use when raw Git installs are too brittle but a full registry workflow is not justified yet.
Capture:
- whether install-time build/prepare behavior is unsafe or surprising
- who owns artifact refresh/versioning
- whether a tarball URL or
npm packflow is acceptable
Look for:
- tarball /
npm packrecommendation - explicit artifact ownership
- clear explanation of why raw Git is the wrong fit here
Route out when:
- release/package publication is now the better long-term answer →
github-repo-management
workspace-inner-loop-packet
Use when both the app and package are being developed together locally or within one monorepo-style workflow.
Capture:
- whether the package is only needed on one machine/repo right now
- whether workspace-aware tooling already exists
- whether the user is accidentally solving a local co-dev problem with a remote Git dependency
Good outcomes:
- workspace /
file:recommendation - explicit note that this is not a remote distribution strategy
- route away from raw Git when the package root / monorepo layout makes that misleading
Route out when:
- the main job is monorepo automation or task-runner wiring →
workflow-automation
durable-distribution-packet
Use when the package is no longer a one-off bridge and multiple repos, teammates, CI, or production depend on it routinely.
Capture:
- number of consuming repos/environments
- onboarding/release friction
- whether branch/SHA installs are now acting like permanent infrastructure
Good outcomes:
- publish-first / private registry recommendation
- artifact fallback only when registry overhead is still genuinely too high
- clear statement that floating Git refs are not durable shared infrastructure
Route out when:
- the next job is package-host administration, release setup, or registry configuration →
github-repo-management
Quick route-out table
| If the real question is... | Route to |
|---|---|
| How should we consume this Node package right now? | npm-git-install |
| How do we fix the branch/history state behind the dependency? | git-workflow |
| How do we run or automate the chosen install/release flow in the repo? | workflow-automation |
| How do we administer repos, releases, packages, or package hosts? | github-repo-management |
| How do we provision the machine/runtime/container so installs work at all? | system-environment-setup |
Rule of thumb
A good delivery packet is the smallest artifact set that lets you choose one honest install path. If the packet still cannot support that choice, ask for one missing artifact or route to the neighboring skill that owns the next step.
Package-Manager Behavior Notes
Shared reality
All major managers can install from Git, but Git dependencies are not always equivalent to registry tarballs.
Common consequences:
- install may involve cloning the repo
- lifecycle/build steps can run
- auth and Git host access become part of dependency installation
- monorepo/subdir support is uneven
npm
- Strong baseline syntax support for GitHub shorthands and Git URLs
- Important caveat: Git dependencies may trigger packing/build-related lifecycle behavior
- Good fit when the repo already uses npm and the need is straightforward
pnpm
- Similar Git-install ergonomics to npm for many cases
- Strong workspace story for pnpm-managed repos, but still decide whether remote Git is the right tool before defaulting to it
Yarn
- Git protocol is a first-class concept
- Especially relevant when the upstream repo is Yarn-oriented or the package lives in a workspace/monorepo setup
- Better place to mention repo/workspace-specific Git behavior than pretending npm-style rules cover everything
Bun
- Bun can install from Git and tarballs with concise syntax
- Still apply the same decision rules: direct Git is a bridge, not automatically the best long-term package channel
Operator rule
When the package manager is known, give only the commands for that manager unless a contrast is necessary.
Private Auth and CI Notes
Prefer explicit auth choice
Choose one path and say it clearly:
- SSH-based Git auth when developer machines and CI already have key/discoverability support
- HTTPS token auth when the environment is standardized around tokens/secrets managers
- Registry token auth when the package is durable enough that a private registry is the cleaner answer
Rules
- Do not recommend embedding secrets directly into committed manifests, example code, or docs.
- If the dependency must work on teammate machines and CI, call out that credential parity is part of the task.
- If auth friction is already dominating the problem, recommend a private registry or artifact-based distribution instead of doubling down on raw Git URLs.
CI checklist
- Git host access is available on the runner
- the chosen auth method is injected through the platform's secret mechanism
- host key / SSH known-host setup is handled if SSH is used
- the runner has any toolchain needed by install-time build/prepare steps
- the dependency ref is pinned strongly enough for incident/debug reproduction
Exit heuristic
If the package is shared, private, and expected to persist, registry-based auth usually ages better than repeated Git credential setup.
N:npm-git-install
D:Route Node package-delivery ambiguity into one install packet: temporary Git bridge, SHA-pinned shared bridge, private-auth Git path, tarball / `npm pack` artifact, workspace / `file:` inner-loop, or publish-first registry handoff.
G:npm pnpm yarn bun git github package-management node monorepo private-packages tarball workspace
U[6]:
Choose the safest way to consume an unpublished fix, fork, private repo package, or monorepo package
Decide whether a Git dependency should stay a Git ref at all
Handle private Git package auth and CI parity without treating credentials as the whole answer
Prefer tarball or `npm pack` artifacts when raw Git installs are too brittle
Prefer workspace or `file:` links for local co-development
Move durable shared packages toward publish-first / registry paths instead of floating branch installs
S[8]{n,action,details}:
1,Normalize packet,Capture package manager, packet shape, current ref, audience, auth path, lifecycle/build risk, and durability tier
2,Choose mode,Pick exactly one path: direct Git bridge, SHA-pinned shared bridge, private-auth Git, tarball/pack artifact, workspace/file link, or publish-first registry
3,Classify durability,Separate local-only, team/CI bridge, durable shared package, and production-facing infrastructure
4,Pick safest packet,Prefer publish-first or workspace when honest; use SHA pin over floating branches for shared bridges
5,Tailor commands,Give only the needed npm/pnpm/Yarn/Bun syntax for the chosen path
6,Flag consequences,Explain auth parity, install-time build/lifecycle behavior, deterministic lockfile expectations, and exit strategy
7,Route out,Send Git history issues, repo/package admin, repo automation, or environment setup to neighboring skills
8,Return brief,Produce one concise install brief with commands, notes, and next owner
R[6]:
Treat Git refs as bridges, not a default release channel
Prefer SHA pins over floating branches whenever a Git dependency will be shared
Do not recommend committed secrets in manifests or docs
Use workspace/file links for local co-development, not remote third-party distribution
Recommend tarball or publish-first when raw Git install is too brittle or too durable for the use case
Always leave a clear exit strategy for temporary Git-based dependencies