Skip to content
Back to skills

Bin

ASecurity

맥락 그래프(CtxGraph 앱) — 지금 대화를 노드로 추가하거나 다른 대화와 연결·해제하고, 연결 상태를 확인한다. 사용자가 /ctx 를 입력하거나 "이 대화를 ○○ 대화랑 연결해줘" 류로 요청할 때 사용.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 15, 2026
toolsbashsql

Works with

  • claude code
  • cli

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned November 15, 2026

npx -y skills add groothaha/ctx-graph --skill bin --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bin?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bin
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/groothaha-bin/badge)](https://www.skillsdirectory.com/skills/groothaha-bin)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ctx
description: 맥락 그래프(CtxGraph 앱) — 지금 대화를 노드로 추가하거나 다른 대화와 연결·해제하고, 연결 상태를 확인한다. 사용자가 /ctx 를 입력하거나 "이 대화를 ○○ 대화랑 연결해줘" 류로 요청할 때 사용.
---
{{MARK}}

# ctx — 맥락 그래프

CtxGraph 는 대화(Claude Code 세션)를 노드로, 화살표를 '맥락 흐름'으로 다루는 macOS 앱이다.
**연결은 방향이 있다**: S → T 면 T 에서 메시지를 보낼 때마다 S 의 최신 요약이 훅(UserPromptSubmit)으로 주입된다.
양쪽 화살표(⇄)면 서로 공유.

- 앱: CtxGraph (macOS)
- 백엔드 CLI: `{{CLI}}` — 서버 없음, `~/Library/Application Support/CtxGraph/graph.sqlite` 를 앱과 같이 씀
- 지금 대화의 세션 ID 는 Bash 환경변수 `$CLAUDE_CODE_SESSION_ID` (CLI 에서는 `current` 로 쓰면 됨)

## 명령 매핑

| 사용자 입력 | 실행 |
|---|---|
| `/ctx` 또는 `/ctx status` | `{{CLI}} status current` |
| `/ctx add` | `... add current` |
| `/ctx from <검색어>` (그 대화 맥락을 여기로 받기) | `... link "<검색어>" current` |
| `/ctx to <검색어>` (이 대화 맥락을 거기로 보내기) | `... link current "<검색어>"` |
| `/ctx link <검색어>` (서로 공유) | `... link current "<검색어>" --both` |
| `/ctx unlink <검색어>` (양쪽 다 끊기) | `... unlink current "<검색어>" --both` |
| `/ctx remove` | `... remove current` |
| `/ctx open` | `open -a CtxGraph` |
| `/ctx find <검색어>` | `... scan --json --q "<검색어>" --limit 10` |
| `/ctx scope` (이 대화의 작업 폴더 보기) | `... scope current` |
| `/ctx scope all` (작업 폴더 지정 풀기) | `... scope current --all` |
| `/ctx spaces` (작업 공간 목록) | `... spaces` |

- `<검색어>` 는 세션 ID, ID 앞부분(4자 이상), 또는 제목·첫 메시지 검색어. 후보가 여러 개면 CLI 가 후보 목록(ID 앞 8자 + 제목)을 출력하고 종료한다 → 사용자에게 보여 주고 고르게 한 뒤 ID 앞부분으로 다시 실행.
- 사용자가 방향을 말하지 않고 "○○ 랑 연결해줘"라고 하면: "○○ 내용 참고해서"·"○○ 맥락 가져와" 류면 `from`, "서로/같이"면 `link`(양방향). 애매하면 `from` 으로 하고 결과 줄에 방향(←/→/⇄)이 보이니 그대로 전달.
- `link` 는 두 대화를 노드로 자동 추가하고, 맥락을 보내는 쪽에 요약이 없으면 백그라운드에서 Haiku 로 요약을 만든다(수십 초). 받는 쪽에는 "요약이 준비되면 다음 메시지부터 그 맥락이 들어온다"고 한 줄로 알려 줄 것.
- 결과는 CLI 출력 그대로 한두 줄로 전달. 앱에서도 같은 그래프가 보인다는 점을 필요할 때만 언급.

## 동작 메모

- 앱 터미널 안에서 돌고 있으면(`$CTXGRAPH_TAB` 있음) `ctxgraph notify "메시지"` 로 그 탭에 알림을 띄울 수 있다 (오래 걸리는 작업 끝에 사용자가 알아야 할 때).

- 작업 폴더(정리용): 앱에서 대화마다 파일을 모아 둘 폴더를 정할 수 있다. 지정된 대화는 새 파일을 그 안에 만들고, 밖에 쓰려다 훅에 돌려보내지면 폴더 안에 다시 만들거나 사용자에게 물을 것. 위치 추가·선택은 앱(설정 → 폴더, 인스펙터 '작업 폴더')에서, `places` 로 목록(JSON), `scope current <위치ID…>` 로 지정.

- 작업 공간: 앱에서 그래프+터미널 탭·분할 배치를 공간별로 나눠 쓴다(사이드바 맨 위, ⌘1…9). `add`·`link` 로 새로 추가되는 노드는 앱에서 지금 보고 있는 공간에 들어간다. 다른 공간끼리 연결해도 맥락 주입은 그대로 동작(그래프엔 화살표 대신 ↗ 표시). 공간 옮기기는 앱에서(노드 우클릭 → 작업 공간으로 옮기기).

- 주입: 처음엔 상대의 전체 요약, 이후엔 바뀐 버전만(한 버전 차이면 변경점). 재개·압축 직후에는 다시 전체.
- 요약 갱신: 맥락을 보내는(나가는 화살표가 있는) 대화의 턴이 끝나면(Stop 훅) 예약 → 20초 잠잠 + 2분 쿨다운 뒤 갱신. 보내는 곳이 없는 노드는 요약하지 않음(사용량 절약).
- 로그: `~/Library/Application Support/CtxGraph/ctxgraph.log`

Files in this skill

  • ctx-skill.en.md4.1 KB
  • ctx-skill.md4.2 KB
  • ctxgraph236 B
  • ctxgraph.py93.7 KB
  • ctxpty.py30.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.