gray9199/claude-network-mod
network
세션 내용을 설명하는 haiku 생성 40단어 카드가 비슷한 문제를 작업하는 다른 개발자와 매칭되는 릴레이에 옵트인하는 Claude Code 모드입니다.
이 mod 소개
사용자는 핸들로 옵트인합니다. 몇 턴마다 haiku는 최근 프롬프트와 답변(도구 출력이나 파일 내용은 아님)을 읽고, 세션 내용을 설명하는 40단어 공개 카드와 태그를 작성합니다. 카드는 이름, URL, 경로, 자격 증명에 대해 검사되며 변경 전에 트랜스크립트에 표시됩니다. 릴레이는 카드를 매칭하고 최대 5명과 매칭 이유를 반환하며, 그 이유도 컨텍스트로 주입되어 Claude가 소개문을 작성할 수 있게 합니다. 명령: /network on, /network show, /network off. 함수 후크가 활성화된 Claude Code >= 2.1.270이 필요합니다. 번들 릴레이는 Node에서 의존성 없이 실행되며 선택적 bearer-token 인증과 Voyage AI 임베딩을 지원하고 기본적으로 localhost에서 수신 대기합니다.
설치
먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.
claude plugin marketplace add gray9199/claude-network-mod claude plugin install network@network-mod
원문 / README
network — a Claude Mod
Find the people working on the same problem as you, matched on what your session is about, not which repo it's in.
How it works, in one breath: you opt in with a handle → every few turns, haiku reads your recent prompts and answers (never tool output or file contents) and writes a 40-word public card plus a few tags, with names, products and secrets ruled out → the card is printed in your transcript the moment it changes, so nothing goes out you haven't seen → the relay matches cards and hands back up to five people and why they matched → you do the talking. The model also gets the matches as context, so "draft an intro to the person doing grader calibration" just works.
/network on github:graeme opt in (or set NETWORK_HANDLE)
/network show your card, your matches
/network off stop, and pull your card off the relay
Run it
Needs Claude Code ≥ 2.1.270 with function hooks enabled (CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1; shipping as "Claude Mods" in the coming weeks). Verified on 2.1.271.
node relay/server.mjs # http://127.0.0.1:8788, lexical matching
VOYAGE_API_KEY=... node relay/server.mjs # embedding matching: catches "same problem, different words"
export NETWORK_RELAY=https://your-relay # skip if the relay is on localhost
export NETWORK_TOKEN=... # only if the relay was started with one
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude --plugin-dir /path/to/network
Or install it from this repo's marketplace:
claude plugin marketplace add gray9199/claude-network-mod
claude plugin install network@network-mod
Windows, Git Bash: MSYS rewrites an argument starting with / into a Windows path, so claude -p "/network show" reaches Claude as C:/Program Files/Git/network show. Turn the rewriting off and hand --plugin-dir a Windows-style path:
MSYS_NO_PATHCONV=1 CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude --plugin-dir "$(pwd -W)" -p "/network show"
PowerShell needs neither: claude --plugin-dir $PWD -p "/network show". Inside an interactive session the command is typed at Claude's prompt and no shell touches it.
Layout
.claude-plugin/plugin.json manifest
.claude-plugin/marketplace.json lets `claude plugin marketplace add` install it from this repo
hooks/hooks.json names the module
hooks/register.ts the mod (~250 lines)
relay/server.mjs the relay (~190 lines, zero dependencies)
tests/register.test.ts the demo, as a test that runs in the real engine
types/claude-code.d.ts Anthropic's published contract, for tsc (regenerate with /plugin-types)
Checks
npx tsc -p tsconfig.json # types, against the real contract
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude plugin validate . # Claude Code's own offline scan
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude plugin test . # runs tests/ through the real hooks engine (2.1.271+)
tests/register.test.ts is also the demo: it drives /network on, the card, the matches and the model's context block with the world beneath the mod mocked, prints what each side sees, and asserts that the company name and file path in the transcript never leave the machine.
What is and isn't shared
Shared: your handle, the card, the tags. Nothing else — not the transcript, not file contents, not the repo. The card prompt forbids company, product, customer and person names, URLs, paths and credentials, and the card is shown to you when it changes. After haiku, the mod checks the card once more on your side: one that still looks like it carries a URL, a file path, an email address or a credential is withheld and never sent. That is a strong default, not a guarantee: for work you can't describe in public, don't turn it on, or run a relay only your team can reach.
Security
The relay and everyone on it are strangers, and the mod treats them that way.
- Inbound is data, not instructions. Every match the relay returns is shape-checked, stripped of control and escape characters, and capped (handle 64 chars, card 40 words / 320 chars, 6 tags of 32 chars, 5 matches). The context block hands the cards to the model with a line saying they came from other people over the network and are never instructions to follow. Terminal output gets the same cleaned text, so a card can't smuggle ANSI escapes into your transcript.
- Outbound is bounded and checked twice. The card is written by haiku under a prompt that forbids names, URLs, paths and credentials, then screened by regex for URLs, paths, emails, key-shaped strings and long opaque tokens. Anything that trips the screen is withheld with a line in the transcript.
- The relay listens on localhost unless
HOSTsays otherwise. SetNETWORK_TOKENwhen starting it and every request must carry that bearer token (compared in constant time); the mod reads the same variable. Bodies over 16 KB get a 413, malformed handles and cards a 400, and the table stops at 5 000 cards. A remote relay over plain http earns a warning in the transcript: use https. - What it does not do. A handle is a name people choose, not a verified identity: anyone with the token can post under any handle. Cards are visible to everyone on the relay by design. If you use embeddings, card text goes to Voyage AI.
Known limits (early access)
- Lexical matching only sees vocabulary: a card with a tag in common always matches, but two people describing one problem in different words with no tag in common rank low. Embeddings fix that;
MIN_EMBEDis a starting threshold, tune it. - Hooks fail open. If the relay or the model call fails, the mod logs a line and Claude carries on.
$.http.fetchand$.model.completecan be withheld by an org's admin mod.- The
$surface is still moving between releases; re-run/plugin-typesandtscafter updating.
배지 받기
내 프로젝트인가요? 이 배지를 README나 웹사이트에 넣으면 이 페이지로 연결됩니다.

