AI Agent Configuration
When to use this skill
- Set up agent configuration for a new repo or team
- Decide whether guidance belongs in
AGENTS.md, CLAUDE.md, settings, hooks,
skills, plugins, or MCP
- Tighten permission and safety guardrails without over-approving commands
- Share reusable agent defaults across a team without creating prompt sprawl
Prefer a narrower sibling skill when the main job is more specific:
agent-workflow for day-to-day execution loops, handoffs, and runtime flow
skill-standardization for auditing or rewriting a specific SKILL.md
security-best-practices for broader application hardening beyond agent
configuration
Instructions
Step 1: Classify the configuration job before changing files
Sort the request into one or two lanes:
- instruction-scope: always-on project rules, repo context, coding standards
- guardrails: permissions, hooks, approvals, dangerous-command blocking
- capability-packaging: skills, plugins, extensions, MCP, custom commands
- team-sharing: defaults, checked-in config, local override boundaries
Do not jump straight to file creation. First decide what must always be loaded,
what should stay on demand, and what must remain local to one machine.
Step 2: Choose the smallest correct configuration surface
Use these defaults unless the environment proves otherwise:
- always-on repo instructions belong in project instruction files such as
AGENTS.md, CLAUDE.md, or equivalent repo guidance
- reusable task-specific guidance belongs in skills
- external integrations belong in plugins, extensions, or MCP configuration
- safety controls belong in settings, permission rules, and hooks
- personal preferences stay local unless the team explicitly wants them shared
Keep the main project instructions concise. Move detailed procedures and
platform-specific examples into references/.
Step 3: Configure guardrails with least privilege
When the request touches approvals, hooks, or permissions:
- default to narrow allowlists over broad wildcard approval
- block destructive commands explicitly
- separate safe automation from risky human-review steps
- document where host-only or secret-bearing settings must stay out of the repo
Avoid recommending blanket auto-approval, unrestricted host execution, or
unknown MCP endpoints as defaults.
Step 4: Package reusable capability cleanly
When the request is about extending what the agent can do:
- use skills for reusable instructions and decision procedures
- use plugins, extensions, or MCP when external tools or services are required
- keep overlap explicit so users know when to route to a sibling skill instead
- add references or evals when the configuration surface is likely to be reused
or reviewed
Do not create a new package surface when a smaller edit to existing project
guidance would solve the problem.
Step 5: Verify the resulting configuration
Before claiming the configuration is good:
- check that the chosen surface matches the actual need
- confirm the scope is correct: global, project, repo, or user-local
- review for over-broad permissions, duplicated instructions, or secret risk
- run validation or linting where the repo provides it
If the output is a team-shared configuration, leave an explicit note about what
is intentionally shared and what must remain local.
Examples
Example 1: Decide where instructions belong
Input:
Should this repo guidance live in AGENTS.md, a skill, or local settings?
Expected shape:
- distinguishes always-on rules from on-demand guidance
- keeps repo-specific policy in project instruction files
- avoids turning every repeated note into a new skill
Example 2: Tighten safety settings
Input:
I want the agent to run tests automatically but never approve dangerous shell
commands. How should I configure that?
Expected shape:
- uses least-privilege approval guidance
- separates safe test automation from risky commands
- recommends explicit deny or warning patterns for destructive actions
Example 3: Choose between skills and integrations
Input:
We need reusable prompts, browser access, and external service connections
across the team. Should this be a skill, plugin, or MCP setup?
Expected shape:
- routes reusable guidance to skills
- routes external integrations to plugins, extensions, or MCP
- keeps the answer scoped to what must be shared vs what stays local
Example 4: Share team defaults safely
Input:
How should we share our agent configuration in the repo without leaking local
machine preferences or secrets?
Expected shape:
- defines repo-shared vs local-only boundaries
- recommends checking in only the stable team defaults
- calls out secrets and user-specific overrides as local
Best practices
- Start with scope: global, user-local, project, or repo-shared
- Keep always-on instructions short and move details behind references
- Prefer narrow approval patterns over broad wildcard trust
- Use skills for reusable guidance and integrations only when a tool surface is
actually required
- Avoid duplicating the same rule across project files, skills, and settings
- Add evals before considering an optimization loop for a newly packaged skill
References
1---2name: agent-configuration3description: Configure how AI coding agents are instructed, constrained, and shared across a project: instruction files, settings scope, hooks or permission guardrails, skills, plugins, tool-server setup, and team defaults. Use when the user needs to decide where configuration should live or how to make it safe and reusable, even if they ask in shorthand like CLAUDE.md, AGENTS.md, hooks, permissions, plugin setup, shared config, or team settings. Do not use this skill for day-to-day execution flow, runtime verification, or general MCP usage questions.4---56# AI Agent Configuration78## When to use this skill910- Set up agent configuration for a new repo or team11- Decide whether guidance belongs in `AGENTS.md`, `CLAUDE.md`, settings, hooks,12 skills, plugins, or MCP13- Tighten permission and safety guardrails without over-approving commands14- Share reusable agent defaults across a team without creating prompt sprawl1516Prefer a narrower sibling skill when the main job is more specific:1718- `agent-workflow` for day-to-day execution loops, handoffs, and runtime flow19- `skill-standardization` for auditing or rewriting a specific `SKILL.md`20- `security-best-practices` for broader application hardening beyond agent21 configuration2223## Instructions2425### Step 1: Classify the configuration job before changing files2627Sort the request into one or two lanes:2829- instruction-scope: always-on project rules, repo context, coding standards30- guardrails: permissions, hooks, approvals, dangerous-command blocking31- capability-packaging: skills, plugins, extensions, MCP, custom commands32- team-sharing: defaults, checked-in config, local override boundaries3334Do not jump straight to file creation. First decide what must always be loaded,35what should stay on demand, and what must remain local to one machine.3637### Step 2: Choose the smallest correct configuration surface3839Use these defaults unless the environment proves otherwise:4041- always-on repo instructions belong in project instruction files such as42 `AGENTS.md`, `CLAUDE.md`, or equivalent repo guidance43- reusable task-specific guidance belongs in skills44- external integrations belong in plugins, extensions, or MCP configuration45- safety controls belong in settings, permission rules, and hooks46- personal preferences stay local unless the team explicitly wants them shared4748Keep the main project instructions concise. Move detailed procedures and49platform-specific examples into `references/`.5051### Step 3: Configure guardrails with least privilege5253When the request touches approvals, hooks, or permissions:5455- default to narrow allowlists over broad wildcard approval56- block destructive commands explicitly57- separate safe automation from risky human-review steps58- document where host-only or secret-bearing settings must stay out of the repo5960Avoid recommending blanket auto-approval, unrestricted host execution, or61unknown MCP endpoints as defaults.6263### Step 4: Package reusable capability cleanly6465When the request is about extending what the agent can do:6667- use skills for reusable instructions and decision procedures68- use plugins, extensions, or MCP when external tools or services are required69- keep overlap explicit so users know when to route to a sibling skill instead70- add references or evals when the configuration surface is likely to be reused71 or reviewed7273Do not create a new package surface when a smaller edit to existing project74guidance would solve the problem.7576### Step 5: Verify the resulting configuration7778Before claiming the configuration is good:7980- check that the chosen surface matches the actual need81- confirm the scope is correct: global, project, repo, or user-local82- review for over-broad permissions, duplicated instructions, or secret risk83- run validation or linting where the repo provides it8485If the output is a team-shared configuration, leave an explicit note about what86is intentionally shared and what must remain local.8788## Examples8990### Example 1: Decide where instructions belong9192Input:9394```text95Should this repo guidance live in AGENTS.md, a skill, or local settings?96```9798Expected shape:99100- distinguishes always-on rules from on-demand guidance101- keeps repo-specific policy in project instruction files102- avoids turning every repeated note into a new skill103104### Example 2: Tighten safety settings105106Input:107108```text109I want the agent to run tests automatically but never approve dangerous shell110commands. How should I configure that?111```112113Expected shape:114115- uses least-privilege approval guidance116- separates safe test automation from risky commands117- recommends explicit deny or warning patterns for destructive actions118119### Example 3: Choose between skills and integrations120121Input:122123```text124We need reusable prompts, browser access, and external service connections125across the team. Should this be a skill, plugin, or MCP setup?126```127128Expected shape:129130- routes reusable guidance to skills131- routes external integrations to plugins, extensions, or MCP132- keeps the answer scoped to what must be shared vs what stays local133134### Example 4: Share team defaults safely135136Input:137138```text139How should we share our agent configuration in the repo without leaking local140machine preferences or secrets?141```142143Expected shape:144145- defines repo-shared vs local-only boundaries146- recommends checking in only the stable team defaults147- calls out secrets and user-specific overrides as local148149## Best practices1501511. Start with scope: global, user-local, project, or repo-shared1522. Keep always-on instructions short and move details behind references1533. Prefer narrow approval patterns over broad wildcard trust1544. Use skills for reusable guidance and integrations only when a tool surface is155 actually required1565. Avoid duplicating the same rule across project files, skills, and settings1576. Add evals before considering an optimization loop for a newly packaged skill158159## References160161- `references/instruction-files-and-scope.md`162- `references/guardrails-and-permissions.md`163- `references/skills-plugins-and-team-sharing.md`164- [Agent Skills specification](https://agentskills.io/specification)165- [Agent Skills best practices](https://agentskills.io/skill-creation/best-practices)166- [Claude Code subagents](https://code.claude.com/docs/en/sub-agents)167- [Gemini CLI extensions](https://google-gemini.github.io/gemini-cli/docs/extensions/)168- [OpenAI Codex](https://developers.openai.com/codex)