Overview
Claude Code Skills integration transforms how you work with AI-assisted development by providing intelligent, proactive workflows that learn from your past work. Skills automatically capture valuable sessions, inject relevant context, and recognize patterns to help you avoid repeated mistakes.
What's New: Skills proactively suggest when to save information, automatically link related work, and compose multiple operations into intelligent workflows—like searching past debugging sessions to solve similar bugs faster.
Skills detect decision language, solved problems, and completed implementations, then proactively offer to save to Trix—no manual "remember this" needed.
The debugging assistant skill searches past bugs, shows solutions, helps debug, then auto-captures when fixed—all in one seamless workflow.
Skills are file-based and decoupled from Trix core. If Claude Skills changes, simply delete the skill files—no database migrations required.
Quick Start
Get started with Claude Code Skills in under 2 minutes:
# 1. One-command setup
trix setup claude-code
# Configures:
# ✓ MCP server connection
# ✓ Automatic session capture hooks
# ✓ Context injection hooks
# ✓ Recommended skills
# ✓ Integration testing
# 2. Verify everything works
trix test claude-code
# 3. Start using Claude Code
claude
# You'll now have:
# - Auto-capture of valuable sessions
# - Auto-injection of relevant context
# - Proactive skills that offer to save
# - Intelligent debugging workflowsThat's it! Your Claude Code sessions now automatically save valuable work and
inject relevant context. Skills like /trix-memory-capture and /trix-debugging-assistant are ready to use.
What Are Skills?
Skills are reusable AI workflows in Claude Code that use Trix's MCP (Model Context Protocol) tools to manage memory intelligently. Unlike simple commands, skills can:
- Proactively trigger - Detect patterns in conversation and offer to help
- Compose operations - Chain multiple MCP tools into workflows
- Learn from context - Use session information (git repo, branch, files)
- Build knowledge graphs - Automatically link related memories
- Recognize patterns - Detect recurring issues and suggest prevention
Skills vs. Manual Commands
- You: "Remember this decision"
- Claude: Saves to Trix
- Next session: No context loaded
- Finding past work: Manual search
- Linking related info: Manual
- You: "Decided to use PostgreSQL"
- Claude: "Should I save this decision?"
- Next session: Context auto-loaded
- Similar bug: Shows past solutions
- Auto-linking: Relationships created
Available Skills
trix-memory-capture
Intelligently captures code context, architectural decisions, and implementation details with automatic relationship detection and semantic tagging.
Proactive Triggers
This skill automatically offers to save when it detects:
- Decision language - "decided", "chose", "going with"
- Problem solved - User confirms a solution worked
- Implementation complete - After significant code generation
- Learning moments - "Why does this work?" explanations
- Pattern recognition - "Like last time" or "similar to"
Example Usage
// Manual invocation
/trix-memory-capture Implemented JWT auth with RSA-256 signing
// Proactive trigger (automatic)
You: "Yeah, decided. PostgreSQL it is."
Claude: "Great! I noticed you made a decision. Should I save this to Trix?
📝 I'll capture:
Decision: Use PostgreSQL for api-service
Context: ACID compliance, complex queries
Tags: type:decision, domain:database, project:api-service
[Save to Trix] [Skip] [Edit first]"trix-context-search
Search and retrieve relevant context from Trix using semantic search, full-text search, and graph traversal. Combines multiple search strategies for optimal results.
Search Capabilities
- Semantic search - Conceptual similarity (e.g., "auth patterns")
- Full-text search - Exact matches (e.g., specific error messages)
- Graph traversal - Explore relationships between memories
- Hybrid search - Combines semantic + fulltext for best results
- Temporal filtering - Recent vs historical memories
Example Usage
// Semantic search
/trix-context-search What have I learned about Redis caching?
// Result:
Found 8 memories about Redis caching:
Decisions:
• [mem_5k2j8n] Redis vs Memcached evaluation (score: 0.88)
Decision to use Redis for data structure support
Implementations:
• [mem_9h3m5p] Redis connection pooling setup (score: 0.84)
Connection pooling configured with max 50 connections
Learnings:
• [mem_3n8k2m] Redis memory optimization (score: 0.76)
Use compression for large values, monitor memory usagetrix-debugging-assistant (NEW)
A complete debugging workflow that searches past debugging sessions, applies learned solutions, and automatically captures new fixes. This is the first workflow composition skill that demonstrates how skills can chain multiple operations.
Workflow Steps
- Search - Automatically searches Trix for similar bugs
- Show solutions - Displays what worked before with relevance scores
- Apply learnings - Tries analogous fixes from past sessions
- Debug - Helps solve the current issue with informed approach
- Auto-capture - Saves solution when user confirms it works
- Link bugs - Creates relationships to build debugging knowledge graph
- Detect patterns - After 3+ similar bugs, suggests prevention
Complete Example
User: "I'm getting: TypeError: Cannot read property 'map' of undefined"
Claude: Let me search Trix for similar errors...
🔍 Found 2 highly relevant solutions:
1. [mem_abc123] Same error - fixed 2 weeks ago (95% match)
Problem: Tried to map over API response before data loaded
Solution: Added loading check and optional chaining
Root cause: Race condition in useEffect
Time to fix: 10 minutes
Code that fixed it:
if (!data) return <Loading />;
return data?.items?.map(...)
2. [mem_def456] Similar undefined error (82% match)
Problem: Async data not ready when component rendered
Solution: Conditional rendering + default empty array
Based on these patterns, this looks like a data loading timing issue.
Let's check:
1. Is this coming from an API call?
2. Are you accessing the data immediately in render?
User: "Yes, it's from an API call in useEffect"
Claude: Perfect - same pattern as mem_abc123. The data hasn't
loaded yet when you try to map. Try adding a loading check...
User: "That fixed it!"
Claude: ✓ Excellent! Automatically saving to Trix...
📝 Saved debugging session:
Memory ID: mem_new789
Problem: TypeError on undefined map
Root Cause: Race condition - mapping before API data loaded
Solution: Added loading check before map operation
Time to Fix: 8 minutes
Tags: type:bug, status:resolved, lang:javascript,
framework:react, project:frontend-app
Relationships created:
➜ SIMILAR_TO mem_abc123 (same root cause)
➜ SIMILAR_TO mem_def456 (same solution pattern)
➜ USES_PATTERN mem_pattern_001 (loading state pattern)
📊 This is the 3rd time we've hit this pattern.
💡 Recommendation:
Consider adding a linting rule or code snippet for
"always check data before mapping"
Want me to create a preventive best practice memory?Key Innovation: The debugging assistant learns from every bug you fix, building a searchable knowledge base of solutions. Similar bugs are solved 8x faster on average because past solutions are automatically surfaced.
How Skills Work
Architecture
Skills are stored as markdown files in Claude Code's configuration directory and use Trix's MCP tools to interact with memory. This architecture keeps Trix core pure while delivering powerful functionality.
Claude Code CLI
├── Skills (~/.config/claude-code/skills/)
│ ├── trix-memory-capture/SKILL.md
│ ├── trix-context-search/SKILL.md
│ └── trix-debugging-assistant/SKILL.md
│
├── MCP Connection (configured in settings.json)
│ └── Connects to trix-mcp server
│
└── Hooks (SessionStart, SessionEnd)
├── inject-context-hook (auto-load context)
└── capture-session-hook (auto-save sessions)
trix-mcp Server
└── 140+ MCP Tools
├── store_memory, get_memory, search_memories
├── semantic_search, fulltext_search
├── create_relationship, find_related_memories
└── ... and many more
trix-api
└── Pure memory storage (no Claude awareness)
✓ Zero database changes
✓ Reusable for other AI toolsProactive Behavior
Skills analyze conversation patterns and proactively offer to help. This makes Trix feel intelligent and helpful rather than passive.
// Pattern: Decision Language
User: "I think we should go with PostgreSQL for this project"
Claude: "That makes sense. PostgreSQL is a solid choice for..."
User: "Yeah, decided. PostgreSQL it is."
// Skill detects "decided" keyword → triggers proactive offer
Claude: "Great! I noticed you made a decision. Should I save
this to Trix memory?
📝 I'll capture:
Decision: Use PostgreSQL for api-service
Context: [summary of discussion]
Tags: type:decision, domain:database, tech:postgresql
This will help you (and your team) remember why you chose PostgreSQL.
[Save to Trix] [Skip] [Let me edit first]"
// Pattern: Problem Solved
User: "I'm getting this error: Cannot read property 'id' of undefined"
Claude: "This happens when user object is null. Try optional chaining..."
User: "Perfect! That fixed it."
// Skill detects confirmation → auto-captures solution
Claude: "Excellent! Since we just solved a bug, I can save this
to Trix so you don't encounter it again.
📝 Proposed memory:
Title: Fixed undefined property access in user object
Problem: Cannot read property 'id' of undefined
Solution: Added optional chaining (user?.id)
Root cause: Missing null check for user object
Tags: type:bug, status:resolved, lang:javascript
I'll link this to similar bugs I found in your Trix memory.
[Save automatically] [Skip] [Edit details]"Session Context Awareness
Skills have access to session information and use it to enhance captures with project context, making memories more findable and useful.
- Git repository - Auto-tags with
project:repo-name - Git branch - Adds
branch:feature-namefor context - Working directory - Includes file paths in metadata
- Recent files - Tags with relevant file types
- Auto-injected context - References memories loaded at session start
// Original user input
"Implemented JWT auth with RSA-256"
// Enhanced by skill with session context
"Implemented JWT auth with RSA-256 signing in api-service project.
Location: /Users/dev/projects/api-service/src/auth/jwt.ts
Branch: feature/auth-improvements
Date: 2026-01-07
Related files:
- src/middleware/auth.ts
- src/utils/token.ts"
// Auto-generated tags
Tags: [
"type:implementation",
"domain:auth",
"tech:jwt",
"project:api-service",
"branch:feature/auth-improvements",
"filetype:typescript"
]Setup Guide
Automatic Setup (Recommended)
The trix setup claude-code command handles everything automatically:
$ trix setup claude-code
🔍 Detecting Claude Code installation...
✓ Found at ~/.config/claude-code
🔑 Configuring authentication...
? Trix API key: [enter your key or use existing]
✓ API key stored securely
🌐 Configuring MCP server...
? MCP server URL: [https://mcp.trixdb.com/mcp]
✓ Testing connection... 41 tools available
🪝 Setting up hooks...
[x] Enable automatic session capture? (recommended) [Y/n]
[x] Enable automatic context injection? (recommended) [Y/n]
✓ Hooks configured
🎯 Installing skills...
? Which skills to install?
[x] trix-memory-capture (manual capture)
[x] trix-context-search (search memories)
[x] trix-debugging-assistant (debugging workflow)
✓ 3 skills installed
🧪 Testing integration...
✓ MCP connection working
✓ Create test memory... success
✓ Search test memory... found
✓ Hooks can execute... success
✓ Cleanup test data... done
✅ Setup complete!
Next steps:
1. Start Claude Code: claude
2. Test context injection: "What's in my Trix memory?"
3. The session will auto-save when you exitManual Setup
If you prefer manual configuration, edit ~/.config/claude-code/settings.json:
{
"mcpServers": {
"trix": {
"url": "https://mcp.trixdb.com/mcp",
"headers": {
"Authorization": "Bearer gdb_your_api_key_here"
}
}
},
"hooks": {
"SessionStart": [{
"type": "command",
"command": "trix inject-context-hook",
"timeout": 3000
}],
"SessionEnd": [{
"type": "command",
"command": "trix capture-session-hook",
"timeout": 5000
}]
}
}Then install skills:
trix skills init trix-memory-capture
trix skills init trix-context-search
trix skills init trix-debugging-assistantTesting Your Integration
$ trix test claude-code
🧪 Testing Claude Code Integration...
1. Environment Check
✓ Claude Code detected at ~/.config/claude-code
✓ Settings file exists and valid JSON
2. MCP Configuration
✓ MCP server configured
✓ API key present
✓ Connection test: SUCCESS (41 tools available)
3. Hooks Configuration
✓ SessionStart hook configured
✓ SessionEnd hook configured
✓ Hook executables found in PATH
4. Skills Installation
✓ Skills directory exists
✓ Installed skills: 3 found
- trix-memory-capture ✓
- trix-context-search ✓
- trix-debugging-assistant ✓
5. Functional Tests
✓ Create test memory... success
✓ Search test memory... found
✓ Cleanup test data... deleted
✅ All tests passed! Integration working correctly.Usage Examples
Example 1: Automatic Decision Capture
$ claude
You: "I think we should use Redis for caching API responses"
Claude: "That's a great choice. Redis is excellent for caching
because it's fast, supports data structures..."
You: "Sounds good. Let's go with Redis then."
// Skill detects decision → proactive offer
Claude: "I noticed you made a decision! Should I save this to Trix?
📝 Decision captured:
What: Use Redis for API response caching
Why: Fast, supports data structures, widely adopted
When: 2026-01-07
Project: api-service
[Save] [Skip] [Edit]"
You: "Save"
Claude: "✓ Saved as mem_abc123
Tagged with: type:decision, tech:redis, domain:cache, project:api-service
I also found 2 related caching decisions from last month.
Want to link them together?"Example 2: Debugging with Past Context
$ claude
You: "Help me debug this: Error: ECONNREFUSED connecting to database"
// Skill automatically searches past debugging sessions
Claude: "Let me search your past debugging sessions for similar issues...
🔍 Found 3 related problems:
1. [mem_db_001] ECONNREFUSED PostgreSQL (95% similar) - 1 week ago
Solution: Database wasn't running - started with 'docker-compose up db'
Time to fix: 2 minutes
2. [mem_db_002] Connection timeout (78% similar) - 2 weeks ago
Solution: Wrong connection string in .env
Time to fix: 5 minutes
3. [mem_db_003] Port conflict (65% similar) - 1 month ago
Solution: Port 5432 was in use - changed to 5433
Based on past patterns, let's check:
1. Is the database service running?
2. Check docker-compose ps or systemctl status postgresql"
You: "Oh! Database isn't running. Started it, now it works!"
// Auto-capture triggered
Claude: "Perfect! ✓ Saving this debugging session...
📝 Captured:
Problem: ECONNREFUSED database connection
Root Cause: Database service not running
Solution: Started database with docker-compose up db
Time to Fix: 1 minute (thanks to past solutions!)
Linked to mem_db_001 (exact same issue)
💡 Since this is the 2nd time, want me to create a startup
checklist memory to prevent this?"Example 3: Context Auto-Injection
# Working in project: api-service, branch: feature/rate-limiting
$ claude
// Hook automatically injects relevant context
🧠 Trix loaded 5 relevant memories for api-service:
Recent work:
• [mem_123] Redis setup for this project (2 days ago)
• [mem_456] API authentication implementation (yesterday)
• [mem_789] Rate limiting discussion (1 hour ago)
You: "How should I implement rate limiting?"
Claude: "Based on your recent work in api-service (mem_789),
you discussed using a sliding window algorithm with Redis.
Since you already set up Redis (mem_123), here's how to
implement it using the redis client you configured..."
// Claude has context without you mentioning it!Best Practices
Let Skills Be Proactive
- Don't manually invoke
/trix-memory-capturefor every decision - Let skills detect patterns and offer to save automatically
- Accept skill suggestions when they're relevant
- Trust the importance scoring for session capture
Use the Debugging Assistant
- Always start debugging sessions with
/trix-debugging-assistant - Let it search past solutions before trying new approaches
- Build your debugging knowledge graph over time
- Pay attention to pattern detection warnings
Leverage Context Injection
- Work in project directories so git context is detected
- Review auto-injected memories at session start
- Reference memory IDs when asking follow-up questions
- Use project-specific terminology for better matches
Maintain Memory Quality
- Edit captures before saving if details are missing
- Use consistent tag vocabulary across memories
- Review auto-captured sessions periodically
- Clean up outdated memories that are no longer relevant
Important: Skills create relationships automatically. After
accumulating many memories, use trix memories consolidate to merge
duplicates and maintain a clean knowledge graph.
Customization
Configure Capture Behavior
# Adjust importance threshold (default: 6.0)
trix config set capture.min_score 7.5 # Capture less
trix config set capture.min_score 5.0 # Capture more
# Disable auto-capture (manual only)
trix config set capture.auto_enabled false
# View recent auto-captures
trix memories list --source auto-capture --limit 10Configure Context Injection
# Increase context budget (more memories injected)
trix config set inject.max_tokens 4000
# Limit to recent memories only
trix config set inject.max_age_days 7
# Include all project memories regardless of age
trix config set inject.include_all_project trueCreate Custom Skills
Create your own skills by adding a SKILL.md file to ~/.config/claude-code/skills/my-skill/:
---
name: my-custom-skill
description: My custom skill using Trix
version: 1.0.0
category: custom
---
# My Custom Skill
## Instructions
You have access to Trix MCP tools:
- store_memory - Save information
- semantic_search - Find similar content
- create_relationship - Link related memories
When the user [describes trigger], you should:
1. [Step 1]
2. [Step 2]
3. [Step 3]
## Examples
[Show examples of skill usage]Skills automatically become available in Claude Code after creation.
Troubleshooting
Skills Not Appearing
- Verify skills directory exists:
~/.config/claude-code/skills/ - Check
SKILL.mdfile has proper frontmatter - Restart Claude Code
- Run
trix test claude-code --only skills
MCP Tools Not Available
- Verify MCP server URL in settings.json
- Check API key is valid:
curl -H "Authorization: Bearer gdb_..." [mcp-url]/health - Ensure trix-mcp server is running
- Run
trix test claude-code --only mcp
Hooks Not Firing
- Verify hooks are configured in settings.json
- Check
trixcommand is in PATH:which trix - Test hooks manually:
echo '{"session_id":"test"}' | trix inject-context-hook - Check Claude Code logs for hook errors
- Run
trix test claude-code --only hooks
Proactive Triggers Not Working
Proactive behavior depends on Claude's ability to detect patterns. If triggers aren't working:
- Use explicit decision language: "decided", "chose", "will use"
- Confirm solutions clearly: "that worked", "perfect", "fixed"
- Give context in discussions rather than short responses
- Review skill SKILL.md to understand trigger patterns
For debugging help, run trix test claude-code --verbose to see
detailed test output. Join our Discord for community support.
Advanced Topics
Pattern Detection & Prevention
After accumulating debugging sessions, the debugging assistant detects recurring patterns and suggests preventive measures:
// After fixing 3+ similar bugs
Claude: "📊 Pattern detected!
I've found 4 instances of 'undefined property access' errors:
- mem_abc (2 weeks ago)
- mem_def (1 month ago)
- mem_ghi (3 months ago)
- mem_xyz (just now)
💡 Preventive measure:
Should I create a best practice memory?
'Always add null checks when accessing API response data'
This will help prevent this class of bugs in future.
[Create best practice] [Skip]"Memory Consolidation
As your memory library grows, consolidate to maintain quality:
# Find and merge duplicate memories
trix memories consolidate
# Review recent captures
trix memories review --source auto-capture
# Check memory health
trix memories health
# Shows:
# - Orphaned memories (no relationships)
# - Stale memories (old, unused)
# - Duplicate content
# - Missing tagsWorkflow Composition
The debugging assistant demonstrates workflow composition—chaining multiple operations. You can create similar workflows:
- Research workflow - Search → Analyze → Summarize → Store
- Decision workflow - Context → Alternatives → Decide → Document
- Review workflow - Retrieve → Evaluate → Update → Link
Team Collaboration
Skills work with Trix's multi-tenant architecture for team knowledge sharing:
- Shared space = team knowledge base
- Personal space = individual learnings
- Pattern detection across team members
- Best practices emerge from collective experience
What's Next
Now that you have Claude Code Skills set up:
- Start using Claude Code naturally - let skills detect patterns
- Review auto-captured sessions to see what's being saved
- Use
/trix-debugging-assistantfor your next bug - Build your debugging knowledge graph over time
- Create custom skills for your specific workflows
The more you use Claude Code with Trix, the smarter it gets. Debugging sessions solve similar bugs 8x faster on average after accumulating past solutions.
Additional Resources
- AI-CLI Integration Overview - Understand automatic capture
- MCP Server - Learn about the 41 available tools
- Best Practices - Memory management tips
- Memory API - API documentation