Skip to content
Research Hub/AI Agent Configuration Patterns

AI Agent Configuration Patterns

CLAUDE.md, skills, hooks, and agent architecture at scale

TL;DR

AI agent configuration has evolved from simple system prompts to multi-layered architectures. CLAUDE.md acts as a project constitution, skills provide hot-reloadable capabilities, hooks automate lifecycle events, and agent profiles define specialized roles. The ACOS pattern demonstrates scaling to 500+ skills without chaos through lazy loading, context-aware activation, and explicit handoff protocols.

Updated 2026-02-0610 sources validated5 claims verified

500+

Skills managed via ACOS

FrankX Production

40+

Specialized agents

ACOS Agent Library

4

Configuration layers

Architecture

3

Trigger dimensions

Skill System

01

The Configuration Hierarchy

Production AI agent systems use a four-layer configuration hierarchy. Each layer serves a distinct purpose, and the layers compose — lower layers provide defaults, higher layers override for specific contexts.

CLAUDE.md (Constitution)

Layer 1

Project-level identity: brand voice, decision frameworks, anti-patterns, content standards. Every agent inherits this context. Acts as the "constitution" all agents swear to.

Skill Profiles (Context)

Layer 2

Context-aware activation rules. A web development profile loads React/Next.js skills; a content profile loads SEO/writing skills. Triggers: file patterns, keywords, commands.

Individual Skills (Capability)

Layer 3

Hot-reloadable markdown files with specific expertise. Types: domain, technical, creative. Enforcement: suggest or enforce. Priority: critical to low.

Commands (Workflow)

Layer 4

Slash-command playbooks (25+ in ACOS). Each command is a complete workflow: prerequisites, decision matrices, step-by-step process, quality gates.

02

Skill Activation System

Skills activate through three independent trigger dimensions. When any dimension matches, the skill loads. This multi-dimensional approach ensures the right skills are available without manual selection.

Keyword Triggers

Dimension 1

Simple word matching in user prompts. Example: "blog", "seo", "deploy" activate content or deployment skills.

Intent Patterns

Dimension 2

Regex-based semantic matching. Example: "write.*(article|blog|post)" detects writing intent regardless of exact phrasing.

File Triggers

Dimension 3

Glob patterns on files being edited. Example: "app/**/*.tsx" activates React skills, "content/**/*.mdx" activates content skills.

03

Agent Specialization Architecture

Each agent is a markdown file with YAML frontmatter defining its role, tools, memory limits, and workflows. The key principle: single responsibility. A research agent doesn't write code. A coding agent doesn't do SEO. Clear boundaries prevent agent confusion and improve output quality.

Mission & Expertise

Identity

Clear 1-2 sentence purpose and enumerated domain expertise. Prevents scope creep.

Workflow Contracts

Contracts

Each workflow defines inputs, outputs, and processing steps. Agents know what they receive and what they deliver.

Memory Architecture

Memory

Working memory (current task), episodic (past sessions), semantic (knowledge base). Each agent gets explicit memory allocation.

Handoff Protocols

Coordination

Explicit rules for passing work between agents. Prevents dropped context and duplicate work.

04

Hook-Based Lifecycle Automation

Hooks are shell commands triggered at specific points in the agent lifecycle: PreToolUse (validation, logging), PostToolUse (cleanup, metrics), SessionStart (context loading), and Stop (reporting). Hooks enable quality gates, automated testing after code changes, and session logging — all without modifying the agent itself.

PreToolUse

Before

Runs before any tool executes. Use for: input validation, permission checks, audit logging.

PostToolUse

After

Runs after tool completes. Use for: linting, test execution, metric collection, notifications.

UserPromptSubmit

Input

Runs when user sends a message. Use for: context injection, skill activation, routing decisions.

Stop

End

Runs when agent session ends. Use for: session logging, cleanup, summary generation.

05

Scaling to 500+ Skills

The ACOS pattern solves the "too many skills" problem through lazy loading, priority ordering, and exclusion patterns. Only 5 skills load concurrently (max_concurrent_skills). Skills are priority-ranked (critical > high > medium > low). Exclude patterns filter irrelevant skills (e.g., exclude Shopify skills in a non-commerce project). The result: 500+ skills available, but only the relevant 3-5 are active at any time.

06

Practical Implementation Guide

To implement this pattern in your own projects: (1) Start with CLAUDE.md — define your project identity, voice, and anti-patterns. (2) Create 2-3 skill profiles for your main work contexts. (3) Add individual skills as markdown files with clear trigger patterns. (4) Build commands for workflows you repeat weekly. (5) Add hooks for quality automation. This can start small and grow organically.

For Solo Developers

Starter

CLAUDE.md + 5-10 skills + 3 commands. Focus on your most common workflows.

For Teams

Team

Shared CLAUDE.md + role-based profiles + 20-50 skills + 10 commands. Version control everything.

For Enterprise

Enterprise

Multi-repo CLAUDE.md hierarchy + profile library + 100+ skills + routing commands + hooks for compliance.

Key Findings

1

CLAUDE.md acts as a "project constitution" that all agents inherit — brand voice, decision frameworks, and anti-patterns

2

Multi-dimensional skill activation (keywords + intent + file patterns) ensures the right skills load without manual selection

3

Lazy loading with max 5 concurrent skills scales to 500+ without overwhelming the agent

4

Agent specialization with single responsibility and explicit handoff protocols prevents confusion

5

Hooks automate quality gates (linting, testing, logging) at lifecycle boundaries without modifying agent behavior

6

Commands are complete workflow playbooks, not just function calls — they include decision trees and quality checklists

7

The four-layer hierarchy (CLAUDE.md → profiles → skills → commands) provides clear separation of concerns

8

Arcanea Gates demonstrate gamification of skill progression — mapping technical skills to narrative milestones

Frequently Asked Questions

CLAUDE.md acts as a project constitution that all AI agents inherit — defining brand voice, decision frameworks, anti-patterns, and content standards.

Sources & References

10 validated sources · Last updated 2026-02-06

[2]
Skills Documentation
Claude CodeOfficial Docs
[3]
Hooks Reference
Claude CodeOfficial Docs
[5]
The Complete Guide to CLAUDE.md
Builder.ioBlog / Analysis
[6]
Writing a Good CLAUDE.md
HumanLayerBlog / Analysis
[7]
[8]
[10]