에이전트 운영Agent operations

claude-code-memory-lint

Claude Code 메모리 폴더를 점검하는 린터입니다. 고아 파일, 없는 파일, 로드 때 조용히 잘리는 인덱스 줄을 찾습니다.

GitHub에서 보기View on GitHub

어떤 문제를 푸나The problem

MEMORY.md 인덱스가 로드 한도를 넘으면 매 세션 뒤쪽 줄이 말없이 잘립니다. 잘리는 줄은 보통 가장 최근에 추가한 메모리입니다. 원인은 보통 인덱스 줄이 포인터가 아니라 내용을 담고 있는 것입니다.

이 린터는 글자 수 기준(로더가 글자로 세기 때문)으로 한도를 넘는지 확인하고, 정확히 몇 번째 줄부터 잘리는지 알려 줍니다. 아무것도 고치지 않고 읽기만 합니다.

이런 분께 맞습니다Who it is for

Claude Code의 자동 메모리를 오래 써서 MEMORY.md가 길어진 사람, 메모리가 어느 순간부터 안 먹히는 것 같은 사람.

무엇을 하나What it does

  • 인덱스가 가리키는데 파일이 없는 항목과, 인덱스에 없는 고아 메모리 파일을 찾습니다.
  • 프런트매터가 없는 파일과 이름이 중복된 메모리를 찾습니다.
  • 해석되지 않는 [[링크]]를 목록으로 보여 줍니다.
  • 한도를 넘으면 잘리는 줄의 범위를 알려 주고, 내용이 들어 있어 너무 긴 인덱스 줄을 지적합니다.
  • 종료 코드 0은 깨끗함, 1은 발견 있음, 2는 MEMORY.md가 없음입니다.

직접 돌려 본 출력Real output

저장소의 examples 폴더를 실행한 결과입니다.

$ bash examples/demo.sh
# Lint a memory folder with a missing file, an orphan and a dangling [[link]]
$ python3 scripts/memory_lint.py examples/memory
index points to missing file: missing_note.md
orphan memory file (not in index, never recalled): orphan_fact.md
deploy_rules.md: link [[nowhere]] does not resolve (fine as a 'write this later' marker, but list them)
[exit 1]

# Your real folder is usually ~/.claude/projects/<project>/memory

알아둘 한계Limits

  • 기본 한도 24000자는 보수적인 추정이며 실제 한도는 사용하는 Claude Code 버전에 따라 다릅니다. --index-limit로 맞춥니다.

받아서 쓰기Get it

# 저장소를 받습니다
git clone https://github.com/Kein-chronicle/claude-code-memory-lint.git

# Claude Code 스킬로 쓰려면 이 폴더 이름으로 받습니다
git clone https://github.com/Kein-chronicle/claude-code-memory-lint.git ~/.claude/skills/memory-hygiene

정보Info

분류Category
에이전트 운영Agent operations
형태Type
명령줄 도구Command-line tool
라이선스License
MIT
필요한 것Requires
Python 3.10 이상
저장소Repository
claude-code-memory-lint
토픽Topics
claude-code claude-skills agent-skills claude-memory linter ai-agents context-window

2026-10-18 기준: 저장소의 테스트를 로컬에서 실행해 통과했고, 예제 출력은 저장소의 examples 폴더를 실제로 실행한 결과입니다.

공유하기Share

문자Message 네이버 블로그Naver Blog X Facebook