QuotaCheap Playbook
Claude Code permissions: allow, ask, deny và permission modes an toàn cho repo thật
Tìm hiểu claude code permissions: allow, ask, deny và permission modes an toàn cho repo thật theo Claude Code docs: permissions, hooks, MCP, CLI, guardrail…
Permissions docs nói Claude Code kiểm soát tool access bằng permission rules và modes. Read-only tools không cần approval; Bash commands và file modification cần approval theo điều kiện. Rules có Allow, Ask, Deny và được evaluate theo thứ tự deny, ask, allow.
Bài Claude Code Playbook: Permissions docs nói Claude Code kiểm soát tool access bằng permission rules và modes. Read-only tools không cần approval; Bash commands và file modification cần approval theo điều kiện. Rules có Allow, Ask, Deny và được evaluate theo thứ tự deny, ask, allow. Bài viết bám Claude Code documentation, tập trung control thật, review, guardrails và workflow developer.
Claude Code permissions: allow, ask, deny và permission modes an toàn cho repo thật Permissions docs nói Claude Code kiểm soát tool access bằng permission rules và modes.
Read only tools không cần approval; Bash commands và file modification cần approval theo điều kiện.
Rules có Allow, Ask, Deny và được evaluate theo thứ tự deny, ask, allow.
Điều docs xác nhận Permissions docs nói Claude Code kiểm soát tool access bằng permission rules và modes.
Read only tools không cần approval; Bash commands và file modification cần approval theo điều kiện.
Rules có Allow, Ask, Deny và được evaluate theo thứ tự deny, ask, allow.
Bài này không cố biến Claude Code thành một khái niệm chung chung.
Documentation có tên file, lệnh, setting và warning cụ thể; vì vậy playbook phải bám vào đúng cơ chế được mô tả.
Nếu một control là instruction, gọi nó là instruction.
Nếu một control được enforced bởi Claude Code, gọi nó là permission hoặc hook.
Trộn hai lớp này là cách nhanh nhất để tạo cảm giác an toàn giả.
Cách dùng trong repo thật Một repo production cần tách ba lớp: context, quyền và kiểm chứng.
Context nằm ở prompt, CLAUDE.md, rules, command output và file mà Claude đọc.
Quyền nằm ở permissions, settings, mode, hooks hoặc policy.
Kiểm chứng nằm ở test, build, lint, typecheck, review diff và audit log.
Nếu một task thiếu một trong ba lớp này, đừng để agent chạy quá xa.
Với task đơn giản như docs, copy hoặc test nhỏ, bạn có thể cho Claude Code chạy nhanh hơn.
Với task sửa auth, billing, permissions, migration hoặc deploy, hãy yêu cầu plan trước, giới hạn tool, và review thủ công.
Đây không phải vì không tin agent; đây là vì agent không sở hữu risk của production.
Prompt mẫu Prompt này đặc biệt hữu ích khi làm việc với permissions, hooks, MCP hoặc CLI flags.
Nó buộc agent phân biệt giữa “muốn nó làm” và “hệ thống thật sự chặn/cho phép”.
Runbook triển khai Bước một: viết policy ngắn cho team.
Tool nào được đọc tự do?
Command nào cần approval?