claude-code-defaults

Configure Claude Code default behavior through CLAUDE.md, settings.json, permissions, and hooks.

2|Updated Jul 28, 2026
One-click install
npx skills add https://github.com/mbadali25/useful-claude-add-ons --skill claude-code-defaults-mbadali25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-code-defaults
Source: https://github.com/mbadali25/useful-claude-add-ons/tree/main/skills/claude-code-defaults
Command: npx skills add https://github.com/mbadali25/useful-claude-add-ons --skill claude-code-defaults-mbadali25

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Claude Code's default behavior is governed by two different mechanisms — instructions (CLAUDE.md) and enforcement (settings.json, hooks) — spread across four scopes (managed, user, project, local). Misplacing a rule means it gets ignored, overridden, or committed where it doesn't belong. This Skill turns a vague request like "stop asking me for permission" into the right edit, in the right file, at the right scope. ## Core Features & Use Cases - Request routing and scoping: Maps each request to the correct mechanism (instruction vs. enforcement) and scope (user, project, local, or managed/MDM fleet rollout). - Permission rule authoring: Writes allow/ask/deny rules, picks the right permission mode (default, acceptEdits, plan, auto, dontAsk), and escalates to PreToolUse hooks when string matching isn't enough. - Safe editing workflow: Inventories existing config, merges instead of clobbering, backs up files, validates JSON, and verifies changes with /status, /context, and /doctor. - Use Case: A team lead wants Claude Code to auto-run lint after every edit and block access to .env files for everyone on the repo. The Skill produces a committed .claude/settings.json with a PostToolUse hook and deny rules, warns about the workspace trust prompt, and explains how teammates add personal exceptions via settings.local.json. ## Quick Start Ask Claude to configure Claude Code so it stops prompting for your everyday build and test commands while blocking access to your .env files.

Frequently Asked Questions about claude-code-defaults

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stop Claude Code from asking permission for every command?

Add allow rules for your everyday commands under the permissions key in settings.json, and set defaultMode to acceptEdits so file edits auto-approve while shell commands still prompt. Avoid bypassPermissions, which skips every prompt for the whole session.

What is the difference between CLAUDE.md and settings.json in Claude Code?

CLAUDE.md is loaded into the context window as instructions Claude tries to follow, while settings.json is enforced deterministically by the client. Use CLAUDE.md for conventions and preferences; use permissions or hooks for anything that must always or never happen.

Why is Claude Code ignoring my CLAUDE.md file?

Run /context to check whether the file actually loaded — wrong location or lazy subdirectory loading are common causes. Also check for vague wording, contradicting instructions in other files, or content lost after /compact.

How do I share Claude Code settings with my team?

Commit .claude/settings.json and a project CLAUDE.md to the repo so they apply to everyone. Teammates add personal exceptions in .claude/settings.local.json, which should be gitignored; deny rules from the committed file still hold.

Can Claude Code permission rules block network requests?

Bash patterns like Bash(curl https://safe.example.com *) are trivially bypassed by reordering flags or using variables. Deny curl and wget outright and allow specific domains with WebFetch(domain:...) rules instead.

How do I deploy Claude Code settings to a whole organization?

Use managed settings delivered via MDM: managed preferences on macOS, registry or Group Policy on Windows, or /etc/claude-code/managed-settings.json on Linux. Managed scope cannot be overridden by users or projects, and invalid entries are stripped with warnings rather than disabling the whole policy.