ContextShare (VS Code Extension)

September 23, 2025 · View on GitHub

License: MIT VS Code Marketplace Security Policy

Unified AI workflow catalog for VS Code: manage and share chat modes, instructions, prompts, tasks - plus upcoming MCP server orchestration - across all your repositories from one consistent UI. Reduce prompt drift, standardize team AI usage, and reuse curated presets.

✨ Feature Highlights

Core value: a single, structured, multi-catalog layer for AI assistant resources that become instantly available & activatable per workspace.

  • Catalog aggregation (local folders + remote URLs)
  • Chat Modes (persona definitions)
  • Instructions (reusable guidance bundles)
  • Prompts (templated starting points)
  • Tasks (JSON task configs)
  • MCP Integration (coming soon)
  • Presets (presets bundling multiple resources)
  • Real‑time sync & state tracking (INACTIVE / ACTIVE / MODIFIED)
  • Safe activation (never overwrites user‑created originals)
  • Secure: HTTPS-only remotes + path & filename sanitization

Feature Matrix

CategoryPurpose / ScopeRuntime LocationFilename Pattern / NotesStatus
Chat ModesPersona / behavior definitions.github/chatmodes/*.chatmode.md
InstructionsShared guideline sets.github/instructions/*.instructions.md (legacy *.instruction.md)
PromptsPrompt templates / starters.github/prompts/*.prompt.md
TasksAutomation / action configurations.github/tasks/*.task.json
MCP ServersModel Context Protocol sources.vscode/mcp.jsonMerged composite fileComing soon
PresetsDeclarative preset bundles.github/presets/*.json (see example below)

State logic: ACTIVE resources are copied to runtime; MODIFIED indicates the runtime file diverged from its source (e.g., team-local customization).

🚀 Quick Start

Installation

Install from the VS Code Marketplace: ContextShare

Use in 5 Steps

  1. Open the ContextShare Activity Bar view.
  2. Add a catalog (Options → Add Catalog Directory… or add a remote HTTPS URL).
  3. Activate a resource (right‑click → Activate).
  4. (Optional) Apply a Preset to activate multiple at once.
  5. Edit runtime copies under .github/** if you need local tweaks (they'll show as MODIFIED).

Presets

Presets are small JSON descriptors bundling chosen chat mode + instructions + prompts + tasks (+ soon MCP servers) into a one‑click activation set. Great for role or workflow switching (e.g., "Full Stack Review", "Security Audit").

Example Catalog Structure

example-catalog/
├── chatmodes/
│   └── developer-assistant.chatmode.md
├── instructions/
│   └── code-review-guidelines.instructions.md
├── prompts/
│   └── bug-analysis.prompt.md
├── tasks/
│   └── automated-testing.task.json
├── mcp/
│   └── development-servers.mcp.json
└── presets/
    └── full-stack-dev.json

📖 Documentation

Configuration Examples

Add catalogs in .vscode/settings.json:

{
    "contextshare.catalogs": [
        "../team-ai-catalog", 
        "https://raw.githubusercontent.com/example-org/shared-ai-catalog/main/index.json"
    ]
}

Remote index.json (HTTPS only):

{
    "version": 1,
    "resources": [
        "prompts/bug-analysis.prompt.md",
        "instructions/code-review-guidelines.instructions.md",
        "chatmodes/developer-assistant.chatmode.md"
    ]
}

Sample Preset (.github/presets/full-stack-dev.json):

{
    "name": "Full Stack Dev",
    "chatMode": "developer-assistant.chatmode.md",
    "instructions": ["code-review-guidelines.instructions.md"],
    "prompts": ["bug-analysis.prompt.md"],
    "tasks": ["automated-testing.task.json"],
    "mcpServers": ["development-servers.mcp.json"]
}

Display Names: Provide friendly catalog labels via configuration so multiple catalogs can be visually distinguished in the tree (see CATALOG_DISPLAY_NAMES_EXAMPLE.md).

🛠️ Development

Development details, build, and contribution workflow are documented in CONTRIBUTING.md and supporting architecture docs.

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Process

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Write tests for your changes
  4. Implement your feature
  5. Ensure all tests pass: npm test
  6. Commit your changes: git commit -m 'Add amazing feature'
  7. Push to the branch: git push origin feature/amazing-feature
  8. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🔒 Security & Privacy

Focused on safe local workspace operations:

  • HTTPS-only remote catalog sources
  • Path traversal & filename sanitization
  • User-created runtime resources are never deleted
  • No telemetry / tracking collected by this extension

Resources:

Report vulnerabilities privately via the Security Policy (responsible disclosure). Please avoid public issues for sensitive findings.

❓ Troubleshooting

IssuePossible CauseAction
Resource not listedFilename pattern mismatchVerify suffix (e.g., .prompt.md, .instructions.md)
Remote catalog emptyindex.json not reachable / HTTP errorOpen URL in browser; ensure HTTPS and correct raw path
Resource shows MODIFIED unexpectedlyLocal edit vs source catalogDiff runtime file in .github/** with original source
Removed MCP server persists(Upcoming MCP feature) cached merged entryAfter MCP feature release: remove from source & reload window
Preset not applying all itemsMissing referenced filenamesCheck JSON fields and ensure each resource exists

If stuck, enable verbose logging (future setting) or open an issue with a minimal reproduction.

🏷️ Versioning

We use Semantic Versioning for release management:

  • MAJOR: Breaking changes
  • MINOR: New features (backward compatible)
  • PATCH: Bug fixes (backward compatible)

Code of Conduct

This project adheres to the Contributor Covenant Code of Conduct. Participation implies acceptance.

Trademarks

All product names, logos, and brands are property of their respective owners. Use of any third-party trademarks or logos does not imply endorsement.