cyberchitta/llm-context.py
Share code with LLMs via Model Context Protocol or clipboard. Rule-based customization enables easy switching between different tasks (like code review and documentation). Includes smart code outlining.
305 ★23 forksPythonUpdated 4d ago
What you need to know
Smart context management for LLM development workflows — selects, validates, and shares relevant project files through composable rules, with CLI commands, a Claude Code skill, and MCP tools (lc_outlines/lc_preview/lc_missing).
Install
uv tool install "llm-context>=0.6.0" lc-init (creates .llm-context/, copies the lc-curate-context skill to .claude/skills/)
Usage
- •Human workflow: lc-init once, then lc-select and lc-context to copy formatted context to clipboard and paste into an LLM chat
- •MCP integration: add to Claude Desktop config — command 'uvx', args ['--from','llm-context','lc-mcp'], then restart Claude Desktop
- •Agent workflow (CLI): lc-outlines to explore, lc-preview <rule> to validate a rule, lc-context <rule> to generate focused context for a sub-agent
- •Agent workflow (MCP): lc_outlines(root_path, rule_name), lc_preview(root_path, rule_name), lc_missing(root_path, param_type, data, timestamp)
Key features
- ✓Composable YAML+Markdown rules in five categories: prompt (prm-), filter (flt-), instruction (ins-), style (sty-), excerpt (exc-)
- ✓Code excerpting that extracts structure while reducing tokens (15+ languages)
- ✓MCP tools lc_outlines / lc_preview / lc_missing for AI agents in chat
- ✓CLI commands: lc-init, lc-select, lc-context (-p, -m, -nt flags), lc-preview, lc-set-rule, lc-outlines, lc-missing
- ✓AI-assisted rule creation via a Claude Code skill or built-in instruction rules; deployment patterns for AI Studio, Grok, Claude Projects, and more
- ✓Project-relative path format enabling multi-project context composition
Best for
Developers and AI agents who want to share focused, task-specific project context with LLMs while keeping token usage low.
Caveats
- ⚠Not a standalone inference server — it curates and copies context; the LLM does the reasoning
- ⚠For MCP use, the AI can only access additional files the server exposes (lc_missing), not the whole repo at once
Platforms: macOS · Linux · WindowsClients: Claude Desktop · Claude Code
Documentation ↗Reviewed 2026-08-07
Topics
- Stars
- 305★
- Forks
- 23
- Language
- Python
- License
- Apache-2.0
- Created
- 2024-04-20
- Last push
- 2026-08-02