ContextShare (VS Code Extension)

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 ("Hats").
✨ 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)
- Hats (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
Category |
Purpose / Scope |
Runtime Location |
Filename Pattern / Notes |
Status |
Chat Modes |
Persona / behavior definitions |
.github/chatmodes/ |
*.chatmode.md |
✅ |
Instructions |
Shared guideline sets |
.github/instructions/ |
*.instructions.md (legacy *.instruction.md) |
✅ |
Prompts |
Prompt templates / starters |
.github/prompts/ |
*.prompt.md |
✅ |
Tasks |
Automation / action configurations |
.github/tasks/ |
*.task.json |
✅ |
MCP Servers |
Model Context Protocol sources |
.vscode/mcp.json |
Merged composite file |
� Coming soon |
Hats |
Declarative preset bundles |
.github/hats/ |
*.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
- Open the ContextShare Activity Bar view.
- Add a catalog (Options → Add Catalog Directory… or add a remote HTTPS URL).
- Activate a resource (right‑click → Activate).
- (Optional) Apply a Hat preset to activate multiple at once.
- Edit runtime copies under
.github/**
if you need local tweaks (they'll show as MODIFIED).
Hats (Presets)
Hats 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
└── hats/
└── 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 Hat (.github/hats/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
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Write tests for your changes
- Implement your feature
- Ensure all tests pass:
npm test
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- 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
Issue |
Possible Cause |
Action |
Resource not listed |
Filename pattern mismatch |
Verify suffix (e.g., .prompt.md , .instructions.md ) |
Remote catalog empty |
index.json not reachable / HTTP error |
Open URL in browser; ensure HTTPS and correct raw path |
Resource shows MODIFIED unexpectedly |
Local edit vs source catalog |
Diff runtime file in .github/** with original source |
Removed MCP server persists |
(Upcoming MCP feature) cached merged entry |
After MCP feature release: remove from source & reload window |
Hat not applying all items |
Missing referenced filenames |
Check 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.