Claude Code setup and patterns.
Claude Code is the primary build environment for all 2nth.ai work. Every client project should have a properly configured Claude Code environment.
project/
├── CLAUDE.md # Project context — loaded automatically
├── .claude/
│ ├── settings.json # Tool permissions, MCP servers
│ └── settings.local.json # Local overrides (gitignore this)
└── memory/ # Persistent memory (if enabled)
└── MEMORY.md
A good CLAUDE.md contains:
A CLAUDE.md does NOT contain:
{
"permissions": {
"allow": [
"Bash(wrangler:*)",
"Bash(npm:*)",
"Bash(npx:*)"
],
"deny": [
"Bash(rm -rf:*)"
]
}
}
# Install skill into current project
npx skills add biz/erp/sage-x3
# This places the SKILL.md where Claude Code finds it
# and resolves the requires: chain automatically
Claude Code sessions should be routed through 2nth AI Gateway for token metering:
export ANTHROPIC_BASE_URL=https://gateway.ai.cloudflare.com/v1/{account}/{gateway}/anthropic
This enables per-client, per-project token tracking without changing any code.
.claude/projects/ accumulates context. Review it periodically.requires: chains resolve depth-first.