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

@constellationdev/opencode

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@constellationdev/opencode

Constellation Plugin for OpenCode

Source
npmnpm
Version
1.2.2
Version published
Weekly downloads
4
-80.95%
Maintainers
2
Weekly downloads
 
Created
Source

Constellation Plugin for OpenCode

NPM Version License: AGPL-3.0

While Constellation's MCP server provides raw code intelligence capabilities, this plugin enhances your OpenCode experience with:

FeatureBenefit
Specialized AgentsAI agents for codebase exploration, impact analysis, and dependency health
Session HooksAutomatic Constellation availability checks and context preservation

Features

Agents

Specialized AI agents for autonomous analysis:

AgentPurpose
@source-scoutExplores and navigates codebase, discovers symbols and architectural patterns
@impact-investigatorProactively assesses risk before refactoring, renaming, or deleting code
@dependency-detectiveDetects circular dependencies and unhealthy coupling patterns

Example Trigger:

You: "What does this codebase do?"
OpenCode: [Activates @source-scout agent]

You: "I'm renaming AuthService to AuthenticationService"
OpenCode: "Before renaming, let me analyze the potential impact..."
[Activates @impact-investigator agent]

Hooks

Event hooks enable intelligent, transparent assistance:

HookEventBehavior
Availability Checksession.createdSilently checks Constellation connectivity at session start
System Prompt Enhancementchat.system.transformInjects Constellation priority into prompts
Context Preservationsession.compactingPreserves Constellation insights in compacted summary

Installation

Prerequisites

  • Constellation Account (see Constellation)
  • Project indexed in Constellation
  • Access key configured

When you run constellation init with OpenCode tool configuration, the CLI automatically configures both the plugin and MCP server in your project's opencode.json.

Manual Setup

Add the plugin to your project's opencode.json:

{
  "plugin": ["@constellationdev/opencode"]
}

OpenCode will automatically install the plugin at startup.

Note: Install this plugin at the project level, not globally. It should only be enabled for projects that use Constellation.

Usage Examples

The plugin ships a set of on-demand skills — OpenCode's agent loads them automatically when a user request matches the skill's description. There are no slash commands; just ask.

Check Your Setup

> Check Constellation status

[skill: constellation-status]
Status: Connected
Project: my-awesome-app
Files Indexed: 1,247
Symbols: 8,932
Languages: TypeScript, JavaScript

Analyze Before Refactoring

> What's the impact of changing validateUser in src/auth/validator.ts?

[skill: constellation-impact]
Symbol: validateUser (function)
Risk Level: MEDIUM
Files Affected: 12
Symbols Affected: 34
Test Coverage: 67%

Recommendations:
- Update unit tests in auth.spec.ts
- Check integration with UserController

Find Dead Code

> Find unused functions

[skill: constellation-unused]
Found 7 orphaned functions:
├── src/utils/legacy.ts
│   ├── formatLegacyDate (line 23)
│   └── parseLegacyConfig (line 45)
├── src/helpers/deprecated.ts
│   └── oldValidation (line 12)
...

Understand Dependencies

> Show me the dependencies for src/services/payment.service.ts

[skill: constellation-deps]
Dependencies (12):
├── Internal (8)
│   ├── src/models/payment.model.ts
│   ├── src/utils/currency.ts
│   └── ...
└── External (4)
    ├── stripe
    ├── lodash
    └── ...

No circular dependencies detected.

Available Skills

SkillTriggers on
constellation-status"Is Constellation working?", "ping Constellation"
constellation-diagnose"Full Constellation health check"
constellation-impact"What would break if I change X?", "blast radius of X"
constellation-deps"Dependencies of X", "what depends on X"
constellation-unused"Find dead code", "orphaned exports"
constellation-architecture"Codebase overview", "architecture summary"
constellation-troubleshootingAny Constellation error code or "Constellation broken"

How It Works

Constellation uses privacy-preserving AST extraction to understand your code structure without transmitting source code:

Your Code → AST Extraction → Constellation API → Code Intelligence
              (no source)      (encrypted)        (semantic queries)

Troubleshooting

Common Issues

IssueSolution
AUTH_ERRORCheck CONSTELLATION_ACCESS_KEY is set correctly, use constellation auth CLI command to set
PROJECT_NOT_INDEXEDRun constellation index --full in your project
MCP Server not respondingRestart OpenCode, or ask "Run a Constellation health check" to invoke the constellation-diagnose skill

Documentation

License

GNU Affero General Public License v3.0 (AGPL-3.0)

Copyright © 2026 ShiftinBits Inc.

See LICENSE file for details.

Keywords

opencode

FAQs

Package last updated on 28 Apr 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