ctx-purge
하는 일
이 스킬은 context-mode가 프로젝트를 위해 저장한 검색 인덱스와 세션 데이터를 지웁니다. 오래된 인덱스 내용을 지우거나 새로 시작하고 싶은 사람을 위한 스킬입니다.
사용하는 경우
- ✓과거 세션 하나에서 인덱싱된 내용을 제거하고 싶을 때.
- ✓프로젝트의 검색 인덱스가 어수선해서 모두 지워야 할 때.
- ✓프로젝트를 다시 인덱싱하기 전에 깨끗하게 시작하고 싶을 때.
스킬 링크
https://github.com/mksglu/context-mode/blob/main/skills/ctx-purge/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 프로젝트의 context-mode 인덱스를 지워서 새로 시작할 수 있게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 먼저 한 세션을 지울지 프로젝트 전체를 지울지 묻고, 무엇이 삭제되는지 경고합니다. 범위를 확인한 후에만 정리를 실행합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Context Mode Purge
Permanently deletes session data for this project. Two scopes are supported (issue #520):
- Project scope (
scope: "project"): wipes EVERYTHING — knowledge base, all session DB rows for every session, events markdown, and stats. - Session scope (
sessionId: "<id>"orscope: "session"): wipes ONLY the matching session's rows + FTS5 chunks. Sibling sessions, project stats, and the FTS5 store file are preserved.
Instructions
- Decide the scope first with the user:
- "Wipe just one session?" → ask for the
sessionId. - "Wipe the whole project?" → confirm scope:'project' (this is the destructive, irreversible default).
- "Wipe just one session?" → ask for the
- Warn the user about scope:'project'. Everything will be deleted:
- FTS5 knowledge base (all indexed content from
ctx_index,ctx_fetch_and_index,ctx_batch_execute) - Session events DB (analytics, metadata, resume snapshots) for ALL sessions in the project
- Session events markdown file
- In-memory session stats + persisted stats file
- FTS5 knowledge base (all indexed content from
- Call the
mcp__context-mode__ctx_purgeMCP tool with the chosen parameters:- Scoped:
{ confirm: true, sessionId: "<id>" }— implies scope:'session'. - Project:
{ confirm: true, scope: "project" }— explicit destructive form. - Bare
{ confirm: true }still works but emits a deprecation warning. Prefer the explicit forms.
- Scoped:
- Report the result to the user — the response lists exactly what was deleted and (for scoped purges) confirms that other sessions and project stats were preserved.
Schema rules
confirm: trueis always required.sessionIdandscope: "project"together is REJECTED as ambiguous (the sessionId implies session scope; combining with project scope contradicts intent).scope: "session"withoutsessionIdthrows — sessionId is required.
When to Use
- Scoped (per-session): scratch acceptance scenarios, drill replays, isolating a polluted session without losing the main working session's stats.
- Project: KB contains stale or incorrect content polluting search results, switching between unrelated projects in the same session, completely fresh start.
Important
ctx_purgeis the only way to delete session data. No other mechanism exists.ctx_statsis read-only — shows statistics only./clearand/compactdo NOT affect any context-mode data.- There is no undo. Re-index content if you need it again.
자주 묻는 질문
정리를 되돌릴 수 있나요?
아닙니다. 정리는 데이터를 영구적으로 삭제하므로 복구할 수 없습니다.
프로젝트 범위와 세션 범위는 무엇이 다른가요?
프로젝트 범위는 모든 것을 지우고, 세션 범위는 그 세션의 행만 지우고 나머지는 유지합니다.
사용 통계도 초기화되나요?
프로젝트 정리는 통계도 지우지만, 세션 정리는 프로젝트 통계를 유지합니다.
상세 정보
작성자의 원본 설명
Purge the context-mode knowledge base. Permanently deletes all indexed content and resets session stats. This is destructive and cannot be undone. Trigger: /context-mode:ctx-purge
repo: mksglu/context-mode
인기도
- GitHub 스타
- 33k
- 순위
- #8514
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
context-mode
33k에이전트가 context-mode 도구로 데이터가 많은 읽기, 검색, 실행 작업을 처리하도록 가르칩니다. 큰 출력이 메인 대화에 들어가지 않게 합니다.
context-mode
33k에이전트가 데이터가 많은 작업을 샌드박스에서 실행하고 답만 출력하도록 가르칩니다. 원시 파일과 웹 페이지가 대화를 채우지 않게 합니다.
context-mode
33k에이전트가 로그, JSON, 빌드 결과처럼 출력이 클 수 있는 경우 일반 셸 명령 대신 context-mode 도구를 쓰도록 가르칩니다.
ctx-doctor
33k런타임, 훅, 검색 저장소, 플러그인 설정, 버전을 점검하는 context-mode 진단을 실행하고 명확한 통과 또는 실패 보고서를 보여 줍니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.