Context Management, Environment Orchestration, Hooks
Markus Klug
German IT Entrepreneur since 1997, now based in Lisbon.
Award-Winning Founder and Builder, FinTech Veteran,
Agentic Coding Pioneer.
Most developers dump everything into one CLAUDE.md
Context hierarchy beats monolithic design. Every time.
Seven layers, loaded progressively
Rules auto-load and are always active. Skills are invoked when needed.
User-invoked vs model-invoked
Only triggered by the user typing /skill-name
disable-model-invocation: true
Sensitive operations
Destructive commands
Interactive workflows
Setup wizards
/generate-patches, /import-snapshot
Claude decides when to invoke based on context
disable-model-invocation: false (default)
Authoring guides and cops
Domain knowledge bases
Convention enforcement
Triggered by description match
/css-cop, /ct-backend-api-surface
Model-invoked skills maximize autonomy. User-invoked skills preserve human control where it matters.
Identity and invocation control
Skill identifier. Lowercase, numbers, hyphens only.
THE critical field for model-invoked skills
This is how Claude decides whether to invoke. Include exact trigger phrases. Vague = missed invocations.
When true, only the user can trigger via /skill-name
When false, hidden from slash menu. Only Claude can invoke it.
Together these two booleans create three modes: user-only, model-only, and both (default)
Execution control
Restrict which tools the skill can use
Which Claude model executes the skill
haiku
Fast
sonnet
Balanced
opus
Max
sonnet[1m]
Extended
Documents expected arguments, shown in UI autocomplete
Run skill in an isolated subagent context
Built-in: Explore, Plan, general-purpose — or custom agent name
Skill-scoped lifecycle hooks
27 skills across 4 categories
Loaded before writing code
css-cop, tsx-cop, typescript-cop
conventions-cop, conventions-index-page
Building specific UI widgets
ui-lib-data-table, ui-lib-data-list
changelog-expert, ux-expert
Specific subsystem expertise
ct-backend-api-surface (310 ops)
ct-trade-management, ct-ingestion
Multi-step defined processes
generate-patches, wire-permits
import-snapshot, dataset-onboarding
Deep knowledge available on demand — without polluting the base context
9 categories from hundreds of skills in production — @trq212
Internal libs, SDKs, CLIs — gotchas and snippets
Test flows via Playwright, tmux — assert correctness
Connect to data stacks, dashboards, query patterns
Standups, ticket creation, weekly recaps
Templates, migrations, new app boilerplate
Adversarial review, style enforcement, test practices
Babysit PRs, gradual rollouts, cherry-picks
Symptom to investigation to structured report
Orphan cleanup, dependency approval, cost investigation
Skills are folders, not just markdown — include scripts, assets, data, and on-demand hooks
Lessons from Building Claude Code: How We Use Skills
x.com/trq212/status/2033949937936085378
by Thariq Shihipar
Claude Code team @ Anthropic
Claude Owns the Dev Environment
Structured development environment
| Window | Pane | Purpose | What Runs |
|---|---|---|---|
| srv | 1-2 | UI + Backend servers | pnpm dev / dotnet run |
| tsc | 1 | TypeScript watch | pnpm run watch |
| cli | 1-2 | General CLI | ad-hoc commands |
| cli-ui | 1 | UI-scoped CLI | pnpm add, scripts |
| docker | 1-2 | Docker management | compose up/down |
| cc1-3 | 1 | Claude Code sessions | parallel agents |
Claude NEVER asks the human to run commands
All execution happens in designated panes
Dedicated restart scripts
dev-restart-backend.sh, dev-restart-frontend.sh
Claude reads pane output directly
Never runs tsc itself
Reads the watch pane instead
Saves time and tokens
No redundant compilation
Making Claude Self-Aware
Shell commands, HTTP endpoints, LLM prompts, or agents — fired at every stage
Claude's state reflected in tmux window titles
UserPromptSubmit
Window title: * running
PermissionRequest
Window title: + needs-input
Stop
Window title: base name
A separate script writes a short topic to a temp file, appended to the window title:
Implementation:
Auto-formatting pipeline — queue-and-flush pattern
PostToolUse hook
On Edit/Write events
Stop hook
When Claude finishes a turn
All edited files auto-formatted when Claude finishes — without interrupting the workflow
Real-time dashboard via HTTP hooks to localhost:8002
UserPromptSubmit → running
PermissionRequest → needs-input
Notification(idle) → idle
Stop / SessionEnd → idle
PostToolUse(Edit|Write) → queue
Stop → flush dprint fmt
PreToolUse(Edit|Write)
→ approve claude settings
3 shell scripts + 1 HTTP endpoint = full observability over every Claude session
Three pillars of advanced Claude Code
Hierarchical CLAUDE.md layers
Rules auto-load, skills on demand
27 skills across 4 categories
Shared docs via @include
Structured tmux sessions
7 windows, dedicated panes
Direct pane output reading
Specialized restart scripts
Dynamic state indicators
Topic system for context
Auto-formatting pipeline
Multi-session dashboard
Claude Code as a full development platform — not just a chat assistant