Claude Code Skills Integration
Terraphim provides a set of Claude Code skills that teach AI coding agents how to use Terraphim's knowledge graph capabilities. These skills are available as a Claude Code plugin.
Installation
From GitHub
# Add the Terraphim marketplace
# Install the engineering skills plugin
From Local Clone
# Clone the repository
# Add as local marketplace
# Install the plugin
Terraphim-Specific Skills
terraphim-hooks
Knowledge graph-based text replacement using Terraphim hooks. This skill teaches Claude Code how to:
- PreToolUse Hooks: Intercept commands before execution (e.g., replace
npm installwithbun install) - Git Hooks: Transform commit messages (e.g., replace "Claude Code" attribution with "Terraphim AI")
- CLI Replace Command: Use
terraphim-agent replacefor text transformation
Example Usage:
# Replace npm with bun using knowledge graph
|
# Output: bun install react
# JSON output for programmatic use
|
# Output: {"result":"bun install","original":"npm install","replacements":1,"changed":true}Hook Configuration:
Add to .claude/settings.local.json:
session-search
Search and analyze AI coding assistant session history. This skill teaches Claude Code how to:
- Search Sessions: Find past work by query, concept, or related sessions
- Import History: Load sessions from Claude Code, Cursor, Aider, and other assistants
- Analyze Patterns: Discover agent usage patterns and productivity trends
- Export Sessions: Save sessions to JSON or Markdown
REPL Commands:
| Command | Description |
|---------|-------------|
| /sessions sources | Detect available session sources |
| /sessions import | Import sessions from all sources |
| /sessions search <query> | Full-text search |
| /sessions concepts <term> | Knowledge graph concept search |
| /sessions related <id> | Find related sessions |
| /sessions timeline | Timeline visualization |
| /sessions export | Export to file |
Example Workflow:
# Launch REPL with session support
# In REPL:
Engineering Skills
The plugin also includes general engineering skills:
| Skill | Description |
|-------|-------------|
| architecture | System design, ADRs, API planning |
| implementation | Production code with tests |
| testing | Unit, integration, property-based tests |
| debugging | Systematic root cause analysis |
| rust-development | Idiomatic Rust patterns |
| rust-performance | Profiling, SIMD, optimization |
| code-review | Thorough review for bugs/security |
| documentation | API docs, README, guides |
| devops | CI/CD, Docker, deployment |
Disciplined Development Workflow
For complex features, use the three-phase approach:
Phase 1: Research Phase 2: Design Phase 3: Implementation
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
βdisciplined- β β βdisciplined- β β βdisciplined- β
βresearch β βdesign β βimplementation β
β β β β β β
β β’ Problem scope β β β’ File changes β β β’ Test first β
β β’ System mappingβ β β’ API signaturesβ β β’ Small commits β
β β’ Constraints β β β’ Test strategy β β β’ Quality checksβ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββKnowledge Graph Integration
Skills leverage Terraphim's knowledge graph for:
Text Replacement
Define replacement patterns in docs/src/kg/:
Concept Search
Sessions are enriched with knowledge graph concepts for semantic search:
use ;
let enricher = new?;
let enriched = enricher.enrich?;
// Find sessions by concept
let results = search_by_concept?;Quick Setup
Install all Terraphim hooks and skills:
# In terraphim-ai repository
# Test hooks are working
# Build with session support
Repository
- Skills Repository: github.com/terraphim/terraphim-claude-skills
- Main Repository: github.com/terraphim/terraphim-ai
Related Documentation
- MCP Integration - MCP server for AI tool integration
- TUI Documentation - Terminal UI with REPL commands
- Knowledge Graph - Building knowledge graphs