Skip to content
Back to search

claude-code-blueprint

SkillWorks with Claude CodeGitHub

Production-grade Claude Code configuration: skills, agents, hooks, rules, and permissions working as a system.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/aedelon--claude-code-blueprint/badge.svg)](/listings/aedelon--claude-code-blueprint)

HTML

<a href="/listings/aedelon--claude-code-blueprint"><img src="/api/listings/aedelon--claude-code-blueprint/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

# 1. Clone
git clone https://github.com/Aedelon/claude-code-blueprint.git
cd claude-code-blueprint

# 2. Copy to your Claude Code config
cp CLAUDE.md ~/.claude/CLAUDE.md
cp -r rules/ ~/.claude/rules/
cp -r skills/ ~/.claude/skills/
cp -r agents/ ~/.claude/agents/
cp -r hooks/ ~/.claude/hooks/
cp -r commands/ ~/.claude/commands/

# 3. Adapt settings (DO NOT copy blindly -- review permissions first)
# Use settings.template.json as a reference for your own ~/.claude/settings.json

# 4. Install hook dependencies
brew install jq  # or: apt install jq

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 250 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <p align="center">
  2. <img src="assets/cover.png" alt="Claude Code Blueprint" width="100%">
  3. </p>
  4. # Claude Code Blueprint
  5. A production-grade Claude Code configuration: skills, agents, hooks, rules, and permissions working as a system, not as isolated features.
  6. **Companion repo for the article**: [*"I Turned Claude Code Into an Operating System. Here's the Blueprint."*](https://ai.gopubby.com/claude-code-setup-skills-hooks-agents-mcp-blueprint-80bdef0c62f6)
  7. ---
  8. ## Architecture
  9. ```
  10. +---------------------------------------------------+
  11. | LAYER 6: MCP |
  12. | 6 servers (context7, fetch, git, |
  13. | huggingface, jupyter, ide) |
  14. +---------------------------------------------------+
  15. | LAYER 5: SECURITY |
  16. | 40 allow + 38 deny + hooks (17 events) |
  17. | + regex secrets + fail-closed trap |
  18. +---------------------------------------------------+
  19. | LAYER 4: AGENTS |
  20. | Specialized sub-agents (by domain) |
  21. | Multi-agent brainstorm (parallel) |
  22. +---------------------------------------------------+
  23. | LAYER 3: SKILLS |
  24. | 32 skills (10 categories) auto-loaded |
  25. | Common pattern: 5 phases AAPEV |
  26. +---------------------------------------------------+
  27. | LAYER 2: MEMORY |
  28. | memory/ persistent + rules/ per project |
  29. | Cross-session learning |
  30. +---------------------------------------------------+
  31. | LAYER 1: CLAUDE.md (KERNEL) |
  32. | Anti-hallucination + Confidence levels + |
  33. | Toolchain + Code standards + /compact rules |
  34. +---------------------------------------------------+
  35. ```
  36. Each layer reinforces the others. The anti-hallucination protocol works **because** Context7 is an accessible MCP server. Security hooks work **because** static permissions define a perimeter. Multi-agent brainstorm works **because** agents have dedicated tools and models.
  37. ---
  38. ## What's Included
  39. | Component | Count | Description |
  40. |-----------|-------|-------------|
  41. | **CLAUDE.md** | 1 | The kernel. Anti-hallucination protocol, confidence levels, security rules, code standards. |
  42. | **Rules** | 2 | Path-scoped conventions: `python.md` and `typescript.md`. Load only when editing matching files. |
  43. | **Skills** | 8 / 32 | Representative subset. Each follows the 5-phase AAPEV pattern. |
  44. | **Agents** | 4 | Safe examples across different domains. |
  45. | **Hooks** | 11 | 9 complete + 2 sanitized (security patterns generalized). |
  46. | **Commands** | 3 | Slash commands: `/agent`, `/docs`, `/review`. |
  47. | **Settings** | 1 | Template with permission structure (adapt to your needs). |
  48. | **Memory** | dir | Empty directory with `.gitkeep`. Claude writes here across sessions. |
  49. ### What's NOT Included
  50. This is a curated subset, not a mirror of a production setup. The full system has 32 skills, more agents, and exact security regex patterns. The hooks `bash-guard` and `write-guard` are **sanitized**: they show what categories of threats to block without exposing exact regex. Adapt them to your threat model.
  51. ---
  52. ## Quick Start
  53. ```bash
  54. # 1. Clone
  55. git clone https://github.com/Aedelon/claude-code-blueprint.git
  56. cd claude-code-blueprint
  57. # 2. Copy to your Claude Code config
  58. cp CLAUDE.md ~/.claude/CLAUDE.md
  59. cp -r rules/ ~/.claude/rules/
  60. cp -r skills/ ~/.claude/skills/
  61. cp -r agents/ ~/.claude/agents/
  62. cp -r hooks/ ~/.claude/hooks/
  63. cp -r commands/ ~/.claude/commands/
  64. # 3. Adapt settings (DO NOT copy blindly -- review permissions first)
  65. # Use settings.template.json as a reference for your own ~/.claude/settings.json
  66. # 4. Install hook dependencies
  67. brew install jq # or: apt install jq
  68. ```
  69. ---
  70. ## Directory Structure
  71. ```
  72. claude-code-blueprint/
  73. ├── README.md
  74. ├── LICENSE # Apache 2.0
  75. ├── CLAUDE.md # The kernel
  76. ├── settings.template.json # Permission structure template
  77. │
  78. ├── rules/
  79. │ ├── python.md # Python conventions (uv, ruff, pytest)
  80. │ └── typescript.md # TypeScript conventions (prettier, vitest)
  81. │
  82. ├── skills/
  83. │ ├── anti-hallucination/SKILL.md # Context7-first verification
  84. │ ├── core-protocols/SKILL.md # Systematic debugging
  85. │ ├── brainstorm/SKILL.md # Multi-agent orchestration
  86. │ ├── code-patterns/SKILL.md # Reference patterns
  87. │ ├── security-audit/SKILL.md # OWASP, secrets, deps
  88. │ ├── uv-workflow/SKILL.md # Python toolchain
  89. │ ├── commit-message/SKILL.md # Git workflow
  90. │ └── research-protocol/SKILL.md # Citations & sources
  91. │
  92. ├── agents/
  93. │ ├── research-synthesizer.md # Academic research
  94. │ ├── midjourney-expert.md # Creative / image generation
  95. │ ├── finance-advisor.md # Wealth management
  96. │ └── prompt-engineer.md # LLM prompt design
  97. │
  98. ├── hooks/scripts/
  99. │ ├── session-start.sh # Project detection, git context
  100. │ ├── session-end.sh # Cleanup
  101. │ ├── user-prompt-secrets.sh # Scan secrets before API
  102. │ ├── bash-guard.sh # SANITIZED: dangerous commands
  103. │ ├── write-guard.sh # SANITIZED: protected files + secrets
  104. │ ├── write-format.sh # Auto-format (prettier/ruff)
  105. │ ├── bash-vuln.sh # npm audit after install
  106. │ ├── posttooluse-failure.sh # Log tool failures
  107. │ ├── stop.sh # Git summary
  108. │ ├── pre-compact.sh # Context preservation
  109. │ └── permission-git.sh # Destructive git warning
  110. │
  111. ├── commands/
  112. │ ├── agent.md # /agent <name>
  113. │ ├── docs.md # /docs <library>
  114. │ └── review.md # /review [file]
  115. │
  116. ├── memory/
  117. │ └── .gitkeep # Claude writes here
  118. │
  119. └── docs/
  120. └── architecture.md # System design notes
  121. ```
  122. ---
  123. ## The 5-Phase Pattern (AAPEV)
  124. Every skill follows the same cognitive discipline:
  125. ```
  126. Phase 1: ASSESS / CLARIFY --> Understand the problem
  127. Phase 2: ANALYZE / RESEARCH --> Search before acting
  128. Phase 3: PLAN / DESIGN --> Propose a plan
  129. Phase 4: EXECUTE / IMPLEMENT --> Apply changes
  130. Phase 5: VALIDATE / VERIFY --> Test the result
  131. ```
  132. This prevents the model from jumping to Phase 4 (code) without understanding (Phase 1), researching (Phase 2), and planning (Phase 3).
  133. ---
  134. ## Build Your Own
  135. ### Adding a Skill
  136. Create `~/.claude/skills/your-skill/SKILL.md`:
  137. ```yaml
  138. ---
  139. name: your-skill
  140. description: |-
  141. What this skill does. MUST BE USED when user asks: "trigger phrases".
  142. allowed-tools:
  143. - Read
  144. - WebSearch
  145. ---
  146. # Your Skill
  147. ## Process
  148. Phase 1: ASSESS ...
  149. Phase 2: ANALYZE ...
  150. Phase 3: PLAN ...
  151. Phase 4: EXECUTE ...
  152. Phase 5: VALIDATE ...
  153. ```
  154. ### Adding an Agent
  155. Create `~/.claude/agents/your-agent.md`:
  156. ```yaml
  157. ---
  158. name: your-agent
  159. model: sonnet # or opus for complex tasks
  160. description: |-
  161. What this agent specializes in.
  162. MUST BE USED when user asks: "trigger phrases".
  163. tools: [Read, Write, WebSearch]
  164. color: "#hex"
  165. ---
  166. Your agent's personality, methodology, and domain knowledge.
  167. ```
  168. ### Adding a Hook
  169. 1. Create the script in `~/.claude/hooks/scripts/your-hook.sh`
  170. 2. Make it executable: `chmod +x your-hook.sh`
  171. 3. Register it in `~/.claude/settings.json` under the appropriate lifecycle event
  172. Claude Code supports **17 lifecycle events**: `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PermissionRequest`, `PostToolUse`, `PostToolUseFailure`, `Notification`, `SubagentStart`, `SubagentStop`, `Stop`, `TeammateIdle`, `TaskCompleted`, `ConfigChange`, `WorktreeCreate`, `WorktreeRemove`, `PreCompact`, `SessionEnd`. This blueprint covers 9 of them.
  173. Hooks support three types:
  174. - **`"type": "command"`** — a shell script (used in this blueprint)
  175. - **`"type": "http"`** — POST JSON to a URL, receive JSON back
  176. - **`"type": "prompt"`** — an LLM sub-agent interprets the event
  177. Key patterns for command hooks:
  178. - Always start with `set -euo pipefail`
  179. - Use `trap ... ERR` for fail-closed behavior on PreToolUse hooks
  180. - Read JSON from stdin: `input=$(cat)`
  181. - Parse with jq: `$(echo "$input" | jq -r '.field')`
  182. ---
  183. ## Sanitized Hooks
  184. The `bash-guard.sh` and `write-guard.sh` hooks contain **generic patterns** instead of exact regex. This is intentional:
  185. - **bash-guard**: Categories of dangerous commands (sudo, rm -rf, fork bombs, obfuscation). Add your own regex patterns.
  186. - **write-guard**: Categories of protected files and secret formats. Add patterns for your specific API keys and cloud providers.
  187. The article explains the categories. This repo gives you the skeleton.
  188. ---
  189. ## Requirements
  190. - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI installed
  191. - `jq` for JSON parsing in hooks
  192. - `prettier` (for JS/TS auto-format hook)
  193. - `ruff` (for Python auto-format hook)
  194. - MCP servers configured in your `settings.json` (context7, fetch, git at minimum)
  195. ---
  196. ## License
  197. Apache 2.0 -- Delanoe Pirard / Aedelon

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.