.agents/skills/context/SKILL.md
# Context+ MCP - Agent Instructions ## Purpose You are equipped with the Context+ MCP server. It gives you structural awareness of the entire codebase without reading every file. Follow this workflow strictly to conserve context and maximize accuracy. ## Architecture The MCP server is built with TypeScript and communicates over stdio using the Model Context Protocol SDK. It has three layers: **Core Layer** (`src/core/`): - `parser.ts` — Multi-language symbol extraction via tree-sitter AST
npx skillsauth add nperez0111/bookhive .agents/skills/contextInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are equipped with the Context+ MCP server. It gives you structural awareness of the entire codebase without reading every file. Follow this workflow strictly to conserve context and maximize accuracy.
The MCP server is built with TypeScript and communicates over stdio using the Model Context Protocol SDK. It has three layers:
Core Layer (src/core/):
parser.ts — Multi-language symbol extraction via tree-sitter AST with regex fallback. Supports 14+ languages.tree-sitter.ts — WASM grammar loader for 43 file extensions using web-tree-sitter 0.20.8.walker.ts — Gitignore-aware recursive directory traversal with depth and target path control.embeddings.ts — Ollama vector embedding engine with disk cache, cosine similarity search, and API key support.Tools Layer (src/tools/):
context-tree.ts — Token-aware structural tree with Level 0/1/2 pruning.file-skeleton.ts — Function signatures without bodies for quick file understanding.semantic-search.ts — Ollama-powered semantic code search with 60s cache TTL.semantic-navigate.ts — Browse-by-meaning navigator using spectral clustering and Ollama labeling.blast-radius.ts — Symbol usage tracer across the entire codebase.static-analysis.ts — Native linter runner (tsc, eslint, py_compile, cargo check, go vet).propose-commit.ts — Code gatekeeper validating headers, FEATURE tag, no inline comments, nesting, file length.feature-hub.ts — Obsidian-style feature hub navigator with bundled skeleton views.Core Layer (continued):
hub.ts — Wikilink parser for [[path]] links, cross-link tags, hub discovery, orphan detection.Git Layer (src/git/):
shadow.ts — Shadow restore point system for undo without touching git history.Entry Point: src/index.ts registers 10 MCP tools and starts the stdio transport. Accepts an optional CLI argument for the target project root directory (defaults to process.cwd()).
| Variable | Default | Description |
| -------------------- | ------------------ | --------------------------------- |
| OLLAMA_EMBED_MODEL | nomic-embed-text | Embedding model name |
| OLLAMA_API_KEY | (empty) | Cloud auth (auto-detected by SDK) |
| OLLAMA_CHAT_MODEL | llama3.2 | Chat model for cluster labeling |
get_context_tree to map the project structure with file purposes and symbol names.get_context_tree(target_path="src/auth", depth_limit=2).get_feature_hub to find the feature hub for the area you're working in. Read all linked files at once.semantic_code_search to find files by concept if you don't know where something lives.get_file_skeleton on relevant files to see function signatures without loading bodies.get_blast_radius to check dependencies.propose_commit — it validates your work before saving.propose_commit rejects the code, fix the violations and resubmit.run_static_analysis on changed files to catch unused variables and type errors.FEATURE: tag linking the file to its feature hub..md file with [[path/to/new-file]] for any new files.get_feature_hub(show_orphans=true) to ensure no orphaned files.Every file MUST start with exactly 2 comment lines (10 words each) explaining the file:
Regex-based symbol extraction engine for multi-language AST parsing
FEATURE: Core parsing layer for structural code analysis
Line 1: What the file does.
Line 2: FEATURE: <name> — the primary feature it belongs to. Links to hub.
No comments anywhere in the file except the 2-line header. No inline comments, no block comments, no TODO markers.
Strict order within every file:
c = g(f(a)) instead of b = f(a); c = g(b).| Tool | When to Use |
| ---------------------- | ------------------------------------------------------- |
| get_context_tree | Start of every task. Map the territory. |
| semantic_navigate | Browse codebase by meaning, not directory structure. |
| get_file_skeleton | Before reading a full file. See signatures first. |
| semantic_code_search | Find code by concept ("auth logic", "fee calculation"). |
| get_blast_radius | Before deleting or modifying any symbol. |
| run_static_analysis | After writing code. Catch dead code deterministically. |
| propose_commit | The ONLY way to save files. Validates before writing. |
| list_restore_points | See undo history. |
| undo_change | Revert a bad AI change without touching git. |
| get_feature_hub | Browse feature graph hubs. Find orphaned files. |
development
Design engineering principles for making interfaces feel polished. Use when building UI components, reviewing frontend code, implementing animations, hover states, shadows, borders, typography, micro-interactions, enter/exit animations, or any visual detail work. Triggers on UI polish, design details, "make it feel better", "feels off", stagger animations, border radius, optical alignment, font smoothing, tabular numbers, image outlines, box shadows.
development
Logging best practices focused on wide events (canonical log lines) for powerful debugging and analytics
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------