Examples of my Claude Code infrastructure with skill auto-activation, hooks, and agents
npx skills add https://github.com/diet103/claude-code-infrastructure-showcase --skill route-testerCLI를 사용하여 이 스킬을 설치하고 작업 공간에서 SKILL.md 워크플로 사용을 시작하세요.
A curated reference library of production-tested Claude Code infrastructure.
Born from 6 months of real-world use managing a complex TypeScript microservices project, this showcase provides the patterns and systems that solved the "skills don't activate automatically" problem and scaled Claude Code for enterprise development.
This is NOT a working application - it's a reference library. Copy what you need into your own projects.
Production-tested infrastructure for:
Time investment to build: 6 months of iteration
Time to integrate into your project: 15-30 minutes
Claude: Read CLAUDE_INTEGRATION_GUIDE.md for step-by-step integration instructions tailored for AI-assisted setup.
The breakthrough feature: Skills that actually activate when you need them.
What you need:
👉 Setup Guide: .claude/hooks/README.md
Browse the skills catalog and copy what you need.
Available:
👉 Skills Guide: .claude/skills/README.md
10 production-tested agents for complex tasks:
👉 Agents Guide: .claude/agents/README.md
Problem: Claude Code skills just sit there. You have to remember to use them.
Solution: UserPromptSubmit hook that:
skill-rules.json configurationResult: Skills activate when you need them, not when you remember them.
These aren't theoretical examples - they're extracted from:
The patterns work because they solved real problems.
Large skills hit context limits. The solution:
skill-name/
SKILL.md # <500 lines, high-level guide
resources/
topic-1.md # <500 lines each
topic-2.md
topic-3.md
Progressive disclosure: Claude loads main skill first, loads resources only when needed.
.claude/
├── skills/ # 5 production skills
│ ├── backend-dev-guidelines/ (12 resource files)
│ ├── frontend-dev-guidelines/ (11 resource files)
│ ├── skill-developer/ (7 resource files)
│ ├── route-tester/
│ ├── error-tracking/
│ └── skill-rules.json # Skill activation configuration
├── hooks/ # 6 hooks for automation
│ ├── skill-activation-prompt.* (ESSENTIAL)
│ ├── post-tool-use-tracker.sh (ESSENTIAL)
│ ├── tsc-check.sh (optional, needs customization)
│ └── trigger-build-resolver.sh (optional)
├── agents/ # 10 specialized agents
│ ├── code-architecture-reviewer.md
│ ├── refactor-planner.md
│ ├── frontend-error-fixer.md
│ └── ... 7 more
└── commands/ # 3 slash commands
├── dev-docs.md
└── ...
dev/
└── active/ # Dev docs pattern examples
└── public-infrastructure-repo/
| Skill | Lines | Purpose | Best For |
|---|---|---|---|
| skill-developer | 426 | Creating and managing skills | Meta-development |
| backend-dev-guidelines | 304 | Express/Prisma/Sentry patterns | Backend APIs |
| frontend-dev-guidelines | 398 | React/MUI v7/TypeScript | React frontends |
| route-tester | 389 | Testing authenticated routes | API testing |
| error-tracking | ~250 | Sentry integration | Error monitoring |
All skills follow the modular pattern - main file + resource files for progressive disclosure.
| Hook | Type | Essential? | Customization |
|---|---|---|---|
| skill-activation-prompt | UserPromptSubmit | ✅ YES | ✅ None needed |
| post-tool-use-tracker | PostToolUse | ✅ YES | ✅ None needed |
| tsc-check | Stop | ⚠️ Optional | ⚠️ Heavy - monorepo only |
| trigger-build-resolver | Stop | ⚠️ Optional | ⚠️ Heavy - monorepo only |
| error-handling-reminder | Stop | ⚠️ Optional | ⚠️ Moderate |
| stop-build-check-enhanced | Stop | ⚠️ Optional | ⚠️ Moderate |
Start with the two essential hooks - they enable skill auto-activation and work out of the box.
Standalone - just copy and use!
| Agent | Purpose |
|---|---|
| code-architecture-reviewer | Review code for architectural consistency |
| code-refactor-master | Plan and execute refactoring |
| documentation-architect | Generate comprehensive documentation |
| frontend-error-fixer | Debug frontend errors |
| plan-reviewer | Review development plans |
| refactor-planner | Create refactoring strategies |
| web-research-specialist | Research technical issues online |
| auth-route-tester | Test authenticated endpoints |
| auth-route-debugger | Debug auth issues |
| auto-error-resolver | Auto-fix TypeScript errors |
| Command | Purpose |
|---|---|
| /dev-docs | Create structured dev documentation |
| /dev-docs-update | Update docs before context reset |
| /route-research-for-testing | Research route patterns for testing |
The system:
This solves the #1 problem with Claude Code skills: they don't activate on their own.
Problem: Large skills hit context limits
Solution: Modular structure
Example: backend-dev-guidelines has 12 resource files covering routing, controllers, services, repositories, testing, etc.
Problem: Context resets lose project context
Solution: Three-file structure
[task]-plan.md - Strategic plan[task]-context.md - Key decisions and files[task]-tasks.md - Checklist formatWorks with: /dev-docs slash command to generate these automatically
The included settings.json is an example only:
To use it:
Skills use generic blog examples (Post/Comment/User):
Some hooks expect specific structures:
tsc-check.sh expects service directoriesRecommended approach:
Issues with integration?
When helping users integrate:
❌ Skills don't activate automatically
❌ Have to remember which skill to use
❌ Large skills hit context limits
❌ Context resets lose project knowledge
❌ No consistency across development
❌ Manual agent invocation every time
✅ Skills suggest themselves based on context
✅ Hooks trigger skills at the right time
✅ Modular skills stay under context limits
✅ Dev docs preserve knowledge across resets
✅ Consistent patterns via guardrails
✅ Agents streamline complex tasks
Found this useful?
Background:
This infrastructure was detailed in a post I made to Reddit "Claude Code is a Beast – Tips from 6 Months of Hardcore Use". After hundreds of requests, this showcase was created to help the community implement these patterns.
MIT License - Use freely in your projects, commercial or personal.
Start here: Copy the two essential hooks, add one skill, and see the auto-activation magic happen.