본문으로 건너뛰기
cccskills
무료GitHub에 공개

coding-agent-guardrails

Guardrails for repos where coding agents (Claude Code and others) write code: permissions, managed settings, sandbox, hooks, branch rules, CODEOWNERS, agent tokens and secret scanning. Set up or audit.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane스타 3(GitHub 3 + cccskills 0)
연동 도구GitHub

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Coding Agent Guardrails

An agent that writes code can also edit CI, read secrets and push. These guardrails keep a mistake or a prompt injection inside the repo's normal review path. Every mechanism below is one Claude Code or GitHub really reads; there is no .agent-permissions.yaml.

Phase 1: Scope

ModeDoes
setupProposes the configuration for the missing layers and writes it after approval
auditChecks each layer and gives a verdict. Writes nothing
No argaudit

solo is one developer; team adds managed settings and repo rules for several people. Without it, ask. Read .claude/settings.json, .claude/settings.local.json, .github/, CODEOWNERS and the branch rules (gh api repos/{owner}/{repo}/rulesets, gh api repos/{owner}/{repo}/branches/{branch}/protection).

Phase 2: Layers

Each layer stops what the one before cannot.

LayerWhat it stopsMechanism
1. Permission rulesReading secrets, running tools without asking.claude/settings.json → permissions.deny: Read(./.env), Read(./.env.*), Read(./secrets/**). A Read deny also blocks Edit and Write of that path and the file commands Claude Code recognizes in Bash (cat, head, tee, redirections), but not a script that opens the file itself
2. HooksDestructive or irreversible commands, edits to CI and infraA PreToolUse hook on Bash|PowerShell and on the file tools (Arcane ships guard.sh). Answers deny or ask with a reason
3. SandboxAny process reading or writing outside the project, network exfiltrationsandbox.enabled: true or /sandbox; sandbox.filesystem.denyRead, sandbox.network.allowedDomains (starts empty). Covers shell commands only, not the file tools, MCP servers or hooks. Set sandbox.failIfUnavailable: true, or it silently runs unsandboxed. Native Windows has no sandbox: run Claude Code inside WSL2 to get one
4. Managed settings (team)A developer or a project file loosening layers 1–3managed-settings.json (macOS /Library/Application Support/ClaudeCode/, Linux /etc/claude-code/, Windows C:\Program Files\ClaudeCode\), MDM, or the claude.ai admin console. Keys: permissions.disableBypassPermissionsMode: "disable", allowManagedPermissionRulesOnly, allowManagedHooksOnly, allowManagedMcpServersOnly with allowedMcpServers. Check with /status → Setting sources
5. MCP serversA third-party server running code or reading dataApprove by name (enabledMcpjsonServers), never enableAllProjectMcpServers: true; deniedMcpServers for known bad ones
6. Repo rulesAn agent's branch reaching main unreviewedRuleset on the default branch: pull request required, 1+ approval from someone other than the author, required status checks, no force push, no deletion. The agent's identity cannot bypass it
7. CODEOWNERSSensitive paths changing without the right reviewer.github/workflows/, infra/, terraform/, migrations/, dependency manifests and .claude/ owned by a person, with "Require review from Code Owners" on
8. Agent credentialsA leaked token doing more than the task needsA fine-grained token or GitHub App limited to this repo, contents and pull_requests write only, no admin, short expiry. Never the developer's personal token with org-wide scope
9. Secret scanningA secret reaching the remoteGitHub secret scanning with push protection on; locally gitleaks git --pre-commit --staged (8.19+; older versions: gitleaks protect --staged) in a pre-commit hook

Phase 3: Check each layer (audit)

For each layer record present, partial or missing, with the file or command that shows it. Missing evidence counts as missing.

  • Layer 1: deny rules cover every .env* and secret folder that exists in the repo.
  • Layer 2: the hook matcher includes PowerShell on Windows machines, not only Bash.
  • Layer 3: on Windows without WSL2, mark it missing and say the other layers carry the load.
  • Layer 6: gh api shows the ruleset; a classic branch protection counts too.
  • Layer 7: every path in the table above has an owner.

Phase 4: Verdict and report

VerdictWhen
PASSLayers 1, 2, 6, 7 and 9 present; in team, also 4 and 8
CONCERNSAny of those partial, or layers 3 or 5 missing
FAILNo deny rule for secrets, no review required on the default branch, or the agent uses an admin or org-wide token

Report: verdict, one row per layer (status, evidence, fix), then the fixes in order of risk.

Phase 5: Setup

Show the exact change per layer (the JSON keys, the ruleset body, the CODEOWNERS lines) and ask "May I write these?" before writing. Repo rules and secret scanning are changed on GitHub: give the gh api command and let the user run it, since it changes the remote.

Protocol

  • Never loosen an existing rule to make the setup simpler.
  • Hooks and permission rules are guards against mistakes, not a sandbox: say so when layer 3 is missing.
  • Rules inside CLAUDE.md are guidance the model can ignore; never count them as a guardrail.

Next steps

  • /supply-chain-security for dependencies and CI workflows.
  • /secret-management to move secrets out of .env files.
  • /ai-security when the product itself is an LLM app.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

SebastianLuser의 스킬 모두 보기

이 스킬의 문제 신고