tana-ai-context-hub
AjaySaini15/tana-ai-context-hub
Three Claude Code skills (ai-memory-setup, ai-memory-sync, skill-improve) that create a self-improving AI skill system with Tana as the source of truth. Skills compound over time — every correction is captured, versioned, and propagated to all configured LLM tool paths automatically.
Instalação
npx convez-ai AjaySaini15/tana-ai-context-hub1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
README
A tradução para o português deste README ainda está na fila.
Self-Improving AI Memory via Tana MCP
Your AI skills get smarter every session. The memory and the improvements live in Tana — portable to every LLM that can connect.
The Real Problem
Most people think the challenge with AI tools is getting good output today. The actual challenge is keeping the quality tomorrow.
You build a prompt that works. Next session: forgotten. You correct a failure and the AI gets it right. Next session: same mistake. You spend 30 minutes getting context loaded. Next tool: start from zero.
The problem isn't a single bad session. It's that your AI system doesn't compound. Every session you're rebuilding instead of building on.
This project is about changing that.
The Proof It Works
Here's a real example. Over 14 coaching sessions (Oct 2025–Feb 2026), a meeting assessment prompt was iteratively improved:
- v1.0: Basic action item extraction, no soft skills assessment
- v1.1: Added CARE/ARE/Pyramid framework detection
- v1.3: Extended extraction to full meeting notes, not just action items (discovered after missing 10 tasks in one session)
- v1.8: Added speaker attribution handling for non-diarized transcripts
- v2.1: Added baseline scoring, overexplaining count, hedge count, mobilization gap check
Each improvement was triggered by a real failure. Each one was captured and persisted. By session 14, the system catches patterns that session 1 missed entirely.
The prompt that drove this lived in Tana as a single node. Editable from any LLM with Tana MCP. Every version of it is logged. That's the system this project formalizes.
How It Works
┌────────────────────────────────────────┐
│ Tana (Source of Truth) │
│ │
│ #AI_Context nodes: │
│ │
│ CONTEXT SKILLS │
│ • About Me • my-workflow │
│ • Key People • task-creation │
│ • Priorities • weekly-review │
│ • Workspace Schema • ... │
│ │
│ Each skill: instructions + eval │
│ criteria + change log (v1.0 → v2.3) │
└──────┬──────────────┬──────────────────┘
│ Tana MCP │ Tana MCP
┌───────────▼──┐ ┌───▼─────────────────┐
│ Claude Code │ │ Gemini / Cowork / │
│ (CLI) │ │ Claude Desktop / │
│ │ │ Any LLM with MCP │
│ /skill- │ │ │
│ improve │ │ Reads context + │
│ captures │ │ skills directly │
│ corrections │ │ from Tana at │
│ │ │ session start │
└──────┬───────┘ └─────────────────────┘
│ /ai-memory-sync push
│ writes to ALL configured tool paths:
├── ~/.claude/skills/[name]/SKILL.md
├── ~/.gemini/prompts/[name].md
├── ~/.ai-skills/[name]/skill.md
│
│ /ai-memory-sync export
▼
┌──────────────┐
│ Claude Mobile│
│ (flat .md │
│ for Projects│
└──────────────┘
Skills in Tana are tool-agnostic. The node stores instructions in plain language. /ai-memory-sync translates them into each tool's format when writing local files — SKILL.md for Claude Code, plain .md for Gemini, JSON for tools that need it. You configure which tools you use once (in manifest.skillPaths), and every improvement propagates to all of them automatically.
Context loading is deterministic. After setup, every LLM interface loads context via read_node with hardcoded node IDs — not search queries. This guarantees your behavioral rules and context are always loaded correctly regardless of how different LLM interfaces handle MCP parameters.
The Modified By field (claude-code, other-llm, manual) enables conflict-free sync. Any LLM that updates a node signals the change — the sync skill picks it up on the next run.
Note on local MCP: Tana MCP currently runs as a local server, so direct node access works for apps on the same machine (Claude Code CLI, Claude Desktop, Cowork, Gemini CLI). For remote access — Claude mobile, any web-based tool — use /ai-memory-sync export to generate a flat markdown file you can upload to a Claude Project.
Tana Voice: #AI_Context nodes double as natural starting points for Tana Voice conversations. Long-press any node to begin a voice session with that context already loaded — your development areas node for a coaching reflection, your org context node for a business discussion, your priorities node for a weekly planning conversation. No extra setup required.
The Three Skills
/ai-memory-setup — Bootstrap
Run once. The skill:
- Reads your Tana knowledge graph — meeting tags, task structures, recurring people, active themes
- Asks 3 targeted questions based on what it found
- Creates the
#AI_Contextframework in Tana: 5 context nodes + skill nodes for every skill in~/.claude/skills/ - Writes a sync manifest mapping Tana nodes to local files
- Generates Cowork/Claude Desktop folder instructions with your real field IDs filled in
Every skill gets a Tana node with: its current instructions, inferred eval criteria, and a change log initialized at v1.0.
/ai-memory-sync — Stay Current
Run after sessions where things changed:
check— see what's stale and in which directionpull— pull changes made by other LLMs from Tanapush— push local updates to Tana (auto-increments version)enrich— scan recent meetings/tasks, suggest context + skill updatesexport— generate flat markdown for mobile / Claude Projects
/skill-improve — The Improvement Loop
This is the core of the self-improving system.
Auto-triggers after corrections. When a skill runs and produces wrong output, and the user corrects it, Claude Code offers:
"Should I save this as a permanent improvement to [skill-name]? It'll prevent the same issue in future sessions."
On confirmation:
- Reads the current skill from Tana
- Generates a surgical diff (only the broken section)
- Shows before/after for user confirmation
- Updates local SKILL.md + Tana node
- Increments version (v1.2 → v1.3)
- Appends to Change Log with the failure that triggered it
Over time, the Change Log becomes a record of every time the skill got smarter:
Change Log — tana-action-items
v2.1 (2026-03-01) — Fixed attribution: read explicit ownership before
defaulting. Triggered by: wrong assignee in 1:1.
v2.0 (2026-02-27) — Extended soft skills check to 21 development areas.
Triggered by: missed overexplaining pattern in baseline.
v1.3 (2026-02-11) — Extended extraction to full meeting notes.
Triggered by: missed 10 tasks in planning meeting.
v1.0 (2026-02-06) — Initial version.
The Operating Skills
The three skills above keep your memory current and self-improving. These four do the work against your Tana graph — explore it, see its structure, turn meetings into action, and coach you live. Each is written as a worked example against a single fictional demo workspace, so you can read it end-to-end before wiring it to your own Tana (swap the demo… IDs for yours).
/tana-understand — Explore any Tana system
Maps an unfamiliar Tana workspace — supertags, fields, how nodes link — and proposes where an LLM can help. The on-ramp when you're staring at a blank (or inherited) graph and don't know where to start.
/tana-schema-graph — Visualize your schema
Renders your supertags and their field relationships as an interactive force-directed graph (self-contained HTML). Turns an abstract tag/field structure into a picture you can reason about.
/tana-action-items — Meetings → structured tasks
The workhorse. Takes a meeting summary and produces structured Tana tasks (assignee, context, urgency, parent meeting), plus person observations and decisions — with deduplication and a single approval gate. The "capture everything worth retaining" half of the second-brain loop.
/meeting-brain — Live meeting co-pilot
The unique-to-Tana one. Tana's local API exposes the in-progress transcript as queryable nodes, so this polls it mid-meeting and fires short real-time flags via claude -p — coaching nudges + strategic prompts — from a per-meeting context file. (Most tools only give you the transcript after the meeting; Tana lets you ping it live.) Ships as a runnable Python script (one fetch_transcript_lines() stub) plus coach-popup.swift — a macOS menu-bar overlay that floats the live flags on your screen while you're still in the room.
New here? Start with GETTING-STARTED.md — it walks these four against the demo workspace and shows how they read/write Tana (MCP or a local bridge).
Install
Prerequisites
- Claude Code CLI (
claudecommand) - Tana with local API / MCP server running (see tana.inc/docs/local-api-mcp)
- MCP connected in Claude Code (
/mcpshows "Connected to tana")
Step 1: Install the skills
mkdir -p ~/.claude/skills
# Memory & self-improvement layer
cp -r skills/ai-memory-setup ~/.claude/skills/
cp -r skills/ai-memory-sync ~/.claude/skills/
cp -r skills/skill-improve ~/.claude/skills/
# Operating layer — explore / visualize / process meetings / live co-pilot
cp -r skills/tana-understand ~/.claude/skills/
cp -r skills/tana-schema-graph ~/.claude/skills/
cp -r skills/tana-action-items ~/.claude/skills/
cp -r skills/meeting-brain ~/.claude/skills/
The operating skills are worked examples — see GETTING-STARTED.md for the tour and how to point them at your own Tana.
Step 2: Run setup
claude
> /ai-memory-setup
Takes 3–5 minutes. Reads your workspace, asks 3 questions, creates everything in Tana.
Step 3: Connect any other LLM (optional)
Paste ~/.claude/ai-memory/llm-session-instructions.md into your LLM's folder or project instructions. Works with Claude Desktop, Gemini, Cowork, or any tool with Tana MCP. Every conversation auto-loads your context from Tana.
Step 4: Mobile (optional)
> /ai-memory-sync export
Upload ~/.claude/ai-memory/ai-context-export.md to a Claude Project.
What Works Where
Not everything is automatic on every tool. Here's an honest breakdown:
| Capability | Claude Code CLI | Claude Desktop | Cowork | Gemini CLI | Mobile |
|---|---|---|---|---|---|
| Context loading at session start | ✓ Auto (CLAUDE.md) | ✓ After setup | ✓ After setup | ✓ After setup | ✓ Via export |
| Skill loading on demand | ✓ Auto | ✓ | ✓ | ✓ | ✓ (read-only) |
/skill-improve auto-trigger | ✓ | — | — | — | — |
| Writing changes back to Tana | ✓ Inline | Manual | ✓ Via Modified By | Manual | — |
| Pulling changes from Tana | ✓ /ai-memory-sync | Manual | ✓ Reads fresh each session | Manual | Re-export |
Claude Code is the primary interface — it's where the self-improvement loop lives. The auto-trigger for /skill-improve is a Claude Code behavioral pattern and won't fire automatically in other tools.
Other tools are consumers. They read context and skills from Tana at session start via read_node with hardcoded IDs. This works reliably everywhere. When they update a Tana node (e.g., Cowork editing org context), setting Modified By = other-llm signals Claude Code to pull the change on next sync.
The one-time setup per tool: Paste llm-session-instructions.md into the tool's base description or folder instructions. This tells it which node IDs to load and how to signal changes back. See the next section.
Connecting Other Tools (Cowork, Claude Desktop, Gemini)
After running /ai-memory-setup, a personalized instruction block is generated at ~/.claude/ai-memory/llm-session-instructions.md with your real node IDs filled in.
Claude Desktop / Cowork
- Open the tool's folder or project settings
- Paste the contents of
llm-session-instructions.mdas the base/folder instructions - That's it — every new conversation in that folder will load your Tana context at session start
For Cowork specifically: Cowork has native skill support. You can register individual skills in Cowork directly (pointing to the same Tana node IDs), which gives Cowork better auto-triggering for specific tasks. Without this, skills still work — Cowork just loads them on demand when you ask for a specific task.
What the instruction block does
- Loads tier-1 context nodes at session start via
read_node(behavioral rules at depth 3, reference nodes at depth 1) - Loads skill nodes on demand when the task matches — always reads fresh from Tana, never a cached version
- Tells the LLM to set
Modified By = other-llmwhen it updates a node, so Claude Code can detect and pull the change
What it doesn't do
- Auto-trigger
/skill-improve— this requires the LLM to recognize correction patterns mid-conversation, which is a Claude Code behavioral rule. On other tools, run/skill-improve [skill-name]explicitly after a correction. - Push local file changes — only Claude Code has
/ai-memory-sync. On other tools, edits happen directly in Tana.
The #AI_Context Schema
One supertag, two types of nodes:
| Field | Type | Purpose |
|---|---|---|
| Context Type | Options | behavioral, schema, memory, reference, skill |
| Priority Tier | Options | tier-1-critical, tier-2-important, tier-3-reference |
| Version | Plain text | v1.3 — increments on every improvement |
| Last Synced | Date | When this node was last updated |
| Modified By | Options | claude-code, other-llm, manual |
| Local File Path | URL | Path to local file (for CLI sync) |
Context nodes (tier-1): loaded every session. Who you are, your priorities, your relationships, your workspace schema, your rules.
Skill nodes (tier-2): loaded on demand. Full instructions + eval criteria + change log. Any LLM reading the node gets the latest version of the skill.
Files
skills/
ai-memory-setup/SKILL.md — Bootstrap skill
ai-memory-sync/SKILL.md — Sync skill
skill-improve/SKILL.md — Improvement capture skill
screenshots/
AI_Context Supertag in Tana Overview.png — Live #AI_Context table in Tana
AI_Context in Tana Expanded Skill View.png — Skill node with real change log
README.md — This file
SETUP.md — Detailed walkthrough
llm-session-instructions.md — Template for any LLM with Tana MCP (Claude Desktop, Gemini, etc.)