Skip to content

ShiftinBits/constellation-gemini

Repository files navigation

Constellation Extension for Gemini CLI

MCP Server License: AGPL-3.0

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

Feature Benefit
Slash Commands Quick access to common workflows
Contextual Skills Gemini automatically loads relevant knowledge when needed
Sub-agents Autonomous specialists for code navigation and analysis
Agent Skills Procedural guidance for troubleshooting and complex workflows

Features

Commands

Execute powerful analysis with simple slash commands:

Command Description
/constellation:status Check API connectivity and project indexing status
/constellation:diagnose Quick health check for connectivity and authentication
/constellation:impact <symbol> <file> Analyze blast radius before changing a symbol
/constellation:deps <file> [--reverse] Map dependencies or find what depends on a file
/constellation:unused Discover orphaned exports and dead code
/constellation:architecture Get a high-level overview of your codebase structure

Skills

Gemini automatically activates specialized knowledge based on your questions:

Skill Triggers When You Ask About...
constellation-troubleshooting Error codes, connectivity issues, debugging problems

Agents

Specialized AI agents for autonomous analysis:

Agent Purpose
source-scout Explores and navigates codebase, discovers symbols and architectural patterns
impact-investigator Proactively assesses risk before refactoring, renaming, or deleting code
dependency-detective Detects circular dependencies and unhealthy coupling patterns

Example Trigger:

You: "Rename AuthService to AuthenticationService"
Gemini: "Before renaming, let me analyze the potential impact..."
[Launches impact-investigator agent]

Hooks

Event hooks enable intelligent, transparent assistance:

Hook Event Behavior
Availability Check SessionStart Silently checks Constellation connectivity at session start
Context Preservation PreCompact Preserve any Constellation insights in compacted summary

Installation

Prerequisites

  1. Constellation Account (see Constellation)
  2. Project indexed in Constellation
  3. Access key configured

Quick Start

gemini extensions install https://github.com/ShiftinBits/constellation-gemini

Usage Examples

Check Your Setup

> /constellation:status

Status: Connected
Project: my-awesome-app
Files Indexed: 1,247
Symbols: 8,932
Languages: TypeScript, JavaScript

Analyze Before Refactoring

> /constellation:impact validateUser src/auth/validator.ts

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

> /constellation:unused --kind function

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

Understand Dependencies

> /constellation:deps src/services/payment.service.ts

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

No circular dependencies detected.

Troubleshooting

Common Issues

Issue Solution
AUTH_ERROR Check CONSTELLATION_ACCESS_KEY is set correctly, use constellation auth CLI command to set
PROJECT_NOT_INDEXED Run constellation index --full in your project
Commands not appearing Restart Gemini CLI or check plugin path

Documentation

License

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

Copyright © 2026 ShiftinBits Inc.

See LICENSE file for details.