# Repository Briefing: diet103/claude-code-infrastructure-showcase
> Source: https://repoforai.com/repo/diet103/claude-code-infrastructure-showcase (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/diet103/claude-code-infrastructure-showcase
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: B (59/100 · Maintenance 12/35 · Adoption 21/25 · Releases 6/20 · License 20/20)
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: CLI
- **Momentum**: 10,061 ★ total (+0 24h / +0 7d) · 1,193 forks
- **When to Use**: Best for: Claude Code or Codex teams that repeatedly miss project conventions and want reusable skill routing, activation tracking, and pre-edit checks inside each project. Skip if: You need an MCP server, a centrally enforced policy boundary, or a setup that works in native Windows shells without maintaining project hooks.

## Overview
```text
### Architecture & Core Mechanics
This is a copy-in reference toolkit for coding CLIs, not a standalone application or a demonstrated MCP server. Bash wrappers and TypeScript hook logic live under `.claude/hooks/`. `UserPromptSubmit` evaluates prompt and file context against `.claude/skills/skill-rules.json` and surfaces matching skills. A `PreToolUse` guard checks covered writes and edits; post-tool hooks record skill activation and touched files. The post-Skill tracker clears the relevant pending requirement when the Skill tool is invoked.

Project extension happens through JSON rules, Markdown skills, and lifecycle hook registration. Codex registers the same four core hooks in `.codex/hooks.json`. Its adapter sets `CLAUDE_PROJECT_DIR` and converts native `apply_patch` calls into per-file events the guard understands. `.agents/skills/` mirrors the canonical `.claude/skills/`, and the clients share session state and the local `state/metrics.jsonl` activation log.

### Key Capabilities & Differentiators
Skill routing can run in `disabled` mode, which disables AI rather than skill matching, `fallback` mode, which tries AI before falling back to regex on failure, or `ai-only` mode, which has no regex fallback. Providers are Gemini (`gemini-3-flash-preview`), OpenAI (`gpt-4o-mini`), Anthropic (`claude-haiku-4-5`), and local Ollama (`llama3.2`). Strict, balanced, and aggressive settings let teams tune how readily the classifier suggests a skill.

Rules marked `block` get a two-try pre-edit enforcement workflow rather than just a prompt-time reminder. The content library includes four skills covering backend, frontend, skill authoring, and Sentry error tracking; eight specialized agents cover work such as architecture review and refactoring; and four slash commands support workflows including setup verification and development notes. The modular skill pattern keeps the main `SKILL.md` under 500 lines and puts narrower topics in resources that can be loaded when needed.

### Trade-offs & Limitations
Compared with native skills and static project instructions, explicit matching rules make it easier to decide when guidance should appear and to enforce activation on covered edit events. The cost is more project-owned code and configuration: teams have to tune triggers, account for false matches, keep skill mirrors synchronized, and check hook behavior across clients. The two-try guard is a workflow control, not a security boundary or a guarantee that generated code follows the activated guidance.

Regex matching keeps classification local and avoids provider charges, but it can miss intent phrased outside the configured patterns. Hosted AI can match intent beyond literal keywords, at the cost of per-prompt network latency, provider usage, and prompt-data review. Ollama avoids the hosted classifier but requires local inference capacity. Start with the core hooks: optional TypeScript and build-resolution Stop hooks target narrower workflows and may require substantial project-specific tuning.

### Hardware & Deployment Guide
Run the toolkit with Node.js 18+ (20+ recommended), npm, and Bash on macOS, Linux, or WSL2. `jq` is only needed for optional Stop hooks that use it. The `npx tsx setup.ts <project-path>` wizard copies the Claude configuration into a new target, detects the tech stack, configures the classification mode, installs hook dependencies, and sets executable permissions. It accepts `--yes` for noninteractive setup. Run `bash .claude/scripts/verify-setup.sh` from the project root to verify the result, including a test prompt through the activation hook.

Default matching is offline and keyless; hosted classification needs the selected provider's credentials. For Codex, use a CLI installed in the same shell environment, start it from the project root, and review the hook configuration before granting trust. The v2.0 design adds explicit pre-edit verification and post-activation tracking; no GitHub release is listed. Rerunning the wizard against an existing `.claude/` does not refresh copied files, so new hook or skill files need to be merged separately.
```

## Key Capabilities
```text
- Execution model: Project-local Bash and TypeScript hooks attach to coding CLI lifecycle events; no standalone MCP endpoint is described.
- Skill routing: `skill-rules.json` maps prompt and file signals to skills, with offline regex matching as the default.
- Enforcement: A `PreToolUse` guard applies two-try blocking to `block`-configured skills; a post-Skill hook clears pending activation state.
- Cross-agent reuse: Codex shares four core hooks with Claude Code, normalizes `apply_patch` to per-file events, and uses the same `state/metrics.jsonl` telemetry.
- Classifier choice: Regex-only, AI-first with regex fallback, or AI-only, with Gemini, OpenAI, Anthropic, and local Ollama backends.
- Integration checks: `verify-setup.sh` runs eight checks, including exercising the live activation hook with a test prompt.
```

## Quick Start / Clone
```bash
# 1. Clone this repo
git clone https://github.com/diet103/claude-code-infrastructure-showcase.git

# 2. Run the setup wizard, pointing to YOUR project
cd claude-code-infrastructure-showcase
npx tsx setup.ts ~/my-project
```
