一键导入
graphiti-mcp-usage
Workflow for using Graphiti MCP tools to capture preferences, procedures, and facts consistently.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Workflow for using Graphiti MCP tools to capture preferences, procedures, and facts consistently.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Mandatory knowledge capture after completing work. Documents solution in Graphiti and tracks effectiveness for system improvement.
Comprehensive discovery before starting any spec or major task. Searches Graphiti, recommends vibe/MCPs, surfaces patterns.
This skill should be used when conducting focused code reviews that emphasize clarity, data flow understanding, and minimal assumptions. Trigger when reviewing pull requests, code changes, or when explicitly asked to review code. Produces structured reviews with priority-based feedback.
This skill should be used when testing ScreenGraph end-to-end flows (drift detection, agent runs) while monitoring backend and frontend logs in real-time. Use when the user wants to observe system behavior across services, debug live runs, or verify event streaming.
Lightweight tactical guidance during implementation. Just MCP suggestions and quick lookups, no heavy Graphiti searches.
Self-improving context loader that MUST be run before every prompt. Searches Graphiti for relevant past work, loads appropriate vibe, and provides intelligent recommendations.
| name | graphiti-mcp-usage |
| description | Workflow for using Graphiti MCP tools to capture preferences, procedures, and facts consistently. |
This skill explains how to use the Graphiti knowledge graph effectively. Follow it whenever you need to look up or store ScreenGraph preferences, procedures, or factual relationships.
search_nodes to look for Preferences or Procedures tied to your task.search_facts to explore relationships and factual context."Preference", "Procedure") to narrow the results.add_episode right away.| Core Principle | Quick Action |
|---|---|
| Know Your Context | Run search_nodes for Preferences & Procedures before starting. |
| Know the Relationships | Use search_facts to surface supporting data. |
| Be Efficient | Filter nodes immediately by specifying "Preference" or "Procedure". |
| Be Thorough | Review all matches to avoid redundant knowledge. |
| Don’t Lose Context | Use add_episode immediately for new or updated requirements. |
| Define the “How” | Record workflows as Procedures. |
| Define the “What” | Record entity relationships as Facts. |
| Tag Everything | Use clear categories for every Preference and Procedure. |
add_episode.Remember: the Graphiti knowledge graph is your memory. Use it consistently to deliver personalized, context-aware assistance.
ALWAYS use group_id="screengraph" for ALL Graphiti operations.
group_id provides project isolationepisode_body to categorize content (e.g., [Tags: backend, agent, appium])"screengraph" alwaysCommon Tags for Organization:
backend - Backend/API patternsfrontend - UI components, Svelte patternstesting - E2E tests, integration testsdebugging - Bug fixes, workaroundsarchitecture - Design decisionsdevops - CI/CD, automationappium - Device connections, WebDriver// Step 1: Search for existing patterns
const nodes = await search_memory_nodes({
query: "agent recovery after device disconnect",
group_ids: ["screengraph"],
max_nodes: 10
});
// Step 2: Search for specific facts
const facts = await search_memory_facts({
query: "WebDriver session timeout handling",
group_ids: ["screengraph"],
max_facts: 10
});
// Step 3: Review results → Implement → Document
// Document the solution immediately
await add_memory({
name: "Agent Stalls on Privacy Consent Dialog",
episode_body: `
[Tags: backend, agent, appium, debugging]
**Problem**: Agent hangs when app shows privacy consent modal
**Root Cause**: Policy engine doesn't handle modal overlays
**Solution**:
- Added pre-flight dialog detection in device-check.ts
- Prompt user to handle consent before starting
- Added check in EnsureDevice node
**Gotchas**:
- Must check BEFORE starting policy execution
- Different apps have different consent flows
- Some consent dialogs block UI hierarchy
**Files Modified**:
- backend/agent/nodes/setup/EnsureDevice/device-check.ts
- backend/agent/nodes/setup/EnsureDevice/node.ts
**Related Issues**: BUG-015
**Lessons**: Always assume first-run experience needs human intervention
`,
group_id: "screengraph",
source: "text"
});
// Search for similar UI patterns
const uiPatterns = await search_memory_nodes({
query: "Svelte 5 component with real-time updates",
group_ids: ["screengraph"],
max_nodes: 5
});
// Check for specific gotchas
const gotchas = await search_memory_facts({
query: "Svelte 5 runes reactivity issues",
group_ids: ["screengraph"],
max_facts: 5
});
// After major refactoring or design decision
await add_memory({
name: "Agent State Machine: Single Sink Pattern",
episode_body: `
[Tags: backend, agent, architecture]
**Decision**: Use single terminal state ("completed") instead of multiple end states
**Rationale**:
- Simplifies state transitions
- Easier to track run completion
- Aligns with database schema
**Alternatives Considered**:
- Multiple terminal states (success/failure/canceled)
- Rejected: Added complexity without clear benefit
**Implementation**:
- State machine has 1 terminal: "completed"
- stopReason field captures why (success/error/canceled)
- Frontend uses stopReason for UI decisions
**References**:
- backend/agent/machine/AgentMachine.ts
- agent_single_sink_design.md
**Date**: 2025-11-05
`,
group_id: "screengraph",
source: "text"
});
Search by topic:
search_memory_nodes({
query: "topic",
group_ids: ["screengraph"],
max_nodes: 10
})
Search for specific facts:
search_memory_facts({
query: "question",
group_ids: ["screengraph"],
max_facts: 10
})
Document solution:
add_memory({
name: "Short Title",
episode_body: "[Tags: category1, category2]\n\nProblem:\nSolution:\nGotchas:\nFiles:",
group_id: "screengraph",
source: "text"
})
Retrieve recent episodes:
get_episodes({
group_id: "screengraph",
last_n: 10
})
After running important Task commands, document learnings:
// After task founder:workflows:db-reset
add_memory({
name: "Database Reset Procedure",
episode_body: "[Tags: devops, database]\n\nRun 'task founder:workflows:db-reset' to wipe DB. Automatically runs migrations after. Safe for dev, dangerous for prod.",
group_id: "screengraph",
source: "text"
})
Before using complex skills (backend-debugging, e2e-testing), search Graphiti for related past issues to inform your approach.