본문으로 건너뛰기
Skillpedia
에이전트33k · #8514

ctx-purge

하는 일

이 스킬은 context-mode가 프로젝트를 위해 저장한 검색 인덱스와 세션 데이터를 지웁니다. 오래된 인덱스 내용을 지우거나 새로 시작하고 싶은 사람을 위한 스킬입니다.

사용하는 경우

  • ✓과거 세션 하나에서 인덱싱된 내용을 제거하고 싶을 때.
  • ✓프로젝트의 검색 인덱스가 어수선해서 모두 지워야 할 때.
  • ✓프로젝트를 다시 인덱싱하기 전에 깨끗하게 시작하고 싶을 때.

스킬 링크

https://github.com/mksglu/context-mode/blob/main/skills/ctx-purge/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mksglu/context-mode/blob/main/skills/ctx-purge/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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>" or scope: "session"): wipes ONLY the matching session's rows + FTS5 chunks. Sibling sessions, project stats, and the FTS5 store file are preserved.

Instructions

  1. 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).
  2. 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
  3. Call the mcp__context-mode__ctx_purge MCP 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.
  4. 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: true is always required.
  • sessionId and scope: "project" together is REJECTED as ambiguous (the sessionId implies session scope; combining with project scope contradicts intent).
  • scope: "session" without sessionId throws — 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_purge is the only way to delete session data. No other mechanism exists.
  • ctx_stats is read-only — shows statistics only.
  • /clear and /compact do 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬