Ship a focused code-review context to your LLM
何时使用: You're about to ask 'review my auth module' and don't want the whole repo in context.
前置条件
- llm-context.py installed — uv tool install 'llm-context>=0.6.0'
- Initialized in your repo —
lc-initin your repo root
步骤
-
Create a filter rule for authCreate an lc filter rule 'flt-auth' that includes src/auth/** and src/middleware/auth*.ts.✓ 已复制→ Rule file created under .lc/
-
Preview what the rule selectsRun lc_preview on flt-auth — show me which files will be sent and total token count.✓ 已复制→ File list + token count
-
Share context with the LLM via MCPUsing the flt-auth rule, review the module for security issues. If you need to see a specific file not included, ask via lc_missing.✓ 已复制→ Review with targeted file requests
结果: A code review that fits in context and can still explore — no manual paste.
注意事项
- Rule too narrow → LLM can't understand callers of your module — Include interface / types of neighboring modules, use outlines for the rest
- Rule too broad → token budget blown — Start broad, watch lc_preview, tighten until under your client's limits