A production-ready technology expert agent framework for Claude Code. Build specialized AI assistants with domain knowledge, cross-session memory, and procedural skills.
- What It Is and Why Use It
- Quick Start
- System Architecture
- Technology Experts
- Skills System
- Memory System
- Hooks System
- Creating Your Own Expert
- Adapting to Your Project
- Migration from v3.x
Claude Code is a powerful tool, but:
- It doesn't know technology specifics (NATS, Presidio, ClickHouse)
- It doesn't remember context between sessions
- It lacks structure for complex, multi-step tasks
- It may guess instead of checking documentation
Vigil-Code introduces a system of technology experts - specialized agents with:
- Domain Knowledge - each expert knows their technology deeply
- Cross-Session Memory - learnings, decisions, and preferences persist
- Procedural Skills - step-by-step workflows for complex tasks
- Automation Hooks - safety validators and session initialization
Skills = HOW to do things (procedures, workflows)
Agents = WHO does the work (technology expertise)
v4.1 Key Changes:
- No orchestrator - Claude Code handles routing natively
- Consolidated experts - 7 focused experts (down from 17)
- Memory system - Cross-session persistence with co-modification tracking
- Python hooks - Zero-dependency automation with automatic cleanup
# Clone the repository
git clone https://github.com/tbartel74/vigil-code.git
cd vigil-code
# Copy to your project
cp -r .claude /path/to/your/project/
# Optional: copy CLAUDE.md as template
cp CLAUDE.md /path/to/your/project/your-project/
βββ .claude/
β βββ agents/ # 7 technology experts
β βββ skills/ # 6 procedural skills
β βββ commands/ # Slash commands
β βββ hooks/ # Automation hooks
β βββ memory/ # Cross-session persistence
β βββ core/ # Protocols
β βββ state/ # Session state (gitignore)
βββ CLAUDE.md # Your project instructions
βββ [rest of project]
/expert How do I configure a NATS JetStream consumer?
π€ Invoking: nats-expert
β
Use jetstream.consumers.add() with ack_policy
π Source: https://docs.nats.io/
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TECHNOLOGY EXPERTS (7) β
β β
β ββββββββββββββ ββββββββββββββ ββββββββββββββ ββββββββββββββ β
β β NATS β β Express β β Testing β β Docker β β
β β Expert β β Expert β β Expert β β Expert β β
β ββββββββββββββ ββββββββββββββ ββββββββββββββ ββββββββββββββ β
β β
β ββββββββββββββ ββββββββββββββ ββββββββββββββ β
β β Security β β ClickHouse β β Python β β
β β Expert β β Expert β β Expert β β
β ββββββββββββββ ββββββββββββββ ββββββββββββββ β
β β β
β βΌ β
β βββββββββββββββββββββββββββββββββ β
β β Context System β β
β β - memory/learnings.json β β
β β - memory/decisions.json β β
β β - core/protocols.md β β
β βββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Component | Location | Description |
|---|---|---|
| Agents | .claude/agents/*/AGENT.md |
Technology experts with domain knowledge |
| Skills | .claude/skills/*/SKILL.md |
Procedural workflows and procedures |
| Commands | .claude/commands/*.md |
Slash commands (/expert, /deploy) |
| Hooks | .claude/hooks/ |
Automation (session init, safety guards) |
| Memory | .claude/memory/ |
Cross-session persistence |
| Protocols | .claude/core/protocols.md |
Shared protocols |
Each expert is a .claude/agents/[name]/AGENT.md file with YAML frontmatter + Markdown content.
| Expert | Primary Focus | Use For |
|---|---|---|
nats-expert |
NATS JetStream | Streams, consumers, KV store, messaging patterns |
security-expert |
Application Security | OWASP, vulnerabilities, audits, auth |
express-expert |
Express.js | REST APIs, middleware, JWT auth, rate limiting |
testing-expert |
Testing | Vitest, TDD workflow, fixtures, mocking, E2E |
clickhouse-expert |
ClickHouse | Analytics SQL, schema design, TTL, performance |
docker-expert |
Docker | Containers, compose, networking, stack.sh |
python-expert |
Python | Flask, FastAPI, Presidio PII, language detection |
Single Expert:
/expert How do I create a ClickHouse materialized view?
β clickhouse-expert responds
Force Specific Expert:
/expert [docker] Why is port 5678 not accessible?
/expert [security] Review this authentication flow
---
name: nats-expert
description: |
NATS and JetStream messaging expert.
Deep knowledge of streams, consumers, workers, request-reply patterns.
tools:
- Read
- Edit
- Glob
- Grep
- Write
- Bash
- Task
- WebFetch
---
# NATS Expert
Expert in NATS JetStream messaging.
## Core Knowledge
[Technology fundamentals]
## Common Procedures
[Step-by-step procedures]
## Key Files
[Project-specific references]
## Critical Rules
[Do's and Don'ts]Skills are procedural workflows that guide Claude through multi-step tasks.
| Skill | Purpose |
|---|---|
session-initializer |
Auto-load context on session start |
pattern-library-manager |
Detection pattern management |
git-commit-helper |
Conventional commits, no AI attribution |
browser-extension-developer |
Chrome extension development |
documentation-specialist |
README, API docs, changelogs |
installation-orchestrator |
Installation troubleshooting |
| Aspect | Agent | Skill |
|---|---|---|
| Focus | Technology expertise | Procedure/workflow |
| Knowledge | Deep domain knowledge | Step-by-step instructions |
| Invocation | /expert [query] |
/skill [name] |
| Example | "How to configure NATS?" | "Run TDD workflow" |
Cross-session persistence in .claude/memory/:
memory/
βββ learnings.json # Lessons learned (patterns, gotchas)
βββ decisions.json # Architectural decisions
βββ preferences.json # User preferences
βββ co-modifications.json # File pairs frequently edited together
- SessionStart - Hook loads recent learnings + cleans old caches
- During Session - Use
/rememberto save learnings - Stop - Hook persists new learnings to storage
- Stop - Hook tracks files frequently edited together
/remember learning Always use parameterized queries for ClickHouse
/remember decision Use NATS request-reply for Python services
/remember preference Prefer explicit error handling over try-catch
{
"learnings": [
{
"id": "learn-001",
"content": "Always use parameterized queries for ClickHouse",
"category": "database",
"timestamp": "2026-02-01T10:00:00Z"
}
]
}Python-based automation hooks in .claude/hooks/:
| Hook | Event | Purpose |
|---|---|---|
session-init.sh |
SessionStart | Load context, clean old caches (7d tsc-cache, 30d audit logs) |
safety-validator.py |
PreToolUse | Block dangerous commands |
memory-writer.py |
Stop | Persist learnings |
co-modification-tracker.py |
Stop | Track files frequently edited together |
Blocks dangerous patterns:
BLOCKED_PATTERNS = [
r'rm\s+-rf\s+/', # rm -rf with absolute path
r'git\s+push.*--force', # Force push
r'docker\s+system\s+prune', # Docker prune
]mkdir -p .claude/agents/terraform-expert---
name: terraform-expert
description: |
Terraform and Infrastructure as Code expert.
Deep knowledge of providers, modules, state management.
tools:
- Read
- Edit
- Glob
- Grep
- Write
- Bash
- Task
- WebFetch
---
# Terraform Expert
Expert in Terraform and Infrastructure as Code.
## Core Knowledge
### Resource Definition
\`\`\`hcl
resource "aws_instance" "web" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
}
\`\`\`
### Common Commands
\`\`\`bash
terraform init # Initialize
terraform plan # Preview changes
terraform apply # Apply changes
\`\`\`
## Documentation Sources
| Source | URL |
|--------|-----|
| Terraform Docs | https://developer.hashicorp.com/terraform/docs |
## Critical Rules
- Always use remote state in production
- Never commit .tfstate files to git
- Use variables for sensitive dataThe system reads triggers from description and routes appropriate queries.
cp -r vigil-code/.claude /your/project/# If you don't use ClickHouse
rm -rf .claude/agents/clickhouse-expertFor technologies specific to your project.
# Remove project-specific skills
rm -rf .claude/skills/pattern-library-manager
# Add your own
mkdir .claude/skills/my-workflowUse the template in CLAUDE.md and customize for your project.
# Agent state (runtime)
.claude/state/
.claude/settings.local.json
.claude/audit_logs/
.claude/tsc-cache/| v3.x | v4.1 |
|---|---|
/expert with orchestrator |
Direct expert invocation |
| 17 technology experts | 7 consolidated experts |
| 22 skills | 6 essential skills |
| TypeScript hooks | Python hooks (zero deps) |
| Manual token tracking | Claude 4.5 automatic |
| OODA protocol in every agent | Simplified reasoning |
orchestratoragent removedreact-expertβ Frontend Conventions in CLAUDE.mdvitest-expertβtesting-expertpresidio-expertβpython-expertkubernetes-expertβdocker-expertredis-expertβexpress-experthelm-expert,git-expertβ removed
- orchestrator β Claude Code handles routing natively
- code-audit-expert β merged into security-expert
- error-debugger β generic, not needed
- performance-profiler β generic, not needed
- refactor-planner β generic, not needed
| File | Description |
|---|---|
| .claude/README.md | Agent system documentation |
| .claude/core/protocols.md | Essential protocols |
| .claude/core/tool-schema.md | Tool patterns |
| CLAUDE.md | Project template |
MIT License - See LICENSE file.
Copyright (c) 2025-2026 Tomasz Bartel
Status: Production Ready Version: 4.1.1 Based on: Anthropic Context Engineering Best Practices (2025-2026) Last Updated: 2026-02-02