Chalk Labs
Need help deploying create-hook?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/tyjpark0317-create-hook
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/create-hook
What's inside
- Skill name
create-hook- Description
- Use when creating, editing, or auditing hooks. Enforces diagnostic message standards, timeout rules, and security patterns. Triggers on "create hook", "modify hook", "edit hook", "improve hook", "add hook".
- License
- MIT
- Instructions
- 242 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
## Create/Modify Hook — Production-Grade Hook Engineering
All hooks are **fail-open** — timeout means silent pass. Quality = system stability.
> bash script based (no Python dependency).
---
## Step 1: Behavior Analysis — What to Block
### 1A: Explicit Request
User specifies the behavior to block → proceed to Step 2.
### 1B: Conversation Analysis
If the request is ambiguous, detect patterns from recent conversation:
- Behaviors the user corrected or reverted
- Repeated mistakes (same hook bypassed 2+ times)
- Frustration signals
Confirm detected patterns with user before proceeding.
---
## Step 2: Hook Design
### Event + Matcher Decision
| Event | Matcher | Purpose |
|-------|---------|---------|
| PreToolUse | Bash | Command blocking/warning |
| PreToolUse | Edit\|Write | File modification control |
| PreToolUse | Agent | Agent spawn control |
| PreToolUse | TeamCreate | Team creation control |
| PreToolUse | TaskUpdate | Task status change control |
| PostToolUse | Bash | Post-commit checks |
| PostToolUse | Edit\|Write | Post-modification audit |
| SubagentStop | (all) | Agent exit report verification |
| Stop | (all) | Session end checks |
| SessionStart | (all) | Session initialization |
### Action Type Decision
| Type | exit code | Behavior | Purpose |
|------|-----------|----------|---------|
| BLOCK | `exit 1` | Stop tool call | Rule violation blocking |
| HARD BLOCK | `exit 2` | Stop tool call | Severe violation blocking |
| WARNING | `exit 0` + stdout | Proceed with tool call | Warning only |
| PASS | `exit 0` (silent) | Proceed with tool call | Normal pass |
> **timeout exceeded = fail-open** — tool call proceeds. Hook is neutralized.
---
## Step 3: Code Writing
### Required Template
```bash
#!/usr/bin/env bash
# Hook: {name} — {one-line description}
# Trigger: {PreToolUse|PostToolUse|SubagentStop|Stop} -> {matcher}
# Action: {BLOCK|HARD BLOCK|WARNING|PASS}
# Created: {YYYY-MM-DD}
INPUT=$(cat)
# === PARSE ===
# Use printf '%s' (shell injection prevention — never echo "$VAR")
FIELD=$(printf '%s' "$INPUT" | jq -r '.tool_input.field // empty')
# === FAST EXIT ===
# Most calls are irrelevant → pass quickly
if [ -z "$FIELD" ]; then
exit 0
fi
# === VALIDATE ===
# Validation logic...
# === BLOCK (4-field diagnostic message) ===
cat >&2 <<EOF
BLOCKED: {one-line summary}
HOOK: {filename}.sh
ATTEMPTED: {what was tried — tool, parameters, target}
REASON: {why blocked — specific rule/Standing Order violated}
FIX: {how to resolve — specific command or steps}
EOF
exit 1
```
### 4-Field Diagnostic Message (Required on BLOCK)
All BLOCK/HARD BLOCK messages must include:
| Field | Purpose | Example |
|-------|---------|---------|
| `BLOCKED:` | One-line summary | "C-Suite spawned without team" |
| `HOOK:` | Which hook | "layer3-gate.sh" |
| `ATTEMPTED:` | What was tried | "Agent(subagent_type=cto, team_name=none)" |
| `REASON:` | Why blocked | "Standing Order #1: All C-Suite must spawn in team" |
| `FIX:` | How to fix | "TeamCreate('exec-cto') then pass team_name" |
### Security Rules
```bash
# DO — use printf '%s'
ATYPE=$(printf '%s' "$INPUT" | jq -r '.tool_input.subagent_type // empty')
# DON'T — never use echo (injection vector)
# ATYPE=$(echo "$INPUT" | jq -r '.tool_input.subagent_type // empty')
# DO — quote all variables
if [ -f "$ROOT/.claude/agents/$AGENT.md" ]; then
# DON'T — never eval/exec external input
# eval "$USER_INPUT"
```
---From tyjpark0317/enterprise-os, MIT.
More from tyjpark0317/enterprise-os
- 0.432score
dev
tyjpark0317
Use as a shortcut for feature-developer work.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
e2e-test-guide
tyjpark0317
Use when writing Playwright E2E tests, integration tests, or browser-based tests.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
board-meeting
tyjpark0317
Use when convening the executive team for strategic decisions, cross-functional analysis, or board-level reporting.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
chairman-call
tyjpark0317
Use when the chairman wants to discuss, challenge, or revise board meeting results with executives.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
grade-vocabulary
tyjpark0317
Use when verifying vocabulary sync, checking domain term consistency, or auditing naming conventions across agent files.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
grade-workflows
tyjpark0317
Use when verifying end-to-end workflow completion, checking if user scenarios run from trigger to final output.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
create-agent
tyjpark0317
Use when creating new agents, editing existing agents, auditing agent quality, or restructuring the agent system.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
create-skill
tyjpark0317
Use when creating new skills, editing existing skills, or evaluating skill effectiveness.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
enhanced-review
tyjpark0317
Use for confidence-based code review with auto-fix cycles.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
execute-plan
tyjpark0317
CEO reads current-state.md and autonomously determines executable tasks, gets chairman approval, then dispatches in parallel.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
grade
tyjpark0317
Use when running a full system evaluation, auditing overall system health, or checking the AI operating system quality.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
grade-agents
tyjpark0317
Use when auditing agents, checking agent configurations, or verifying agent setup quality.
SkillDFreshness: D★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Mar 29, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/tyjpark0317/enterprise-os
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from tyjpark0317
- 0.432score
dev
tyjpark0317
Use as a shortcut for feature-developer work.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
board-meeting
tyjpark0317
Use when convening the executive team for strategic decisions, cross-functional analysis, or board-level reporting.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
chairman-call
tyjpark0317
Use when the chairman wants to discuss, challenge, or revise board meeting results with executives.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
e2e-test-guide
tyjpark0317
Use when writing Playwright E2E tests, integration tests, or browser-based tests.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
create-agent
tyjpark0317
Use when creating new agents, editing existing agents, auditing agent quality, or restructuring the agent system.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
create-skill
tyjpark0317
Use when creating new skills, editing existing skills, or evaluating skill effectiveness.
SkillDFreshness: D★ 1Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get create-hook running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
create-hook skill. Agent Mart. https://agentmart.dev/skills/tyjpark0317-create-hook (last updated 2026-10-24)