smart-agent-cc
v0.2.5
Published
Smart Agent for Claude Code — learn skills from your coding conversations
Downloads
52
Readme
Smart Agent for Claude Code
Learn skills from your coding conversations — automatically.
Ever wished Claude Code could learn from your past conversations? That's what we built.
What it does
- 🔍 Watches your Claude Code sessions locally — nothing leaves your machine
- ⚡ Extracts reusable workflow skills AND project knowledge automatically via LLM
- 🔄 Auto-revision — skills get auto-refined as more conversations hit the same pattern
- 🧠 Memory extraction — captures preferences, gotchas, architecture decisions, not just workflows
- 🤝 Team learning — import teammates' session history, every skill shows who contributed
- 📋 Web UI — review, search, filter, approve/reject extracted skills & memories with a side-by-side diff view
- ✅ Writes back approved skills & memories as structured files — CLAUDE.md stays a lean index
Quick Start
npx smart-agent-ccThat's it. On first run:
- Opens GitHub Device Auth — enter the code in your browser
- Starts watching
~/.claude/projects/for new sessions - Web UI launches at http://localhost:3456
Architecture
Claude Code Sessions + Teammate Imports
▼
File Watcher (chokidar)
▼
Session Parser (JSONL → conversation)
▼
LLM Analysis (Claude via Copilot API)
↙ ↘
Skills Memories
(workflows) (facts, gotchas, decisions)
↘ ↙
Web UI — Review & Approve
▼
Write to project files:
.claude/skills/<name>.md
.claude/memories/<category>.md
CLAUDE.md (top-10 index)
~/.claude/ (global items)
🔄 Auto-Revision LoopComponents
| Component | File | Role |
|-----------|------|------|
| Watcher | src/watcher.js | Monitors ~/.claude/projects/ for new session files |
| Parser | src/parser.js | Parses Claude Code JSONL session files into structured conversations |
| Skill Extractor | src/extractor.js | LLM-based extraction of reusable workflow patterns |
| Memory Extractor | src/memory-extractor.js | Segmented pipeline: split → extract → conflict check |
| Dedup | src/dedup.js | Local tag similarity + LLM confirmation for skill deduplication |
| Reviser | src/reviser.js | Auto-revision when a skill is hit 3+ times with new data |
| Auth | src/auth.js | GitHub Device Auth Flow — auto token refresh |
| Store | src/db.js | SQLite database at ~/.smart-agent-cc/skills.db |
| Web UI | web/index.html | Review dashboard with search, filter, sort, diff view |
| Writer | src/writer.js | Writes skills/memories to .claude/ and CLAUDE.md |
| Import | src/import.js | Import teammate session archives with source attribution |
Output Structure
When skills and memories are approved, they're written as structured files:
your-project/
CLAUDE.md ← Top 10 high-frequency skill summaries (index)
.claude/
skills/
pr_review_triage_and_fix.md ← One file per approved skill
figma_to_tailwind_*.md
...
memories/
gotcha.md ← One file per memory category
project_context.md
decision.md
...
~/.claude/ ← Global (cross-project) skills & memories
skills/
memories/
CLAUDE.mdCLAUDE.md only contains a lean index with trigger descriptions and file paths — not full content. Claude Code loads it on startup and reads detailed files on demand.
Import teammate sessions
node src/import.js --path ./teammate-sessions/ --project C--src-studio --source "teammate-name" --project-path "C:\src\studio"Configuration
Optional: create ~/.smart-agent-cc/config.json to override defaults:
{
"endpoint": "https://api.githubcopilot.com/chat/completions",
"model": "claude-sonnet-4-20250514"
}Authentication is handled automatically via GitHub Device Auth — no manual token setup needed.
Memory Categories
| Category | What it captures |
|----------|-----------------|
| user_preference | Work habits, tool choices, coding style |
| factual | Technical facts, configs, API details |
| project_context | Architecture, goals, team structure |
| gotcha | Bugs, workarounds, unexpected behaviors |
| decision | Architecture/design decisions with reasoning |
| action_item | Pending tasks, TODOs, follow-ups |
Data Storage
All data is stored locally at ~/.smart-agent-cc/:
skills.db— SQLite database (sessions, skills, memories, revisions).token— Copilot auth token (auto-refreshed)config.json— Optional configuration overrides
License
MIT
