agent-configuration/SKILL.md
AI agent configuration policy and security guide. Project description file writing, Hooks/Skills/Plugins setup, security policy, team shared workflow definition.
npx skillsauth add autohandai/community-skills agent-configurationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Project description files (CLAUDE.md, README, etc.) are project manuals for AI. AI agents reference these files with top priority.
/init # Claude analyzes the codebase and generates a draft
# 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
Bad (verbose):
Our authentication system is built using NextAuth.js, which is a
complete authentication solution for Next.js applications...
(5+ lines of explanation)
Good (concise):
## Authentication
- NextAuth.js with Credentials provider
- JWT session strategy
- **DO NOT**: Bypass auth checks, expose session secrets
"Start without a project description file. Add content when you find yourself repeating the same things."
Hooks are shell commands that run automatically on specific events. They act as guardrails for AI.
| 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 |
// ~/.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"
}
]
}
}
| 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 |
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
# 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
.env, credentials.jsonsudo commandscurl | sh formatchmod 777# 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
# 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__*"
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
└── ...
{
"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"]
}
}
}
Commit .claude/ folder → Team members Clone → Same settings automatically applied → Team standards maintained
| 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 |
.agent-skills/
├── backend/
├── frontend/
├── code-quality/
├── infrastructure/
├── documentation/
├── project-management/
├── search-analysis/
└── utilities/
/init or manual)c, cc, g, cx)export EDITOR=vim)cc-safe)~/.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
1. Block dangerous commands with Hooks
2. Auto-approve only safe commands with /sandbox
3. Regular audit with cc-safe
4. Experiment mode in containers only
Project Description File: Always loaded (keep concise)
Skills: Load on demand (token efficient)
.toon mode: 95% token savings
development
MISP (Malware Information Sharing Platform) is an open-source threat intelligence platform for gathering, sharing, storing, and correlating Indicators of Compromise (IOCs) of targeted attacks, threat
tools
Collects and synthesizes open-source intelligence (OSINT) about threat actors, malicious infrastructure, and attack campaigns using publicly available data sources, passive reconnaissance tools, and dark web monitoring. Use when investigating external threat actor infrastructure, performing pre-engagement reconnaissance for authorized red team assessments, or enriching CTI reports with publicly available adversary context. Activates for requests involving Maltego, Shodan, OSINT framework, SpiderFoot, or infrastructure reconnaissance.
development
Systematically collects, categorizes, and distributes indicators of compromise (IOCs) during and after security incidents to enable detection, blocking, and threat intelligence sharing. Covers network, host, email, and behavioral indicators using STIX/TAXII formats and threat intelligence platforms. Activates for requests involving IOC collection, indicator extraction, threat indicator sharing, compromise indicators, STIX export, or IOC enrichment.
development
Search and navigate large codebases efficiently. Use when finding specific code patterns, tracing function calls, understanding code structure, or locating bugs. Handles semantic search, grep patterns, AST analysis.