agent-configuration
AI agent configuration policy and security guide. Project description file writing, Hooks/Skills/Plugins setup, security policy, team shared workflow definition.
What this skill does
# AI Agent Configuration Policy (Configuration & Security)
## When to use this skill
- Build AI agent environment for new projects
- Write and optimize project description files
- Configure Hooks/Skills/Plugins
- Establish security policies
- Share team configurations
---
## 1. Project Description File Writing Policy
### Overview
Project description files (CLAUDE.md, README, etc.) are **project manuals for AI**. AI agents reference these files with top priority.
### Auto-generate (Claude Code)
```bash
/init # Claude analyzes the codebase and generates a draft
```
### Required Section Structure
```markdown
# Project: [Project Name]
## Tech Stack
- **Frontend**: React + TypeScript
- **Backend**: Node.js + Express
- **Database**: PostgreSQL
- **ORM**: Drizzle
## Coding Standards
- Use TypeScript strict mode
- Prefer server components over client components
- Use `async/await` instead of `.then()`
- Always validate user input with Zod
## DO NOT
- Never commit `.env` files
- Never use `any` type in TypeScript
- Never bypass authentication checks
- Never expose API keys in client code
## Common Commands
- `npm run dev`: Start development server
- `npm run build`: Build for production
- `npm run test`: Run tests
```
### Writing Principles: The Art of Conciseness
**Bad (verbose):**
```markdown
Our authentication system is built using NextAuth.js, which is a
complete authentication solution for Next.js applications...
(5+ lines of explanation)
```
**Good (concise):**
```markdown
## Authentication
- NextAuth.js with Credentials provider
- JWT session strategy
- **DO NOT**: Bypass auth checks, expose session secrets
```
### Incremental Addition Principle
> "Start without a project description file. Add content when you find yourself repeating the same things."
---
## 2. Hooks Configuration Policy (Claude Code)
### Overview
Hooks are shell commands that run automatically on specific events. They act as **guardrails** for AI.
### Hook Event Types
| Hook | Trigger | Use Case |
|------|---------|----------|
| `PreToolUse` | Before tool execution | Block dangerous commands |
| `PostToolUse` | After tool execution | Log recording, send notifications |
| `PermissionRequest` | On permission request | Auto approve/deny |
| `Notification` | On notification | External system integration |
| `SubagentStart` | Subagent start | Monitoring |
| `SubagentStop` | Subagent stop | Result collection |
### Security Hooks Configuration
```json
// ~/.claude/settings.json
{
"hooks": {
"PreToolUse": [
{
"pattern": "rm -rf /",
"action": "block",
"message": "Block root directory deletion"
},
{
"pattern": "rm -rf /*",
"action": "block",
"message": "Block dangerous deletion command"
},
{
"pattern": "sudo rm",
"action": "warn",
"message": "Caution: sudo delete command"
},
{
"pattern": "curl * | sh",
"action": "block",
"message": "Block piped script execution"
},
{
"pattern": "chmod 777",
"action": "warn",
"message": "Caution: excessive permission setting"
}
]
}
}
```
---
## 3. Skills Configuration Policy
### Skills vs Other Settings Comparison
| Feature | Load Timing | Primary Users | Token Efficiency |
|---------|------------|--------------|-----------------|
| **Project Description File** | Always loaded | Project team | Low (always loaded) |
| **Skills** | Load on demand | AI auto | High (on-demand) |
| **Slash Commands** | On user call | Developers | Medium |
| **Plugins/MCP** | On install | Team/Community | Varies |
### Selection Guide
```
Rules that always apply → Project Description File
Knowledge needed only for specific tasks → Skills (token efficient)
Frequently used commands → Slash Commands
External service integration → Plugins / MCP
```
### Custom Skill Creation
```bash
# Create skill directory
mkdir -p ~/.claude/skills/my-skill
# Write SKILL.md
cat > ~/.claude/skills/my-skill/SKILL.md << 'EOF'
---
name: my-skill
description: My custom skill
platforms: [Claude, Gemini, ChatGPT]
---
# My Skill
## When to use
- When needed for specific tasks
## Instructions
1. First step
2. Second step
EOF
```
---
## 4. Security Policy
### Prohibited Actions (DO NOT)
#### Absolutely Forbidden
- Using unrestricted permission mode on host systems
- Auto-approving root directory deletion commands
- Committing secret files like `.env`, `credentials.json`
- Hardcoding API keys
#### Requires Caution
- Indiscriminate approval of `sudo` commands
- Running scripts in `curl | sh` format
- Setting excessive permissions with `chmod 777`
- Connecting to unknown MCP servers
### Approved Command Audit
```bash
# Check for dangerous commands with cc-safe tool
npx cc-safe .
npx cc-safe ~/projects
# Detection targets:
# - sudo, rm -rf, chmod 777
# - curl | sh, wget | bash
# - git reset --hard, git push --force
# - npm publish, docker run --privileged
```
### Safe Auto-approval (Claude Code)
```bash
# Auto-approve only safe commands
/sandbox "npm test"
/sandbox "npm run lint"
/sandbox "git status"
/sandbox "git diff"
# Pattern approval
/sandbox "git *" # All git commands
/sandbox "npm test *" # npm test related
# MCP tool patterns
/sandbox "mcp__server__*"
```
---
## 5. Team Configuration Sharing
### Project Configuration Structure
```
project/
├── .claude/ # Claude Code settings
│ ├── team-settings.json
│ ├── hooks/
│ └── skills/
├── .agent-skills/ # Universal skills
│ ├── backend/
│ ├── frontend/
│ └── ...
├── CLAUDE.md # Project description for Claude
├── .cursorrules # Cursor settings
└── ...
```
### team-settings.json Example
```json
{
"permissions": {
"allow": [
"Read(src/)",
"Write(src/)",
"Bash(npm test)",
"Bash(npm run lint)"
],
"deny": [
"Bash(rm -rf /)",
"Bash(sudo *)"
]
},
"hooks": {
"PreToolUse": {
"command": "bash",
"args": ["-c", "echo 'Team hook: validating...'"]
}
},
"mcpServers": {
"company-db": {
"command": "npx",
"args": ["@company/db-mcp"]
}
}
}
```
### Team Sharing Workflow
```
Commit .claude/ folder → Team members Clone → Same settings automatically applied → Team standards maintained
```
---
## 6. Multi-Agent Configuration
### Per-Agent Configuration Files
| Agent | Config File | Location |
|-------|------------|---------|
| Claude Code | CLAUDE.md, settings.json | Project root, ~/.claude/ |
| Gemini CLI | .geminirc | Project root, ~/ |
| Cursor | .cursorrules | Project root |
| ChatGPT | Custom Instructions | UI settings |
### Shared Skills Directory
```
.agent-skills/
├── backend/
├── frontend/
├── code-quality/
├── infrastructure/
├── documentation/
├── project-management/
├── search-analysis/
└── utilities/
```
---
## 7. Environment Configuration Checklist
### Initial Setup
- [ ] Create project description file (`/init` or manual)
- [ ] Set up terminal aliases (`c`, `cc`, `g`, `cx`)
- [ ] Configure external editor (`export EDITOR=vim`)
- [ ] Connect MCP servers (if needed)
### Security Setup
- [ ] Configure Hooks for dangerous commands
- [ ] Review approved command list (`cc-safe`)
- [ ] Verify .env file in .gitignore
- [ ] Prepare container environment (for experimentation)
### Team Setup
- [ ] Commit .claude/ folder to Git
- [ ] Write team-settings.json
- [ ] Team standard project description file template
---
## Quick Reference
### Configuration File Locations
```
~/.claude/settings.json # Global settings
~/.claude/skills/ # Global skills
.claude/settings.json # Project settings
.claude/skills/ # Project skills
.agent-skills/ # Universal skills
CLAUDE.md # Project AI manual
```
### Security Priority
```
1. Block dangerous commands with Hooks
2. Auto-approve only safe commands wiRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.