Persistent memory and cross-session learning for AI coding assistants. Cloud-based context management via MCP with semantic search, dependency graphs, and collaborative workflows.
Persistent memory and cross-session learning for AI coding assistants. Cloud-based context management via MCP with semantic search, dependency graphs, and collaborative workflows.
This skill integrates ContextStream v0.4.x MCP server into your coding workflow, providing:
On the **first message** of every new session:
1. Call `session_init(folder_path="<cwd>", context_hint="<user_message>")`
2. Then call `context_smart(user_message="<user_message>", format="minified", max_tokens=400)`
3. If you see `[INGEST_RECOMMENDED]`, ask the user if they want to enable semantic code search
**BEFORE responding to any user message:**
1. Always call `context_smart(user_message="<user_message>", format="minified", max_tokens=400)` FIRST
2. This retrieves relevant context from previous sessions, decisions, and codebase
3. Use the returned context to inform your response
**⚠️ STOP: Before using any local Search/Glob/Grep/Read/Explore tools:**
1. Call `search(mode="hybrid", query="...", limit=3)` FIRST
2. Only use local tools if ContextStream returns 0 results
3. Search modes:
- `semantic` - AI-powered conceptual search
- `hybrid` - Combines semantic + keyword
- `keyword` - Traditional text search
- `pattern` - Regex/glob patterns
For understanding dependencies and impact:
**After completing work:**
```
session(action="capture", event_type="decision", title="Brief title", content="What was decided and why")
```
**When user corrects you or shows frustration:**
```
session(action="capture_lesson",
title="What went wrong",
trigger="What caused the mistake",
impact="How it affected the user",
prevention="How to avoid it next time")
```
**Before risky changes:**
```
session(action="get_lessons", query="<topic>")
```
**Create a plan:**
```
session(action="capture_plan",
title="Plan Title",
description="...",
goals=["goal1", "goal2"],
steps=[{id: "1", title: "Step 1", order: 1}, ...])
```
**Create tasks:**
```
memory(action="create_task",
title="Task Title",
plan_id="<plan_id>",
priority="high|medium|low",
description="...")
```
**Update task status:**
```
memory(action="update_task",
task_id="<uuid>",
task_status="pending|in_progress|completed|blocked")
```
**List plans/tasks:**
| Tool | Common Actions |
|------|----------------|
| `search` | `mode="semantic\|hybrid\|keyword\|pattern"` |
| `session` | `action="capture\|capture_lesson\|get_lessons\|recall\|smart_search"` |
| `memory` | `action="list_events\|create_task\|update_task\|list_tasks"` |
| `graph` | `action="dependencies\|impact\|call_path\|related\|ingest"` |
| `project` | `action="list\|overview\|index_status\|ingest_local"` |
| `workspace` | `action="list\|get\|associate"` |
| `integration` | `provider="github\|slack", action="search"` |
| `help` | `action="tools\|auth\|version\|editor_rules"` |
If Context Pack is enabled:
```
context_smart(user_message="...", format="minified", max_tokens=400, mode="pack", distill=true)
```
If unavailable, omit `mode` - the API will fall back automatically.
ContextStream tools may be prefixed in your MCP client (e.g., `mcp__contextstream__search`). If a tool call fails with "No such tool available":
1. Call `help(action="tools")` to see exact tool names
2. Update your tool calls to match the exposed names
**User:** "How does authentication work in this codebase?"
**Assistant actions:**
1. `context_smart(user_message="How does authentication work in this codebase?", format="minified", max_tokens=400)`
2. `search(mode="semantic", query="authentication login session", limit=5)`
3. `graph(action="dependencies", file_path="<auth_file>", symbol="authenticate")`
4. [Respond with findings]
5. `session(action="capture", event_type="decision", title="Authentication flow explained", content="User asked about auth, found in X, uses Y pattern")`
**User:** "Add OAuth support"
**Assistant actions:**
1. `context_smart(user_message="Add OAuth support", format="minified", max_tokens=400)`
2. `session(action="get_lessons", query="oauth authentication")`
3. `search(mode="hybrid", query="oauth config setup", limit=3)`
4. [Plan and implement]
5. `session(action="capture", event_type="decision", title="Added OAuth", content="Implemented OAuth using Z library, config in W")`
Full documentation: https://contextstream.io/docs/mcp/tools
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/contextstream-mcp-integration-hflqin/raw