Feature Request: Support for Private Git Repositories and npm Packages #2

Closed
opened 2026-02-12 08:39:27 +00:00 by yorickshan · 4 comments
yorickshan commented 2026-02-12 08:39:27 +00:00 (Migrated from github.com)

🎯 Summary

Add support for installing skills from:

  1. Private Git repositories (GitLab, Bitbucket, self-hosted)
  2. npm packages (public and private registries)

🔍 Current Limitation

Currently, agent-skills-cli only supports:

  • Public GitHub repositories
  • GitHub repositories with authentication
  • Private GitLab/Bitbucket repositories
  • npm packages

Example that doesn't work:

# Private GitLab - fails with "Could not find..."
skills add git.company.com/team/skill-repo

# npm package - not supported
skills add @company/code-review-skills

💡 Use Cases

1. Enterprise Private GitLab/Bitbucket

Many organizations use self-hosted Git servers for internal tools:

# GitLab
skills add git.wosai-inc.com/ITFE/code-review-skills

# Bitbucket
skills add bitbucket.company.com/project/skill-repo

# Self-hosted GitLab with custom port
skills add git.company.com:8443/team/skills

2. npm Registry Distribution

Organizations often distribute internal tools via npm registries:

# From public npm
skills add @company/eslint-skills

# From private registry
skills add @company/internal-review-skills --registry=https://npm.company.com

# From GitHub packages
skills add @company/skills --registry=https://npm.pkg.github.com

🛠️ Proposed Solution

Option 1: Generic Git URL Support

Support any Git URL format with authentication:

# With SSH
skills add [email protected]:team/repo.git

# With HTTPS + token
skills add https://oauth2:[email protected]/team/repo.git

# Auto-detect from git config
skills add https://git.company.com/team/repo.git
# → uses credentials from ~/.gitconfig or SSH keys

Option 2: npm Package Support

Add npm as a source type:

# Basic npm install
skills add npm:@company/skills

# With specific registry
skills add npm:@company/skills --registry=https://npm.company.com

# Auto-detect from .npmrc
skills add npm:@company/skills
# → uses registry from ~/.npmrc or project .npmrc

Option 3: Configuration File

Support a .skillsrc config file:

{
  "sources": [
    {
      "type": "git",
      "url": "https://git.company.com/team/skills",
      "auth": "token"
    },
    {
      "type": "npm",
      "registry": "https://npm.company.com",
      "scope": "@company"
    }
  ]
}

📝 Implementation Details

Git Authentication

  • Check for existing Git credentials (SSH keys, credential helper)
  • Support environment variables: GIT_TOKEN, GITLAB_TOKEN
  • Fallback to interactive authentication

npm Authentication

  • Read from ~/.npmrc for registry config
  • Support .npmrc in project directory
  • Respect npm authentication tokens

Package Structure Detection

Both Git and npm sources should support the same skill structure:

repo-or-package/
├── skills/
│   └── my-skill/
│       └── SKILL.md
└── package.json (optional for npm)

🌟 Benefits

  1. Enterprise Adoption: Enable companies with private repositories to use agent-skills-cli
  2. npm Ecosystem: Leverage existing npm infrastructure for skill distribution
  3. Access Control: Use existing Git/npm authentication and permissions
  4. Version Management: npm packages provide semantic versioning out of the box
  • skills-npm - npm-based skill installer (inspiration for npm support)
  • Similar tools support both Git and npm: npx, bunx, degit

🙏 Additional Context

We're building a comprehensive code review skill (@sqb/code-review-skills) distributed via:

  • Internal GitLab: git.wosai-inc.com/ITFE/code-review-skills
  • Internal npm registry: @sqb/code-review-skills

Currently, users without GitLab access cannot use agent-skills-cli, forcing them to use alternative installation methods. Supporting npm would enable broader adoption.

## 🎯 Summary Add support for installing skills from: 1. **Private Git repositories** (GitLab, Bitbucket, self-hosted) 2. **npm packages** (public and private registries) ## 🔍 Current Limitation Currently, `agent-skills-cli` only supports: - ✅ Public GitHub repositories - ✅ GitHub repositories with authentication - ❌ Private GitLab/Bitbucket repositories - ❌ npm packages ### Example that doesn't work: ```bash # Private GitLab - fails with "Could not find..." skills add git.company.com/team/skill-repo # npm package - not supported skills add @company/code-review-skills ``` ## 💡 Use Cases ### 1. Enterprise Private GitLab/Bitbucket Many organizations use self-hosted Git servers for internal tools: ```bash # GitLab skills add git.wosai-inc.com/ITFE/code-review-skills # Bitbucket skills add bitbucket.company.com/project/skill-repo # Self-hosted GitLab with custom port skills add git.company.com:8443/team/skills ``` ### 2. npm Registry Distribution Organizations often distribute internal tools via npm registries: ```bash # From public npm skills add @company/eslint-skills # From private registry skills add @company/internal-review-skills --registry=https://npm.company.com # From GitHub packages skills add @company/skills --registry=https://npm.pkg.github.com ``` ## 🛠️ Proposed Solution ### Option 1: Generic Git URL Support Support any Git URL format with authentication: ```bash # With SSH skills add [email protected]:team/repo.git # With HTTPS + token skills add https://oauth2:[email protected]/team/repo.git # Auto-detect from git config skills add https://git.company.com/team/repo.git # → uses credentials from ~/.gitconfig or SSH keys ``` ### Option 2: npm Package Support Add npm as a source type: ```bash # Basic npm install skills add npm:@company/skills # With specific registry skills add npm:@company/skills --registry=https://npm.company.com # Auto-detect from .npmrc skills add npm:@company/skills # → uses registry from ~/.npmrc or project .npmrc ``` ### Option 3: Configuration File Support a `.skillsrc` config file: ```json { "sources": [ { "type": "git", "url": "https://git.company.com/team/skills", "auth": "token" }, { "type": "npm", "registry": "https://npm.company.com", "scope": "@company" } ] } ``` ## 📝 Implementation Details ### Git Authentication - Check for existing Git credentials (SSH keys, credential helper) - Support environment variables: `GIT_TOKEN`, `GITLAB_TOKEN` - Fallback to interactive authentication ### npm Authentication - Read from `~/.npmrc` for registry config - Support `.npmrc` in project directory - Respect npm authentication tokens ### Package Structure Detection Both Git and npm sources should support the same skill structure: ``` repo-or-package/ ├── skills/ │ └── my-skill/ │ └── SKILL.md └── package.json (optional for npm) ``` ## 🌟 Benefits 1. **Enterprise Adoption**: Enable companies with private repositories to use agent-skills-cli 2. **npm Ecosystem**: Leverage existing npm infrastructure for skill distribution 3. **Access Control**: Use existing Git/npm authentication and permissions 4. **Version Management**: npm packages provide semantic versioning out of the box ## 📚 Related Projects - [skills-npm](https://github.com/antfu/skills-npm) - npm-based skill installer (inspiration for npm support) - Similar tools support both Git and npm: `npx`, `bunx`, `degit` ## 🙏 Additional Context We're building a comprehensive code review skill (`@sqb/code-review-skills`) distributed via: - Internal GitLab: `git.wosai-inc.com/ITFE/code-review-skills` - Internal npm registry: `@sqb/code-review-skills` Currently, users without GitLab access cannot use agent-skills-cli, forcing them to use alternative installation methods. Supporting npm would enable broader adoption.
Karanjot786 commented 2026-02-12 15:50:44 +00:00 (Migrated from github.com)

Hi @yorickshan, Thank you for the feature suggestion! I really appreciate the idea. I'll add this new feature and have it ready by tomorrow. Great suggestion!

Hi @yorickshan, Thank you for the feature suggestion! I really appreciate the idea. I'll add this new feature and have it ready by tomorrow. Great suggestion!
Karanjot786 commented 2026-02-13 07:39:11 +00:00 (Migrated from github.com)

Hey! @yorickshan, This feature has been fully implemented and is now available. Here's what's included:

npx agent-skills-cli@latest install git.wosai-inc.com/ITFE/code-review-skills -a cursor
npx agent-skills-cli@latest install npm:@sqb/code-review-skills --registry https://your-npm-registry-url -a cursor

Note on --registry: You only need this flag if your private registry isn't already configured in your .npmrc. If npm install @sqb/... works in your terminal, npx agent-skills-cli@latest install will automatically pick it up without the flag!

🔐 Private Git Repos

  • SSH: npx agent-skills-cli@latest install [email protected]:team/repo.git
  • HTTPS + Token: npx agent-skills-cli@latest install https://git.company.com/team/repo --token=xxx
  • Bitbucket: npx agent-skills-cli@latest install https://bitbucket.org/team/repo
  • Turn generic domains into private Git URLs: git.wosai-inc.com/owner/repo
  • Auto credential resolution: --token flag → env vars (GH_TOKEN, GITLAB_TOKEN, BITBUCKET_TOKEN, GIT_TOKEN) → SSH keys → git credential helper → .netrc

📦 npm Packages

  • Public: npx agent-skills-cli@latest install npm:chalk
  • Scoped: npx agent-skills-cli@latest install npm:@company/[email protected]
  • Private registries: npx agent-skills-cli@latest install npm:@company/skills --registry https://npm.company.com

⚙️ .skillsrc Configuration

  • Project-level and user-level config files for enterprise setups
  • Define custom Git sources, npm registries, auth env vars, and default settings

Try it out, test it, and feel free to suggest any new features or improvements! 🚀

Hey! @yorickshan, This feature has been fully implemented and is now available. Here's what's included: ```bash npx agent-skills-cli@latest install git.wosai-inc.com/ITFE/code-review-skills -a cursor ``` ```bash npx agent-skills-cli@latest install npm:@sqb/code-review-skills --registry https://your-npm-registry-url -a cursor ``` **Note on** `--registry`: You only need this flag if your private registry isn't already configured in your `.npmrc`. If `npm install @sqb/...` works in your terminal, `npx agent-skills-cli@latest install` will automatically pick it up without the flag! 🔐 Private Git Repos - SSH: `npx agent-skills-cli@latest install [email protected]:team/repo.git` - HTTPS + Token: `npx agent-skills-cli@latest install https://git.company.com/team/repo --token=xxx` - Bitbucket: `npx agent-skills-cli@latest install https://bitbucket.org/team/repo` - Turn generic domains into private Git URLs: `git.wosai-inc.com/owner/repo` - Auto credential resolution: `--token` flag → env vars (`GH_TOKEN`, `GITLAB_TOKEN`, `BITBUCKET_TOKEN`, `GIT_TOKEN`) → SSH keys → git credential helper → `.netrc` 📦 npm Packages - Public: `npx agent-skills-cli@latest install npm:chalk` - Scoped: `npx agent-skills-cli@latest install npm:@company/[email protected]` - Private registries: `npx agent-skills-cli@latest install npm:@company/skills --registry https://npm.company.com` ⚙️ `.skillsrc` Configuration - Project-level and user-level config files for enterprise setups - Define custom Git sources, npm registries, auth env vars, and default settings Try it out, test it, and feel free to suggest any new features or improvements! 🚀
yorickshan commented 2026-02-13 11:05:19 +00:00 (Migrated from github.com)

Nice work, thx for your efforts!

Nice work, thx for your efforts!
Karanjot786 commented 2026-02-13 13:27:31 +00:00 (Migrated from github.com)

You're welcome! Glad you found it helpful! 😊

You're welcome! Glad you found it helpful! 😊
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rtlabs-llm-agents/agent-skills-cli#2
No description provided.