본문으로 건너뛰기
cccskills
무료GitHub에 공개

lean-ctx

Uses LeanCTX to select code relevant to a task, focus searches, and compress command output before the agent receives it. It also supports retrieving exact source content, saving local project knowledge, and inspecting recorded operations.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Use LeanCTX Context Gateway tools to select task-relevant code context, apply supported controls, reuse local knowledge and inspect recorded evidence. Use when lean-ctx MCP tools (ctx_*) are available or file, search or command output needs a focused view.

설치 방법 보기

이럴 때 유용합니다

  • Finding relevant code in an unfamiliar project
  • Focusing large search results and command output
  • Retrieving exact source content when needed
  • Keeping findings and decisions across sessions

포함된 파일(2)

  • SKILL.md4.2 KB
  • scripts/install.sh2.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

LeanCTX — Context Gateway for AI Systems

Control what your AI can see. LeanCTX Engine provides local context selection, supported access and content controls, and evidence of observed context operations for existing agents: Select → Control → Learn → Prove. Learn means local task and knowledge continuity, not model training. Recovery depends on source or archive availability and access permissions. LeanCTX SDK is the separate integration surface for applications.

lean-ctx shapes context before it reaches you: cached reads, compressed shell output, focused search, recovery to exact source. Two rules beat every detail:

  1. Fewer round trips beat smaller outputs. One call that answers the question is cheaper than three small ones. Never add a call just to save a few hundred tokens.
  2. Never wait by polling. Do not loop sleep + status checks (see below).

Intent → tool

You want to…Call
Understand how something works (unknown location)ctx_compose(task) — ranked files + source in one call; use it FIRST instead of search→read→read
Find the exact definition of a symbolctx_search(action="symbol", name=…)
Find code by meaningctx_search(action="semantic", query=…)
Find a text/regex patternctx_search(pattern=…, path=…)
Who calls X / what calls X makes`ctx_callgraph(action="callers"
Read a file you will editctx_read(path, mode="anchored") → edit with the host's native edit tool, or ctx_call(name="ctx_patch", arguments={…})
Read a file only for context`ctx_read(path, mode="signatures"
Re-check a file after editingctx_read(path, mode="diff")
Run a command (build, test, git, …)ctx_shell(command) — output is compressed
List files / directory shapectx_glob(pattern) / ctx_tree(path, depth)
Remember across sessions`ctx_session(action="finding"

Do not read or search through ctx_shell (cat, sed -n, grep, rg): that bypasses the read cache and symbol index. Use ctx_read / ctx_search.

Deferred tools (ToolSearch)

If the host lists lean-ctx tools by name only (Claude Code's ToolSearch), load what the task needs in one call, e.g. select:mcp__lean-ctx__ctx_compose,mcp__lean-ctx__ctx_search,mcp__lean-ctx__ctx_read. Do not fall back to ctx_shell for everything because it happens to be loaded. A tool named here that your tool list lacks (the default profile shows a small core) is still callable: ctx_call(name="ctx_knowledge", arguments={…}). ctx_call(name="ctx_discover_tools", arguments={"query": "…"}) lists all of them.

Long-running commands

  • Prefer the host's own background execution that notifies on completion (Claude Code: Bash with run_in_background, or Monitor). Start it, then continue other work or end the turn — you will be told when it finishes.
  • ctx_shell(run_in_background=true) jobs do not notify by themselves. Check a job at most once when you actually need its result; never sleep in a loop.

Truncated output

Compressed or archived output ends with a recovery handle. Fetch only the slice you need: ctx_expand(id, search=… | head=N | json_path=…), or ctx_read(path, raw=true) for exact bytes. Do not re-run the command.

Without MCP (CLI)

lean-ctx read <file> -m signatures    # or map | diff | lines:N-M
lean-ctx grep <pattern> [path]
lean-ctx -c "<command>"               # only where the shell is not already wrapped
lean-ctx raw "<command>"              # exact, uncompressed output

Setup

which lean-ctx || curl -fsSL https://raw.githubusercontent.com/yvgude/lean-ctx/main/skills/lean-ctx/scripts/install.sh | bash
lean-ctx setup        # editor wiring, hooks, rules, this skill
lean-ctx doctor       # verify

Docs: https://leanctx.com/docs

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Reviews lean-ctx tool calls in Claude Code session logs, separates tool defects from input mistakes, and checks existing reports. Reproducible problems are documented as GitHub issues with exact steps, expected behavior, and environment details.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Investigating failed lean-ctx tool calls
  • Reviewing why a session switched to native tools
  • Checking misleading or contradictory error messages
yvgude/lean-ctx3.9천2026년 10월 20일 업데이트

yvgude의 스킬 모두 보기

이 스킬의 문제 신고