agentleFS
roerohanroerohan/skills/install-skill/SKILL.md

install-skill

Skill29 starsChanged 7 months agoMITView on GitHub

Install agent skills from GitHub repositories using gh CLI. Use when user asks to install a skill, add a skill, or set up a skill from a GitHub repo. Triggers on "install skill", "add skill", "gh skill install".

7 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use create-skill.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ElasticSkill

    create-skill

    Interactively create a new Claude Code skill and add it to the elastic-docs-skills catalog. Use when the user wants to generate a new skill, scaffold a slash command, or build automation for docs tasks.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 4 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before running any install, verify gh CLI is available:

    line 13
  2. Very specific:

    If gh is not installed, stop and inform the user:

    line 19
  3. Distinctive:

    Agent override: only if user explicitly names a different agent

    line 41
  4. Distinctive:

    Scope override: only if user explicitly says "project" or "directory"

    line 42
  5. Distinctive:

    Directory override: only if user provides a specific path

    line 43
  6. Very specific:

    Run scripts/install.sh or manually verify:

    line 47
  7. Distinctive:

    If either fails, stop and inform the user.

    line 54
  8. Very specific:

    If user says "install to project" or "project scope": --scope project

    line 65
  9. Very specific:

    If user gives a directory path: --dir <path> (replaces --agent and --scope)

    line 66
  10. Very specific:

    If user names a different agent: --agent <agent-name>

    line 67
  11. Very specific:

    If user wants to force overwrite: add --force

    line 68
  12. Very specific:

    If user specifies a version/pin: append @version or use --pin <ref>

    line 69

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Install Skill

Install agent skills from GitHub repositories using gh skill install.

Prerequisites

Before running any install, verify gh CLI is available:

command -v gh >/dev/null 2>&1 || { echo "Error: gh CLI not found. Install from https://cli.github.com" >&2; exit 1; }

If gh is not installed, stop and inform the user:

Defaults

SettingDefaultOverride
AgentopencodeUser specifies --agent <name>
ScopeuserUser says "project" or "directory"
Directory(none)User provides explicit path via --dir

Always use --agent opencode --scope user unless the user explicitly requests otherwise.

Workflow

1. Parse the User Request

Extract from the user's message:

  • Repository: OWNER/REPO format (required)
  • Skill name: specific skill within the repo (optional)
  • Version: @version or pin (optional)
  • Agent override: only if user explicitly names a different agent
  • Scope override: only if user explicitly says "project" or "directory"
  • Directory override: only if user provides a specific path

2. Validate gh CLI

Run scripts/install.sh or manually verify:

command -v gh >/dev/null 2>&1
gh auth status 2>/dev/null

If either fails, stop and inform the user.

3. Build the Command

Base command:

gh skill install <OWNER/REPO> [<skill[@version]>] --agent opencode --scope user

Apply overrides:

  • If user says "install to project" or "project scope": --scope project
  • If user gives a directory path: --dir <path> (replaces --agent and --scope)
  • If user names a different agent: --agent <agent-name>
  • If user wants to force overwrite: add --force
  • If user specifies a version/pin: append @version or use --pin <ref>

4. Run the Install

Execute the built command via scripts/install.sh or directly:

gh skill install <repo> [skill] --agent opencode --scope user

5. Verify

After install, confirm:

  • Command exited successfully (exit code 0)
  • Report the installed skill name and location to the user

Command Reference

gh skill install <repository> [<skill[@version]>] [flags]
FlagPurpose
--agent <string>Target agent (default: opencode for this skill)
--scope <string>project or user (default: user)
--dir <string>Custom directory (overrides agent and scope)
--forceOverwrite existing skills without prompting
--pin <string>Pin to a specific git tag or commit SHA
--from-localInstall from a local directory instead of a repo
--allow-hidden-dirsInclude skills in hidden directories

Supported Agents

opencode, github-copilot, claude-code, cursor, codex, gemini-cli, antigravity, amp, goose, junie, windsurf, cline, roo, and many more.

Full list: gh skill install --help

Examples

# Install a skill for opencode globally (default)
gh skill install owner/repo skill-name --agent opencode --scope user

# Install a specific version
gh skill install owner/repo skill-name@v1.0.0 --agent opencode --scope user

# Install to project scope (when user asks)
gh skill install owner/repo skill-name --agent opencode --scope project

# Install to a custom directory (when user provides path)
gh skill install owner/repo skill-name --dir /path/to/skills

# Install for a different agent (when user specifies)
gh skill install owner/repo skill-name --agent claude-code --scope user

# Force overwrite
gh skill install owner/repo skill-name --agent opencode --scope user --force

# Install from local directory
gh skill install ./local-repo skill-name --from-local --agent opencode --scope user

Error Handling

ErrorAction
gh not foundTell user to install from https://cli.github.com
Not authenticatedTell user to run gh auth login
Repo not foundVerify OWNER/REPO format and repo exists
Skill not found in repoList available skills with gh skill install <repo> interactively, or check repo structure
Already installedAsk user if they want to --force overwrite

Scripts

ScriptPurpose
scripts/install.shValidate prerequisites and run gh skill install

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.