RafeSymonds/claude-mods/tree/main/plugins/refs
refs
Claude가 정의한 참조 코드(F1, D2, A3)를 추적하고 코드를 찾아 삽입하는 /refs 패널과 인용 코드 해석용 숨은 컨텍스트를 제공하는 Claude Code mod입니다.
이 mod 소개
refs는 참조 코드(F1, D2, A3 등)를 다시 스크롤해 찾아야 하는 텍스트가 아니라 Claude Code가 추적하는 대상으로 만듭니다. /refs를 열면 Claude가 정의한 모든 코드와 텍스트가 패널에 표시되고, 코드를 누르면 프롬프트에 삽입됩니다. 프롬프트에서 어떤 대소문자로든 코드(a2, A2, a1-a3)를 인용하면 정의가 숨은 컨텍스트로 모델에 전달되며, 정의가 포함된 응답이 압축으로 사라진 뒤에도 해석됩니다. 모든 프롬프트가 사용 중인 코드를 모델에 알려 새 항목도 번호를 이어 갑니다. /refs clear 또는 /clear로 목록을 비웁니다. Claude의 응답에서 코드가 행을 시작하면 정의로 간주합니다(예: - **F1 Name:** text, 1. D2: text, ### A3 또는 표의 행). 발견 사항, 결정, 선택지, 위험, 질문과 작업에 코드를 붙이도록 Claude에 요청하는 CLAUDE.md와 함께 사용할 때 가장 좋습니다. Claude Code 2.1.289 이상이 필요합니다. claude plugin marketplace add RafeSymonds/claude-mods를 실행한 다음 claude plugin install refs@claude-mods로 설치합니다.
설치
먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.
claude plugin marketplace add RafeSymonds/claude-mods claude plugin install refs
원문 / README
claude-mods
Mods for Claude Code. A mod is a plugin of function hooks: TypeScript that runs inside Claude Code, changes how it behaves, and draws UI in the terminal or the desktop app's Code tab.
Requires Claude Code 2.1.289 or newer. The mod API is early access and may change between releases.
Install
claude plugin marketplace add RafeSymonds/claude-mods
claude plugin install refs@claude-mods
claude plugin install latex@claude-mods
Restart Claude Code, or run /reload-plugins in a running session.
Mods
refs
Makes reference codes (F1, D2, A3, ...) something Claude Code tracks instead of text you scroll back for.
/refsopens a pane listing every code Claude has defined, with its text. Press a code to insert it in the prompt.- When your prompt cites codes, in any case (
a2,A2,a1-a3), their definitions go to the model as hidden context. They still resolve after compaction removes the reply that defined them. - Every prompt tells the model which codes are in use, so new items continue the numbering instead of reusing a code.
/refs clearempties the list./cleardoes too.
A code counts as defined when it opens a line in Claude's reply: - **F1 Name:** text, 1. D2: text, ### A3, or a table row | R1 | text |.
refs works best with a CLAUDE.md that asks Claude to label its findings, decisions, options and actions with codes:
When presenting three or more findings, decisions, options, risks, questions,
or actions, assign every one a short code: F1 for findings, D1 for decisions,
O1 for options, R1 for risks, Q1 for questions, A1 for actions.
Preserve the same codes throughout the conversation.
latex
Renders the math in Claude's replies, including your own LaTeX macros.
- Desktop app: it already draws LaTeX, but not macros from your header. latex expands them first (
\newcommand,\DeclareMathOperator,\DeclarePairedDelimiter,\def), so\skcenc_k(m)draws as Enc. - Terminal: math is drawn as Unicode:
k ← Gen,Pr[Encₖ(m) = c],ℳ, 𝒦, 𝒞,{0,1}ⁿ. - Only the display changes. The model and
/copykeep the LaTeX, and code blocks are left as written. - Headers are found on their own:
.styfiles and.texfiles named likeheaderorhdr, up to two folders deep. Setheadersin/configto name them yourself./latexshows which files were read.
Develop
Load a mod from your clone for one session, then check and test it:
claude --plugin-dir ./plugins/refs
claude plugin validate ./plugins/refs
claude plugin test ./plugins/refs
To run your clone as your installed copy, add it as a local marketplace. Edits then take effect on /reload-plugins:
claude plugin marketplace add ./
claude plugin install refs@claude-mods
License
MIT
