--- sidebar_position: 5 --- # search Discover and install skills from GitHub repositories. ## When to Use - Discover community skills from hub indexes - Find skills by name, tag, or description - Browse available skills before installing ## Quick Start ```bash skillshare search vercel # Search by keyword skillshare search # Browse popular skills ``` This searches GitHub for repositories containing `SKILL.md` files that match your query. ## Browse Mode When no query is provided, `search` browses popular skills on GitHub: ```bash skillshare search # Browse popular skills skillshare search --list # List popular skills ``` This uses `filename:SKILL.md` as the GitHub query and sorts results by star count, showing the most popular skill repositories first. ## How It Works ``` skillshare search [query] │ ▼ GitHub Code Search API (filename:SKILL.md + query) │ ▼ Fetch star counts for each repository │ ▼ Sort by stars (most popular first) │ ▼ Interactive selector → Install selected skill ``` ## Preview ```text $ skillshare search runkids ▸ Searching runkids │ ├─ Found 20 skill(s) (12.0s) Select skills to install (0/20 selected) ▌ [ ] skillshare ★ 2.7k ▌ runkids/skillshare/skills/skillshare ▌ [ ] skill-sharing ★ 654 ▌ majiayu000/claude-skill-registry/skills/skills/skill-sharing ▌ [ ] skillshare-changelog ★ 2.7k ▌ runkids/skillshare/.skillshare/skills/skillshare-changelog … 20 skills · Page 1 of 2 ───────────────────────────────────────── Description: Manage skills, agents, extras, plugins, and MCP connection settings with the Skillshare CLI. Use when the user asks to configure or run Skillshare, install or sync resources across AI tools, import MCP settings, manage targets, audit skills, recover backups, or troubleshoot... Source: runkids/skillshare/skills/skillshare Stars: 2.7k ↑↓ navigate ←→ page space toggle a all enter install s search again / filter esc cancel ``` **Controls:** - `↑` `↓` — Navigate results; `←` `→` — change page - `Space` — Select or clear a skill; `a` — select all visible - `Enter` — Install the selected skills (with nothing selected, it cancels) - `/` — Filter results; `s` — search again - `Esc` or `Ctrl+C` — Cancel and exit After installing, you can search again or press `Enter` to quit. ## Options | Flag | Description | |------|-------------| | `--project`, `-p` | Install to project-level config (`.skillshare/`) | | `--global`, `-g` | Install to global config (`~/.config/skillshare`) | | `--hub [URL]` | Search from a hub index (default: [skillshare-hub](https://github.com/runkids/skillshare-hub); or custom URL/path) | | `--list`, `-l` | List results only, no install prompt | | `--json` | Output as JSON (for scripting) | | `--limit N`, `-n N` | Maximum results (default: 20, max: 100) | | `--help`, `-h` | Show help | :::tip Auto-detection If neither `--project` nor `--global` is specified, skillshare auto-detects: if `.skillshare/config.yaml` exists in the current directory, it defaults to project mode; otherwise global mode. ::: ## Examples ### Browse Popular ```bash skillshare search # Browse popular skills (no query) ``` ### Basic Search ```bash skillshare search pdf # Interactive search and install skillshare search "code review" # Multi-word search ``` ### List Mode ```bash skillshare search commit --list ``` Output: ``` 1. fix facebook/react/.claude/skills/fix ★ 242.7k Use when you have lint errors, formatting issues... 2. verify facebook/react/.claude/skills/verify ★ 242.7k Use when you want to validate changes before committing... 3. commit-helper cockroachdb/cockroach/.claude/skills/commit-helper ★ 31.8k Help create git commits and PRs with properly formatted messages... ``` ### JSON Output ```bash skillshare search react --json --limit 5 ``` ```json [ { "Name": "react-patterns", "Description": "React and Next.js performance optimization...", "Source": "facebook/react/.claude/skills/react-patterns", "Stars": 242700, "Owner": "facebook", "Repo": "react", "Path": ".claude/skills/react-patterns" } ] ``` ### Project Mode ```bash skillshare search pdf -p # Search and install to project skillshare search react --project # Same thing, long flag ``` Installed skills go to `.skillshare/skills/` and the project config is updated automatically. If the project hasn't been initialized yet, skillshare will run `init -p` first. ### Limit Results ```bash skillshare search frontend -n 5 # Show only top 5 results ``` ## Authentication {#authentication} GitHub Code Search API requires authentication. skillshare automatically detects your credentials: 1. **GitHub CLI** (recommended) — If you're logged in with `gh`: ```bash gh auth login ``` 2. **Environment variable** — Set `GITHUB_TOKEN` or `GH_TOKEN`: ```bash export GITHUB_TOKEN=ghp_your_token_here ``` ### Creating a Token If you don't use `gh` CLI: 1. Go to [GitHub Settings → Tokens](https://github.com/settings/tokens) 2. Generate new token (classic) 3. No scopes needed for public repos 4. Set the token: ```bash export GITHUB_TOKEN=ghp_your_token_here ``` ## How Results are Ranked 1. **Search** — GitHub Code Search finds `SKILL.md` files matching your query 2. **Filter** — Removes forked repositories (duplicates) 3. **Fetch Stars** — Gets star count for each unique repository 4. **Sort** — Orders by stars (most popular first) 5. **Limit** — Returns top N results This ensures high-quality, popular skills appear first. ## Community Hub Browse and install community-curated skills from [skillshare-hub](https://github.com/runkids/skillshare-hub): ```bash skillshare search --hub # Browse all skills in skillshare-hub skillshare search react --hub # Search "react" in skillshare-hub ``` When `--hub` is used without a URL, it defaults to the community [skillshare-hub](https://github.com/runkids/skillshare-hub) index. Want to share your skill with the community? [Open a PR](https://github.com/runkids/skillshare-hub) to add your skill — CI runs `skillshare audit` on every submission. ## Saved Hub Labels Save hubs with [`hub add`](./hub.md#hub-add) and search by label instead of typing full URLs: ```bash # Save a hub once skillshare hub add https://internal.corp/hub.json --label team # Search by label skillshare search react --hub team # Set as default for bare --hub skillshare hub default team skillshare search --hub # Uses "team" hub ``` Resolution order for `--hub `: 1. URL or path (starts with `http`, `/`, `.`, `~`, `file://`, or an SSH URL such as `git@…`/`ssh://…`) → used directly 2. Otherwise → label lookup from saved hubs 3. Bare `--hub` (no value) → config default → community hub fallback See [`hub`](./hub.md) for managing saved hubs. ## Private Index Search {#private-index-search} Search from a private hub index instead of GitHub: ```bash # Local file skillshare search react --hub ./skillshare-hub.json # HTTP URL skillshare search react --hub https://internal.corp/skills/skillshare-hub.json # SSH URL — clones the repo and reads the index (works with private/GHE hosts) skillshare search react --hub git@github.com:org/skills.git skillshare search react --hub git@ghe.corp.com:team/skills.git//hubs/team.json # Browse all skills (empty query) skillshare search --hub ./skillshare-hub.json --json # Equals syntax also works skillshare search react --hub=./skillshare-hub.json ``` :::note SSH hub sources An SSH `--hub` value is resolved by shallow-cloning the repo (using your SSH agent/keys) and reading the index file from it. The file path inside the repo comes from the `//path` suffix — `git@host:org/repo.git//hubs/team.json` — and defaults to `skillshare-hub.json` at the repo root when omitted. Both scp-style (`git@host:org/repo.git`) and scheme-style (`ssh://git@host/org/repo.git`) URLs are accepted. In the [web dashboard](./ui.md), SSH hub sources must be [saved first](./hub.md#hub-add); the server only clones saved hubs. ::: Build an index with [`hub index`](./hub.md): ```bash skillshare hub index # Generate skillshare-hub.json skillshare search --hub ./skillshare-hub.json # Search it ``` :::tip Default hub `skillshare search --hub` (without a URL) defaults to the community [skillshare-hub](https://github.com/runkids/skillshare-hub) index, so you don't need to type the full URL every time. Or set your own default with `skillshare hub default