{"slug":"disk-cleanup-analyzer","title":"disk-cleanup-analyzer","summary":"macOS 개발자 컴퓨터에서 용량을 차지하는 폴더·파일을 찾아 정리 계획을 만든다. AI 코딩 세션의 작업 폴더는 스크립트로 판정해 열린 세션의 파일을 지우지 않게 한다. \"디스크 정리\", \"용량이 부족해\", \"맥북이 꽉 찼어\", \"뭐가 용량을 먹지\", \"free up disk space\", \"what's eating my disk\"에 쓴다. 삭제는 항목별 승인 뒤에만 한다.","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-11-30T18:07:57.613918Z","repo":{"url":"https://github.com/jha0313/skills_repo","stars":156,"forks":78,"license":"MIT","updatedAt":"2026-11-30T03:10:49Z"},"bodyHtml":"<h1>disk-cleanup-analyzer</h1>\n<p>맥에서 용량을 차지하는 것을 찾아 정리 계획을 만든다. <strong>AI 코딩 세션의 작업 폴더를 실수로 지우지 않게 판정하는 것</strong>이 이 스킬의 값이다.</p>\n<blockquote>\n<p>macOS 전용. 스크립트는 읽기만 한다. 삭제는 에이전트가 항목마다 묻고, 승인한 것만 한다. 이 규칙은 지침이다. 에이전트의 다른 명령까지 막아 주지는 않으니 실행 권한은 직접 확인한다.</p>\n</blockquote>\n<h2>왜 필요한가</h2>\n<p>여러 AI 세션을 열어 두면 <code>/private/tmp/claude-&lt;uid&gt;/</code> 아래에 작업 폴더가 쌓인다. 이름에 tmp가 있어 쓰레기처럼 보이지만 하나뿐인 원본이 들어 있을 수 있다. 며칠 쉬는 세션은 파일을 잡고 있지 않아 <code>lsof</code>로도 찾기 어렵다. 이 스킬은 실행 중인 프로세스의 작업 디렉터리, 대화 기록과 파일의 마지막 수정 시각, 원본처럼 보이는 파일을 함께 본다. 하나라도 확인하지 못하면 지킨다(KEEP).</p>\n<table>\n<thead>\n<tr>\n<th>판정</th>\n<th>뜻</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>KEEP</td>\n<td>열려 있거나 최근에 썼거나 확인하지 못했다. 제안하지 않는다</td>\n</tr>\n<tr>\n<td>REVIEW</td>\n<td>오래 쉬었지만 원본일 수 있는 파일이 있다(캐시 폴더 안 포함). 옮길지 묻는다</td>\n</tr>\n<tr>\n<td>ASK</td>\n<td>오래 쉬었고 바이트코드·<code>.DS_Store</code>·빈 파일뿐이다. \"지워도 됨\"이 아니라 \"물어볼 수 있음\"이다</td>\n</tr>\n</tbody>\n</table>\n<h2>설치</h2>\n<pre><code>npx skills add jha0313/skills_repo --skill disk-cleanup-analyzer\n</code></pre>\n<p>Python 3.9 이상(macOS 개발 도구에 든 <code>python3</code>로 된다). herdr(에이전트용 터미널 멀티플렉서)를 쓰면 열린 패널도 본다. 없어도 된다.</p>\n<h2>예시 대화</h2>\n<pre><code>나: 맥북이 꽉 찼어. 뭐부터 정리하지?\n에이전트: 여유 11.8 GB. 1 GB 넘는 것 9개를 나눴습니다. 아직 아무것도 지우지 않았습니다.\n  ① 다시 만들어지는 캐시: ~/.cache/uv 6.1 GB, 마지막 수정 어제, 다음 설치 때 다시 받음\n  ② 검토: 시뮬레이터 14.0 GB (안의 앱 데이터가 사라짐)\n  세션 폴더: KEEP 5 · REVIEW 2(scratchpad/site/index.html, tasks/b1.output) · ASK 0\n  항목마다 물을게요. uv 캐시를 지울까요? (symlink 방식으로 설치했다면 이미 설치된 패키지가 깨집니다)\n나: symlink는 안 써. 응, 그것만.\n에이전트: 다시 쟀고 값이 같습니다. uv cache clean → 여유 11.8 → 17.6 GB\n</code></pre>\n<p>(숫자는 지어낸 예다.)</p>\n<p>스크립트만 써도 된다.</p>\n<pre><code># 이 스킬 폴더에서 실행한다\npython3 -I scripts/scan.py            # 홈과 /Library의 큰 폴더·파일\npython3 -I scripts/session_dirs.py    # 세션 폴더 판정\npython3 -I scripts/scan.py --record &lt;경로&gt; &gt; 기록.json   # 승인받을 때의 경로·크기·하위 목록\npython3 -I scripts/scan.py --check 기록.json             # 지우기 직전 대조 (0 같음, 1 달라짐, 2 확인 못 함)\npython3 tests/run_tests.py            # 임시 폴더와 가짜 ps·lsof·herdr로 검사\n</code></pre>\n<h2>못 하는 것</h2>\n<ul>\n<li>Claude Code 말고 다른 에이전트(Codex, Cursor 등)의 작업 폴더는 판정하지 못한다. 그래서 후보에 넣지 않는다.</li>\n<li>판정은 Claude Code의 폴더 이름 규칙과 <code>ps</code>·<code>lsof</code> 출력에 기댄다. 규칙이 바뀌면 대개 \"대화 기록 없음\"으로 KEEP이 되지만, 모든 경우에 맞다고 보장하지 않는다.</li>\n<li>다른 폴더에서 도는 백그라운드 세션은 최근 활동(기본 7일)으로만 걸린다.</li>\n<li>대화 기록이 이미 지워진 오래된 폴더는 KEEP으로 남는다. 세션이 열린 프로젝트의 옛 세션 폴더도 KEEP이다. 놓치는 것보다 남기는 쪽을 골랐다.</li>\n<li>누가 만든 파일인지 이름으로는 모른다. 바이트코드·<code>.DS_Store</code>·빈 파일만 빼고, <code>.log</code>·<code>tasks/*.output</code>이나 <code>node_modules</code>·<code>.cache</code> 안의 파일도 원본일 수 있다고 본다. 그래서 대부분의 세션은 REVIEW이고 ASK는 드물다.</li>\n<li><code>--check</code>는 하위 항목의 경로·종류·크기·수정 시각을 대조한다. 이것을 다 그대로 두고 내용만 바꾼 것, 대조한 뒤 지우기 전에 바뀐 것은 못 잡는다.</li>\n<li>표의 크기와 실제 회수량은 다를 수 있다(APFS 복제·스냅샷, 하드 링크).</li>\n<li>예약 실행 스크립트는 없다. 비대화형으로 돌리면 에이전트의 권한 설정에 따라 스캔 명령이 막힐 수 있다. 돌리더라도 보고서까지만 쓴다.</li>\n<li>세션 제목을 찾으려고 대화 기록을 읽는다. 본문은 출력하지 않지만 제목이 보고서에 남는다.</li>\n</ul>\n","files":[{"path":"README.md","sizeBytes":4519,"isText":true},{"path":"references/classify.md","sizeBytes":5538,"isText":true},{"path":"scripts/scan.py","sizeBytes":8889,"isText":true},{"path":"scripts/session_dirs.py","sizeBytes":9790,"isText":true},{"path":"SKILL.md","sizeBytes":7461,"isText":true},{"path":"tests/run_tests.py","sizeBytes":32174,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-11-30T18:08:16.564065Z","sha256":"ECD092B1958C83B2C656EBD9DEB5066BAB22C6E6306B96C08614B000E63EB36C","sizeBytes":26145},"review":null,"source":{"repositoryUrl":"https://github.com/jha0313/skills_repo","path":"disk-cleanup-analyzer","license":"MIT","commit":"1ca1b0dc8405d5e0b458c72ad91582b143cd67fc","subtreeSha":"1277C4A8DD479220FF67E221152BB6CC67FB5C4E69372A31713C4E0BC8F06DF2","lastSyncedAt":"2026-11-30T18:07:56.008091Z"},"reviewedAt":"2026-11-30T18:08:34.923416Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/jha0313/skills_repo/tree/main/disk-cleanup-analyzer"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install jha0313-skills-repo@llmmart"},{"target":"git","command":"git clone https://github.com/jha0313/skills_repo.git"}]}