Recipe: Private Enterprise Skills
Install skills from private repositories using token authentication.
Scenario
Your organization hosts internal skills in a private GitHub/GitLab repository. You need to install and update these skills without exposing credentials in config files.
Solution
Step 1: Set up authentication
skillshare detects tokens from environment variables, with platform-specific vars taking priority over the generic fallback:
| Platform | Environment Variable |
|---|---|
| GitHub / GitHub Enterprise | GITHUB_TOKEN |
| GitLab / Self-hosted GitLab | GITLAB_TOKEN |
| Bitbucket | BITBUCKET_TOKEN (+ optional BITBUCKET_USERNAME) |
| Azure DevOps | AZURE_DEVOPS_TOKEN |
| Any platform (fallback) | SKILLSHARE_GIT_TOKEN |
# Option A: Git credential helper (recommended for GitHub)
gh auth login # sets up git credential helper for HTTPS
# Option B: Platform-specific environment variable
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxx # GitHub
export GITLAB_TOKEN=glpat-xxxxxxxxxxxxx # GitLab
export AZURE_DEVOPS_TOKEN=your-pat-here # Azure DevOps
# Option C: Generic fallback (works with any HTTPS host)
export SKILLSHARE_GIT_TOKEN=your-token-here
Step 2: Install from private repo
skillshare install your-org/internal-skills --track
skillshare detects the token automatically from the environment variables listed above.
Step 3: Verify tracking
skillshare list
The installed repo appears with the _ prefix (tracked repository):
_your-org-internal-skills/
├── code-review/
├── testing-standards/
└── deployment-checklist/
Step 4: Update cycle
skillshare check # Detect upstream changes
skillshare update # Pull latest
skillshare sync # Push to targets
Verification
skillshare listshows the tracked reposkillshare checkcan reach the remote and compare hashesskillshare synccreates symlinks in all targets
Variations
- Selective install:
skillshare install your-org/internal-skills --track --skill code-reviewinstalls only one skill - CI/CD token: In pipelines, set the platform-specific env var (e.g.,
GITHUB_TOKEN) from CI secrets - Self-hosted GitLab: Set
GITLAB_TOKENand use HTTPS URL:skillshare install https://gitlab.internal.com/team/skills.git --track - Gitee / AtomGit: Supported via HTTPS URLs with
SKILLSHARE_GIT_TOKEN