ClaudeMods
☰
KO
● — 명 접속 중 · 조회 — 회
후원프로젝트 제출
GitHub 저장소 · 작성자 Sea-University-7237

에이전트의 “oc delete —all”을 읽지 않고 승인해서 Claude Code의 새 함수 훅으로 가드레일(그리고 다른 10개 모드)을 만들었습니다

저자는 에이전트의 `oc delete --all`을 읽지 않고 승인한 후 Kubernetes 네임스페이스를 거의 지울 뻔했고, 이후 새로운 함수 훅 API를 사용해 11개의 Claude Code 플러그인 모음을 구축했습니다. 주요 모드인 guardrails는 대량 kubectl/oc 삭제, rm -rf, 강제 푸시, 시크릿 읽기와 같은 파괴적인 명령을 차단하고 사용자가 차단했음을 Claude에게 알립니다. 다른 모드는 활동 모니터링, 데스크톱 알림, 컨텍스트 추적, 사용 제한, 프롬프트 코칭, 명령 검색 및 모드 관리자를 다룹니다. 11개 중 9개는 모델을 호출하지 않으며, 텔레메트리가 없고 프로젝트는 무료이며 MIT 라이선스입니다.

번역 완료

이 mod 소개

Reddit 사용자 u/Sea-University-7237의 게시물로, 새로운 함수 훅 API로 구축된 11개의 Claude Code 플러그인 모음에 대해 설명합니다. 계기는 저자가 에이전트의 oc delete --all을 읽지 않고 승인해 네임스페이스를 부분적으로 지운 사건이었습니다. 대표 모드인 guardrails는 사용자가 규칙을 토글하여 rm -rf, 대량 kubectl/oc 삭제, 강제 푸시, 파괴적인 git 작업, .env 읽기, 설치 및 네트워크 액세스를 차단할 수 있으며, 사용자가 작업을 차단했음을 Claude에게 알려 우회하지 않도록 합니다. 나머지 모드: activity, notify, context-keeper, usage-meter, prompt-coach, command-hub, toolbox, changes, loop-breaker, 빠른 실행 바 런처, 그리고 이를 설치하고 토글하는 /mods. 9개 모드는 모델을 호출하지 않습니다. prompt-coach와 context-keeper 핸드오프 노트는 Claude Code를 거칩니다. 마켓플레이스 업데이트 확인 외에는 텔레메트리가 없습니다. README에는 관련된 모든 프로세스와 파일이 문서화되어 있습니다. 제한: guardrails는 도구에 전달된 명령을 검사하므로 oc delete --all은 잡지만, 에이전트가 작성하고 나중에 실행하는 스크립트는 잡지 못합니다. claude plugin marketplace add mishgoldenberg/claude-mods 및 claude plugin install mod-manager@claude-mods로 설치한 후 재시작하고 /mods를 실행하세요. Claude Code 2.1.286+가 필요합니다. 저장소: https://github.com/mishgoldenberg/claude-mods

설치

설치 방법은 원본 출처를 확인하세요.

원문 / README

A while ago I asked an agent (Claude Code on a self-hosted model) to "delete everything you added in the last command". It came back with oc delete --all. I hit approve without reading it, and it started wiping the namespace. I caught it about halfway. Rebuilding the rest from Confluence pages took me two days. Claude Code recently added function hooks, which are plugins that run inside it, see every tool call before it executes, and can draw their own panels. So I built the stuff I wish I'd had that day. The one that matters most is guardrails. You click rules on or off: block rm -rf, mass kubectl/oc deletes, force-push, destructive git, reading .env, installs, network, or keep Claude inside the project folder. When it blocks something it tells Claude the user blocked it and not to work around it. The rest: - activity: shows what Claude is running right now, for how long, and when it's waiting for your approval - notify: a desktop notification (Windows/macOS/Linux) when a long task finishes or an approval has been sitting there - context-keeper: what's filling your context window, plus checkpoints saved to disk so /compact and /clear don't lose the thread - usage-meter: 5h/7d limit bars with burn rate and cache hit ratio - prompt-coach: when a prompt is vague (like mine was), it suggests a sharper version and you pick which one to send. It never rewrites anything silently - command-hub: the built-in commands people miss (/rewind, /btw, /context) explained, plus a form to make your own - toolbox, changes, loop-breaker (catches Claude retrying the same failing command), a quickbar launcher, and /mods to install and toggle all of them Nine of the eleven never call a model, so they cost no tokens. The two that do (prompt-coach and the context-keeper handoff note) go through Claude Code itself. There's no telemetry, and the only other network traffic is the marketplace check when you click update in /mods. The README lists every process and file they touch. To be clear about the limits: guardrails is a seatbelt, not a sandbox. It checks the command the agent passes to a tool, so it would have caught my oc delete --all, but it won't catch a script the agent writes and then runs. How Claude helped: I built the whole thing in Claude Code (Opus). I wrote the feature list and the rules I wanted. Claude read the function hooks API types, wrote the mods, ran the plugin validator on each one, and wrote the tests (64 on the guardrail rules, running in CI). My job was testing in the real desktop app and reporting what broke. Funny part: its own guardrails kept blocking its edits during the build, and it fixed the rule instead of working around it. What I learned: - How you deny matters more than what you deny. A plain "blocked" makes the model try a reworded command. "The user blocked this, don't work around it, ask them" makes it stop and explain. - Matching raw command text is noisy. Commit messages that just mentioned rm -rf got blocked. Ignoring quoted text (unless the command runs a shell inline like bash -c or | sh) fixed most of it. - Anything that changes what gets sent to the model has to be visible. A silent prompt rewriter is worse than none. It's free and MIT licensed, no account needed. Install: claude plugin marketplace add mishgoldenberg/claude-mods claude plugin install mod-manager@claude-mods Then restart and type /mods. Needs Claude Code 2.1.286 or newer. Repo: https://github.com/mishgoldenberg/claude-mods What annoys you in Claude Code that a mod could fix? I'm picking the next ones from the comments. submitted by /u/Sea-University-7237 [link] [comments]

배지 받기

내 프로젝트인가요? 이 배지를 README나 웹사이트에 넣으면 이 페이지로 연결됩니다.

Featured on ClaudeMods
크기
테마
Markdown
HTML

비슷한 프로젝트