Files
skillshare/website/docs/reference/appendix/url-formats.md
T
Willie cf36965cea feat(website): add zh-Hant/zh-Hans/ja/ko locales with initial docs translation
Sets up Docusaurus i18n for Traditional Chinese, Simplified Chinese,
Japanese, and Korean: locale config, navbar/footer/sidebar UI chrome,
and translated content for intro, getting-started, understand, and
reference/commands. Untranslated pages fall back to English.

Pins explicit heading anchors ({#id}) on English source pages that are
linked to by fragment, so translated headings don't change the anchor
id and break cross-page links. Converts a handful of relative .md
links that crossed from an untranslated page into a now-translated
one, since Docusaurus resolves those per-locale and they'd otherwise
404 outside English.
2026-09-20 11:08:48 +08:00

265 lines
7.9 KiB
Markdown

---
sidebar_position: 4
---
# URL Formats
All source URL patterns recognized by `skillshare install`.
## Quick Reference
| Format | Example | Notes |
|--------|---------|-------|
| GitHub shorthand | `owner/repo` | Expands to `github.com/owner/repo` |
| GitHub with subdir | `owner/repo/path/to/skill` | Installs specific skill from repo |
| Full HTTPS | `https://github.com/owner/repo` | Any Git host |
| Full HTTPS with subdir | `https://github.com/owner/repo/path` | Subdir after host/owner/repo |
| SSH | `git@github.com:owner/repo.git` | Private repos via SSH key |
| SSH with subdir | `git@github.com:owner/repo.git//path` | `//` separates repo from subdir |
| GHE Cloud | `mycompany.github.com/org/repo` | Enterprise Cloud subdomain |
| GHE Server | `github.mycompany.com/org/repo` | Enterprise Server |
| Azure DevOps shorthand | `ado:org/project/repo` | Expands to `dev.azure.com` URL |
| Azure DevOps HTTPS | `https://dev.azure.com/org/proj/_git/repo` | Modern format |
| Azure DevOps SSH | `git@ssh.dev.azure.com:v3/org/proj/repo` | SSH v3 format |
| Azure DevOps Server | `https://custom-host/org/proj/_git/repo` | Requires `azure_hosts` config |
| Local path | `~/my-skill`, `/abs/path`, or `C:\path` | Copies directory to source |
| Git file URL | `file:///path/to/repo` | Local git clone (for testing) |
## GitHub Shorthand
The simplest format — just `owner/repo`:
```bash
skillshare install anthropics/skills
skillshare install ComposioHQ/awesome-claude-skills
```
This expands to `https://github.com/owner/repo` internally.
### With Subdirectory
Add a path after `owner/repo` to install a specific skill:
```bash
skillshare install anthropics/skills/skills/pdf
skillshare install anthropics/skills/skills/commit
```
When the subdir doesn't match exactly, skillshare scans the repo for a skill with that basename:
```bash
# "pdf" doesn't exist at root, but found at skills/pdf/ — resolves automatically
skillshare install anthropics/skills/pdf
```
## Full HTTPS URLs
Works with any Git host:
```bash
# GitHub
skillshare install https://github.com/owner/repo
# GitLab
skillshare install https://gitlab.com/owner/repo
# Bitbucket
skillshare install https://bitbucket.org/owner/repo
# Self-hosted Gitea
skillshare install https://git.mycompany.com/team/skills
# AtomGit (China)
skillshare install https://atomgit.com/owner/repo
# Gitee (China)
skillshare install https://gitee.com/owner/repo
```
## SSH URLs
Use SSH for private repositories:
```bash
# Standard SSH
skillshare install git@github.com:owner/repo.git
# With subdirectory (note the // separator)
skillshare install git@github.com:owner/repo.git//path/to/skill
# GitLab SSH
skillshare install git@gitlab.com:owner/repo.git
```
:::info The `//` separator
For SSH URLs, use `//` to separate the repo from the subdirectory path. This is because the `:` in SSH URLs already serves as a separator, so the standard `/` path convention would be ambiguous.
:::
## GitHub Enterprise
Enterprise hostnames are recognized automatically:
```bash
# Enterprise Cloud (subdomain pattern: *.github.com)
skillshare install mycompany.github.com/org/repo
# Enterprise Server (hostname pattern: github.*.*)
skillshare install github.mycompany.com/org/repo
skillshare install github.internal.corp/team/skills
```
Both patterns support subdirectory paths:
```bash
skillshare install github.mycompany.com/org/repo/path/to/skill
```
## Azure DevOps
### Shorthand
The `ado:` prefix expands to Azure DevOps URLs:
```bash
skillshare install ado:myorg/myproject/myrepo
skillshare install ado:myorg/myproject/myrepo/skills/react
```
### Full URLs
```bash
# Modern format
skillshare install https://dev.azure.com/myorg/myproject/_git/myrepo
# Legacy format (auto-normalized to dev.azure.com)
skillshare install https://myorg.visualstudio.com/myproject/_git/myrepo
# SSH
skillshare install git@ssh.dev.azure.com:v3/myorg/myproject/myrepo
```
## Local Paths
Install from a directory on your filesystem:
```bash
# Absolute path
skillshare install /home/user/my-skill
# Home directory shorthand
skillshare install ~/my-skill
# Relative path
skillshare install ./local-skill
# Windows drive-letter path
skillshare install D:\skills\my-skill
```
Local installs **copy** files (not symlink) and are not updatable via `skillshare update`.
## Authentication
### SSH Keys (Recommended for Private Repos)
```bash
# Ensure your SSH key is loaded
ssh-add ~/.ssh/id_ed25519
# Install via SSH
skillshare install git@github.com:company/private-skills.git
```
### HTTPS with Tokens
For HTTPS URLs, git uses your configured credential helper:
```bash
# Configure git credential helper (one-time)
git config --global credential.helper store
# Or use GH CLI for GitHub
gh auth login
# Then install normally
skillshare install https://github.com/company/private-repo
```
### Azure DevOps with PAT
Azure DevOps repos use [Personal Access Tokens (PATs)](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops) for HTTPS auth:
```bash
export AZURE_DEVOPS_TOKEN=your_pat_here
skillshare install https://dev.azure.com/org/project/_git/repo
```
Or use SSH (no token needed):
```bash
skillshare install git@ssh.dev.azure.com:v3/org/project/repo
```
:::tip Private Repos
If you get an authentication error with HTTPS, switch to SSH URLs. skillshare sets `GIT_TERMINAL_PROMPT=0` to prevent hanging credential prompts, so interactive HTTPS auth won't work.
:::
## Custom GitLab Domains {#custom-gitlab-domains}
Hosts containing `gitlab` or `jihulab` in the name (e.g., `gitlab.com`, `jihulab.com`, `onprem.gitlab.internal`) are automatically detected and parsed with nested subgroup support.
For self-managed GitLab instances on custom domains (e.g., `git.company.com`), add the hostname to [`gitlab_hosts`](../targets/configuration.md#gitlab_hosts) in your config:
```yaml
gitlab_hosts:
- git.company.com
```
This tells skillshare to treat the full URL path as the repository, matching GitLab's nested subgroup behavior.
**Without config**, you can use `.git` to mark the end of the repo path:
```bash
# Installs from git.company.com/team/frontend/ui (full path as repo)
skillshare install git.company.com/team/frontend/ui.git
```
## Gitea and CNB {#gitea-and-cnb}
`gitea.com`, any host with `gitea` in its name, and `cnb.cool` are recognised. The path is read as `owner/repo`, and anything after it is the subdirectory:
```bash
skillshare install https://gitea.com/owner/repo/skills/review
skillshare install https://cnb.cool/org/repo/skills
```
For a self-hosted instance on another domain, list the hostname in [`gitea_hosts`](../targets/configuration.md#gitea_hosts) or [`cnb_hosts`](../targets/configuration.md#cnb_hosts). Private repos use [`GITEA_TOKEN`](./environment-variables.md#gitea_token) and [`CNB_TOKEN`](./environment-variables.md#cnb_token).
## Custom Azure DevOps Domains {#custom-azure-domains}
The built-in Azure DevOps patterns match `dev.azure.com` and `*.visualstudio.com` automatically.
For self-hosted Azure DevOps Server instances on custom domains, add the hostname to [`azure_hosts`](../targets/configuration.md#azure_hosts) in your config:
```yaml
azure_hosts:
- azuredevops.mycompany.com
```
This tells skillshare to route URLs with `/_git/` on that host through Azure DevOps parsing, which correctly constructs the clone URL without appending `.git`.
## Platform Support
| Feature | GitHub | GitLab | Bitbucket | Gitea | GHE | Azure DevOps | AtomGit/Gitee |
|---------|--------|--------|-----------|-------|-----|--------------|---------------|
| Shorthand (`owner/repo`) | Yes | No | No | No | Yes | `ado:` prefix | No |
| Full HTTPS URL | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| SSH URL | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Subdirectory | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| `skillshare search` | Yes | No | No | No | No | No | No |
## Related
- [Install command](/docs/reference/commands/install) — full install options and examples