🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

opencode-ask-github

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencode-ask-github

GitHub repository management plugin for OpenCode - auto-clone repos and analyze with AI

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
7
-46.15%
Maintainers
1
Weekly downloads
 
Created
Source

opencode-ask-github

GitHub repository exploration plugin for OpenCode. Clones repositories on-demand and delegates analysis to AI subagents.

Features

  • Auto-clone: Repositories are cloned on-demand with shallow clone for speed
  • AI Analysis: Delegates to the explore subagent for codebase analysis
  • Aliases: Configure shortcuts for frequently used repositories
  • Cache Management: List and remove cloned repositories

Installation

Install via npm/bun:

bunx opencode-ask-github
# or
npx opencode-ask-github

Or add manually to your OpenCode configuration (~/.config/opencode/config.json):

{
  "plugins": ["opencode-ask-github"]
}

Commands

/gh-ask <repo> [question]

Clone/locate a repository and analyze it with AI.

/gh-ask sveltejs/svelte how is the component compiler structured?
/gh-ask https://github.com/tailwindlabs/tailwindcss what's the CLI architecture?
/gh-ask sv explain the reactivity system

The command nudges the AI to use the gh-ask tool, which prepares the repository locally. The AI then delegates to a subagent for exploration.

Supported input formats:

  • GitHub URLs: https://github.com/owner/repo
  • owner/repo pairs: sveltejs/svelte
  • Aliases: sv (if configured)

/gh-list

List all cloned repositories and configured aliases.

/gh-remove <repo>

Remove a cloned repository from the cache.

AI Tool

The plugin provides a single tool for the AI:

ToolDescription
gh-askPrepare a GitHub repo for exploration (clone/update). Returns the local path and suggests a subagent for analysis.

The AI can call this tool directly when it needs to explore a repository, even without the /gh-ask command.

Configuration

Configuration is stored in ~/.config/opencode/ask-github.json.

Aliases

Add aliases for frequently used repositories by editing the config file directly:

{
  "aliases": {
    "sv": "sveltejs/svelte",
    "tw": "tailwindlabs/tailwindcss"
  }
}

You can also use /gh-list to see all configured aliases.

Prompt

Customize which subagent is suggested for repository exploration:

{
  "prompt": {
    "agent": "general"
  }
}

Default agent is explore.

Storage

Repositories are cloned to ~/.cache/opencode-github/{owner}/{repo}/.

License

MIT

Keywords

opencode

FAQs

Package last updated on 05 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts