Skip to main content
Glama
opencode-skill-hub

opencode-skill-hub

opencode-skill-hub

An MCP server (stdio transport) that acts as an automated skill and agent manager for OpenCode projects.

It answers three questions, in order:

  1. What does this project need? — analyze_project_needs inspects dependency manifests and config files, then proposes the specialised skills/agents the project is missing.

  2. Does it already exist? — search_skills_and_agents searches GitHub for real SKILL.md files and MCP server configurations.

  3. Put it in place — install_skill_or_agent writes the skill to .opencode/skills/<name>/SKILL.md or registers the MCP server in opencode.json.

Install

npm install
npm run build     # tsc -> dist/

Related MCP server: opencode_native_tools

Register with OpenCode

Add the server to your project's opencode.json (see the bundled sample):

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "opencode-skill-hub": {
      "type": "local",
      "command": ["npx", "-y", "tsx", "src/index.ts"],
      "enabled": true
    }
  }
}

For a global install, register the compiled entrypoint instead:

"command": ["node", "/absolute/path/to/opencode-skill-hub/dist/index.js"]

GITHUB_TOKEN

GitHub's code search API requires authentication, and it is the only way to find actual SKILL.md paths. Without a token the server still works — it falls back to repository search and says so in the tool output.

Variable

Purpose

GITHUB_TOKEN

PAT with public_repo (classic) or no scopes (fine-grained). Raises rate limits and enables code search.

GH_TOKEN

Used as a fallback if GITHUB_TOKEN is unset.

Tools

analyze_project_needs

// input
{ "workspacePath": "C:/dev/my-app" }

Scans package.json, Cargo.toml, pyproject.toml, go.mod, requirements.txt plus cross-cutting signals (Dockerfiles, tsconfig.json, prisma/schema.prisma, .github/workflows, monorepo manifests). Returns detected stacks, frameworks, dependency summaries, existing OpenCode assets, and a priority-ranked list of needs — each with a searchQuery you can feed straight into the next tool.

search_skills_and_agents

// input
{ "query": "prisma migrations", "searchType": "all", "limit": 10 }
// searchType: "skill" | "mcp-server" | "all"

Each result carries fullName, path, htmlUrl and a downloadUrl on raw.githubusercontent.com, so it can be piped straight into install_skill_or_agent.

install_skill_or_agent

// install a skill
{ "workspacePath": "C:/dev/my-app", "itemType": "skill", "name": "prisma-migrations",
  "sourceUrl": "https://raw.githubusercontent.com/owner/repo/main/.claude/skills/prisma-migrations/SKILL.md" }

// scaffold a skill locally (no download)
{ "workspacePath": "C:/dev/my-app", "itemType": "skill", "name": "my-convention" }

// register an MCP server
{ "workspacePath": "C:/dev/my-app", "itemType": "mcp-server", "name": "context7",
  "mcpConfig": { "type": "local", "command": ["npx", "-y", "@upstash/context7-mcp"], "enabled": true } }
  • skill → writes ${workspacePath}/.opencode/skills/${name}/SKILL.md. Omit sourceUrl to get a documented boilerplate with YAML frontmatter to fill in.

  • mcp-server → merges mcpConfig into ${workspacePath}/opencode.json under mcp.${name}, creating the file (with $schema) if needed and preserving every other key.

Safety behaviour

  • All logging goes to stderr; stdout is reserved for JSON-RPC.

  • name must match ^[a-zA-Z0-9][a-zA-Z0-9._-]*$, and the resolved skill path is re-checked against the skills root to block traversal.

  • Remote downloads are capped at 2 MiB, time out after 20 s, and are rejected if they look like an HTML error page or GitHub's 404: Not Found body.

  • A malformed opencode.json is never overwritten — the parse error is returned instead.

  • Every tool returns isError: true with a readable message rather than throwing across the transport.

Development

npm run dev        # tsx watch-free run of src/index.ts
npm run typecheck  # tsc --noEmit
npm run build      # emit dist/

Available Tools

3 tools
analyze_project_needsA

Scan a workspace's dependency manifests (package.json, Cargo.toml, pyproject.toml, go.mod, requirements.txt) and configuration files, then report the detected stacks, frameworks and dependencies along with the specialised skills and agents the project is likely to need. Call this first, before searching or installing anything.

Inputs: workspacePath (required).

install_skill_or_agentA

Install a skill or register an MCP server into an OpenCode workspace. For itemType='skill' this writes ${workspacePath}/.opencode/skills//SKILL.md, downloading it from sourceUrl or generating a documented boilerplate when sourceUrl is omitted. For itemType='mcp-server' this merges mcpConfig into ${workspacePath}/opencode.json under mcp., creating the file when needed.

Inputs: name (required), itemType (required), workspacePath (required), mcpConfig, +1 more.

search_skills_and_agentsA

Search GitHub for reusable OpenCode/Claude skills (SKILL.md files) and MCP server configurations matching a query. Returns repository, file path and a raw download URL for each match. Set GITHUB_TOKEN in the server environment to enable code search (required for finding actual SKILL.md files).

Inputs: query (required), limit, searchType.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 3 tools

    Disambiguation5/5

    The three tools map to a clean sequential workflow: analyze the project, search for matches, then install. Each has a clearly distinct verb and target, so an agent can easily pick the right one with no overlap.

    Naming Consistency5/5

    All three follow a consistent verb_noun snake_case pattern (analyze_project_needs, search_skills_and_agents, install_skill_or_agent). Predictable and readable throughout.

    Tool Count4/5

    Three tools form a coherent discover-then-install pipeline where each earns its place, though the surface is on the lean side. A list/remove capability would round it out.

    Completeness3/5

    The read-then-write lifecycle (analyze, search, install) is covered, but there is no way to list already-installed skills/servers, update them, or uninstall them. These notable gaps mean agents can add but not manage or clean up.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides MCP tools to search, compare, and get recommendations for open-source projects from a structured knowledge graph of GitHub data.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables management of Antigravity IDE skills and configuration through MCP tools, including listing, reading, searching, installing, and deleting skills, plus reading/writing config.json and provider settings.
      12
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Connects MCP clients to OpenCode's headless API so coding work can be delegated from within them. Enables asking questions, implementing features, monitoring background jobs, responding to questions and permissions, and reviewing changes across projects.
      22,181 npm
      MIT