npm-git-install
Install npm packages directly from GitHub repositories using git URLs. Use when installing packages from private repos, specific branches, or unreleased versions not yet on npm registry.
Best use case
npm-git-install is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Install npm packages directly from GitHub repositories using git URLs. Use when installing packages from private repos, specific branches, or unreleased versions not yet on npm registry.
Install npm packages directly from GitHub repositories using git URLs. Use when installing packages from private repos, specific branches, or unreleased versions not yet on npm registry.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "npm-git-install" skill to help with this workflow task. Context: Install npm packages directly from GitHub repositories using git URLs. Use when installing packages from private repos, specific branches, or unreleased versions not yet on npm registry.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/npm-git-install/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How npm-git-install Compares
| Feature / Agent | npm-git-install | 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?
Install npm packages directly from GitHub repositories using git URLs. Use when installing packages from private repos, specific branches, or unreleased versions not yet on npm registry.
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 install Git Repository Guide
Covers how to install npm packages directly from GitHub repositories. Useful for installing packages not in the npm registry, specific branches, or private repositories.
## When to use this skill
- **Packages Not on npm**: Install packages not yet published
- **Specific Branch/Tag**: Install main, develop, specific release tags
- **Private Repositories**: Install packages within an organization
- **Forked Packages**: Use a modified fork version
- **Test Latest Commits**: Test the latest code before a release
---
## 1. Installation Commands
### Basic Syntax
```bash
npm install git+https://github.com/<owner>/<repo>.git#<branch|tag|commit>
```
### HTTPS Method (Common)
```bash
# Specific branch
npm install -g git+https://github.com/JEO-tech-ai/supercode.git#main
# Specific tag
npm install git+https://github.com/owner/repo.git#v1.0.0
# Specific commit
npm install git+https://github.com/owner/repo.git#abc1234
# Default branch (omit #)
npm install git+https://github.com/owner/repo.git
```
### SSH Method (With SSH Key Setup)
```bash
npm install -g git+ssh://git@github.com:JEO-tech-ai/supercode.git#main
```
### Verbose Logging
```bash
npm install -g git+https://github.com/JEO-tech-ai/supercode.git#main --verbose
```
---
## 2. npm install Flow
What npm performs when installing from a Git URL:
```
1. Git Clone
└─ Clone repository at specified branch (#main)
↓
2. Install Dependencies
└─ Install dependencies in package.json
↓
3. Run Prepare Script
└─ Run "prepare" script (TypeScript compile, build, etc.)
↓
4. Register Global Binary
└─ Link executable from bin field to global path
```
### Internal Operation
```bash
# What npm does internally
git clone https://github.com/owner/repo.git /tmp/npm-xxx
cd /tmp/npm-xxx
git checkout main
npm install
npm run prepare # Run if exists
cp -r . /usr/local/lib/node_modules/repo/
ln -s ../lib/node_modules/repo/bin/cli.js /usr/local/bin/repo
```
---
## 3. Verify Installation Location
```bash
# Check global npm path
npm root -g
# macOS/Linux: /usr/local/lib/node_modules
# Windows: C:\Users\<username>\AppData\Roaming\npm\node_modules
# Check installed package
npm list -g <package-name>
# Check binary location
which <command>
# or
npm bin -g
```
### Installation Locations by Platform
| Platform | Package Location | Binary Location |
|----------|-----------------|----------------|
| macOS/Linux | `/usr/local/lib/node_modules/` | `/usr/local/bin/` |
| Windows | `%AppData%\npm\node_modules\` | `%AppData%\npm\` |
| nvm (macOS) | `~/.nvm/versions/node/vX.X.X/lib/node_modules/` | `~/.nvm/versions/node/vX.X.X/bin/` |
---
## 4. Add Dependencies to package.json
### Use Git URL in dependencies
```json
{
"dependencies": {
"supercode": "git+https://github.com/JEO-tech-ai/supercode.git#main",
"my-package": "git+ssh://git@github.com:owner/repo.git#v1.0.0",
"another-pkg": "github:owner/repo#branch"
}
}
```
### Shorthand Syntax
```json
{
"dependencies": {
"pkg1": "github:owner/repo",
"pkg2": "github:owner/repo#branch",
"pkg3": "github:owner/repo#v1.0.0",
"pkg4": "github:owner/repo#commit-sha"
}
}
```
---
## 5. Install from Private Repositories
### SSH Key Method (Recommended)
```bash
# 1. Generate SSH key
ssh-keygen -t ed25519 -C "your_email@example.com"
# 2. Register public key on GitHub
cat ~/.ssh/id_ed25519.pub
# GitHub → Settings → SSH Keys → New SSH Key
# 3. Install via SSH method
npm install git+ssh://git@github.com:owner/private-repo.git
```
### Personal Access Token Method
```bash
# 1. Create PAT on GitHub
# GitHub → Settings → Developer settings → Personal access tokens
# 2. Install with token in URL
npm install git+https://<token>@github.com/owner/private-repo.git
# 3. Use environment variable (recommended for security)
export GITHUB_TOKEN=ghp_xxxxxxxxxxxx
npm install git+https://${GITHUB_TOKEN}@github.com/owner/private-repo.git
```
### .npmrc Configuration
```bash
# ~/.npmrc
//github.com/:_authToken=${GITHUB_TOKEN}
```
---
## 6. Common Errors & Solutions
### Permission denied (EACCES)
```bash
# Method 1: Change ownership
sudo chown -R $(whoami) /usr/local/lib/node_modules
# Method 2: Change npm directory (recommended)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
```
### Git Not Installed
```bash
# macOS
brew install git
# Ubuntu/Debian
sudo apt-get install git
# Windows
# https://git-scm.com/download/win
```
### GitHub Authentication Error
```bash
# Test SSH connection
ssh -T git@github.com
# Cache credentials
git config --global credential.helper store
# or macOS
git config --global credential.helper osxkeychain
```
### prepare Script Failure
```bash
# For TypeScript projects
npm install -g typescript
# Verbose log on build failure
npm install git+https://... --verbose 2>&1 | tee npm-install.log
```
### Cache Issues
```bash
# Clear npm cache
npm cache clean --force
# Reinstall
npm uninstall -g <package>
npm install -g git+https://...
```
---
## 7. Update & Manage
### Update
```bash
# Update to latest version (reinstall)
npm uninstall -g <package>
npm install -g git+https://github.com/owner/repo.git#main
# Update package.json dependency
npm update <package>
```
### Check Version
```bash
# Check installed version
npm list -g <package>
# Check remote latest commit
git ls-remote https://github.com/owner/repo.git HEAD
```
### Remove
```bash
npm uninstall -g <package>
```
---
## 8. Cursor/VS Code Extension Integration Example
### Supercode Installation Example
```bash
# Global install
npm install -g git+https://github.com/JEO-tech-ai/supercode.git#main
# Verify installation
supercode --version
```
### Project Configuration File
```json
// .supercoderc or supercode.config.json
{
"aiRules": {
"enabled": true,
"techStack": ["TypeScript", "React", "Node.js"]
},
"smartActions": [
{
"name": "Generate Documentation",
"icon": "docs",
"prompt": "Generate comprehensive documentation"
}
],
"architectureMode": {
"enabled": true,
"detailLevel": "detailed"
}
}
```
---
## 9. Best Practices
### DO (Recommended)
1. **Use Specific Version/Tag**: Pin version with `#v1.0.0` format
2. **Prefer SSH Method**: Use SSH key when accessing private repos
3. **Manage Token via Environment Variables**: Store PAT in env vars
4. **Commit Lockfile**: Ensure reproducibility by committing package-lock.json
5. **Use Verbose Option**: Check detailed logs when issues occur
### DON'T (Prohibited)
1. **Hardcode Tokens**: Do not input tokens directly in package.json
2. **Depend on Latest Commit**: Use tags instead of `#main` in production
3. **Abuse sudo**: Resolve permission issues with directory configuration
4. **Ignore Cache**: Clear cache when experiencing unusual behavior
---
## Constraints
### Required Rules (MUST)
1. **Git Must Be Installed**: Verify git is installed before npm git URL install
2. **Network Access**: Environment with access to GitHub required
3. **Node.js Version**: Check engines field in package.json
### Prohibited (MUST NOT)
1. **Expose Auth Tokens**: Do not expose tokens in logs or code
2. **Indiscriminate sudo**: Resolve permission issues with configuration
3. **Use #main in Production**: Pin to specific version/tag
---
## References
- [npm-install Official Documentation](https://docs.npmjs.com/cli/v9/commands/npm-install/)
- [How To Install NPM Packages Directly From GitHub](https://www.warp.dev/terminus/npm-install-from-github)
- [npm install from GitHub - Stack Overflow](https://stackoverflow.com/questions/17509669/how-to-install-an-npm-package-from-github-directly)
- [Working with the npm registry - GitHub Docs](https://docs.github.com/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)
---
## Metadata
### Version
- **Current Version**: 1.0.0
- **Last Updated**: 2026-01-10
- **Compatible Platforms**: Claude, ChatGPT, Gemini, Opencode
### Related Skills
- [environment-setup](../environment-setup/SKILL.md)
- [git-workflow](../git-workflow/SKILL.md)
### Tags
`#npm` `#git` `#github` `#install` `#package-management` `#node`Related Skills
routeros-netinstall
MikroTik netinstall-cli for automated RouterOS device flashing. Use when: automating netinstall, writing scripts that invoke netinstall-cli, building netinstall tooling, understanding etherboot/BOOTP/TFTP protocols, working with RouterOS package files (.npk), using modescript or configure script, or when the user mentions netinstall, etherboot, or device flashing.
gate-mcp-installer
One-click installer and configurator for Gate MCP (mcporter) in OpenClaw. Use when the user wants to (1) Install mcporter CLI tool, (2) Configure Gate MCP server connection, (3) Verify Gate MCP setup, or (4) Troubleshoot Gate MCP connectivity issues.
skill-installer
Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).
installing-skill-tracker
Installs Claude Code hooks for automatic skill usage measurement. Use when setting up skill tracking infrastructure in a new project. NOT when hooks are already installed (run verify.py to check).
azure-quotas
Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: "check quotas", "service limits", "current usage", "request quota increase", "quota exceeded", "validate capacity", "regional availability", "provisioning limits", "vCPU limit", "how many vCPUs available in my subscription".
raindrop-io
Manage Raindrop.io bookmarks with AI assistance. Save and organize bookmarks, search your collection, manage reading lists, and organize research materials. Use when working with bookmarks, web research, reading lists, or when user mentions Raindrop.io.
zlibrary-to-notebooklm
自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。
discover-skills
当你发现当前可用的技能都不够合适(或用户明确要求你寻找技能)时使用。本技能会基于任务目标和约束,给出一份精简的候选技能清单,帮助你选出最适配当前任务的技能。
web-performance-seo
Fix PageSpeed Insights/Lighthouse accessibility "!" errors caused by contrast audit failures (CSS filters, OKLCH/OKLAB, low opacity, gradient text, image backgrounds). Use for accessibility-driven SEO/performance debugging and remediation.
project-to-obsidian
将代码项目转换为 Obsidian 知识库。当用户提到 obsidian、项目文档、知识库、分析项目、转换项目 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入规则(默认到 00_Inbox/AI/、追加式、统一 Schema) 3. 执行 STEP 0: 使用 AskUserQuestion 询问用户确认 4. 用户确认后才开始 STEP 1 项目扫描 5. 严格按 STEP 0 → 1 → 2 → 3 → 4 顺序执行 【禁止行为】: - 禁止不读 SKILL.md 就开始分析项目 - 禁止跳过 STEP 0 用户确认 - 禁止直接在 30_Resources 创建(先到 00_Inbox/AI/) - 禁止自作主张决定输出位置
obsidian-helper
Obsidian 智能笔记助手。当用户提到 obsidian、日记、笔记、知识库、capture、review 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入三条硬规矩(00_Inbox/AI/、追加式、白名单字段) 3. 按 STEP 0 → STEP 1 → ... 顺序执行 4. 不要跳过任何步骤,不要自作主张 【禁止行为】: - 禁止不读 SKILL.md 就开始工作 - 禁止跳过用户确认步骤 - 禁止在非 00_Inbox/AI/ 位置创建新笔记(除非用户明确指定)
internationalizing-websites
Adds multi-language support to Next.js websites with proper SEO configuration including hreflang tags, localized sitemaps, and language-specific content. Use when adding new languages, setting up i18n, optimizing for international SEO, or when user mentions localization, translation, multi-language, or specific languages like Japanese, Korean, Chinese.