Skip to main content
hook CX Codex

ai-sdlc — Claude Code hook: what it does, how to install

ai-sdlc — a hook bundle for a six-stage Markdown SDLC in Claude Code. It checks tool calls to block unauthorized file edits and safeguard sensitive project paths.

MIT ★ 1,596 updated 2026-10-29

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/settings.json
Open on GitHub

What ai-sdlc does

The ai-sdlc hooks intercept agent actions right before tool execution. During the PreToolUse event, artifact-gate.sh inspects every Write and Edit call. If an edit lacks a corresponding approved Markdown plan, the hook stops the write operation immediately. It also keeps tasks tagged as low-risk away from sensitive paths.

Terminal execution receives its own boundary: prod-guard.sh listens to Bash tool calls. Meanwhile, session-context.sh fires on SessionStart to prepare the development context, and prompt-nudge.sh triggers on UserPromptSubmit. Without committed plan files, the agent cannot write code.

Setup requires adding the hook definitions into .claude/settings.json. The full plugin bundle also pairs these hooks with 8 skills and 2 read-only subagents.

What it helps with

  • Block source code modifications that lack an approved Markdown plan
  • Prevent low-risk changes from touching sensitive repository paths
  • Guard shell command execution through prod-guard.sh
  • Inject development context automatically upon SessionStart

Example prompts for the agent

  • Edit src/app.ts following the approved task plan
  • Run the build script using the terminal
  • Generate the planning artifact before modifying any source files

How to install ai-sdlc

Manually: put the files in place

.claude/settings.json

The hooks block: event (PreToolUse, PostToolUse, Stop…) → command. Personal ones go to ~/.claude/settings.json

Step by step, with commands for each platform: Claude Code hooks: what they are, where to configure them, how to block a risky command

Questions about ai-sdlc

How to install ai-sdlc in Claude Code?

Add the hooks configuration object directly to .claude/settings.json. Ensure the commands point to the scripts located in ${PLUGIN_ROOT}/hooks/.

What does the ai-sdlc hook bundle do?

It enforces a six-stage SDLC process directly at the tool-call level. The bundle intercepts Bash, Write, and Edit calls while handling prompt submissions and session start events.

How does the artifact gate enforce workflow rules?

When Claude Code attempts a Write or Edit operation, artifact-gate.sh runs first. It verifies whether an approved plan covers the change, stopping unauthorized file writes.

Source text

hooks.codex.json · MIT
Hooks bundle shipped with the ai-sdlc plugin for Claude Code.

Six-stage SDLC in committed Markdown where hooks enforce the loop at the tool-call level: an artifact gate refuses source writes no approved plan covers and keeps a change declared low-risk away from sensitive paths, with 8 skills and 2 read-only subagents.

Triggers on: PreToolUse, UserPromptSubmit, SessionStart.

```json
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Write|Edit",
        "hooks": [
          {
            "type": "command",
            "command": "\"${PLUGIN_ROOT}/hooks/artifact-gate.sh\""
          }
        ]
      },
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "\"${PLUGIN_ROOT}/hooks/prod-guard.sh\""
          }
        ]
      }
    ],
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "\"${PLUGIN_ROOT}/hooks/session-context.sh\""
          }
        ]
      }
    ],
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "\"${PLUGIN_ROOT}/hooks/prompt-nudge.sh\""
          }
        ]
      }
    ]
  }
}

```

© Hieuvu7 · MIT · hashgraph-online/awesome-codex-plugins

Similar hooks

All hooks for Agent setup: memory, context, orchestration →

From the same set391

The whole set →
cc cc — a hook bridge between Claude Code and Codex. It runs reviews, rescue tasks and tracked background jobs from Claude Code inside a Codex session. CX Codex ★ 1,596repo stars babok_analyst babok_analyst is a Claude Code hook bundle that manages the BABOK v3 business analysis agent’s session lifecycle and controls MCP tool execution through approval gates. CX Codex ★ 1,596repo stars archcore archcore is a Claude Code hook that brings Git project context into spec-driven development. It runs at session start, before file edits, and after Archcore document operations. CX Codex ★ 1,596repo stars aiboarding aiboarding is a Claude Code and Codex hook that generates, maintains, compresses, and audits AI-agent onboarding files, keeping AGENTS.md and CLAUDE.md current as the codebase changes. CX Codex ★ 1,596repo stars agent-guard This hook checks tool activity for exposed secrets in Claude Code and Codex. It suits projects that need local checks plus Git and CI safeguards. CX Codex ★ 1,596repo stars a-team a-team is a hook for Claude Code that runs at session start and on clear or compact. It displays team status and loads session instructions. CX Codex ★ 1,596repo stars amazon-ads-create-dsp-campaign amazon-ads-create-dsp-campaign walks an Amazon DSP Performance+ or Brand+ campaign from intake to launch: paused setup, ad groups per tactic, then activation after two separate approvals. CX Codex +1 ★ 1,596repo stars returns-reverse-logistics returns-reverse-logistics equips your AI agent with domain logic for RMA authorization, item grading, disposition economics, and return fraud checks. CX Codex +1 ★ 1,596repo stars

Project sponsors

Companies that keep this analytics open