Skip to content
Content
Hook

Hooks

What meigen-ai-design-mcp runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
meigen-ai-design-mcp
1.7k3 skills3 agents4 commands1 hook
+1
Install
> /plugin marketplace add jau123/MeiGen-AI-Design-MCP
> /plugin install meigen@meigen-marketplace

Ships with meigen-ai-design-mcp. Installing the plugin gets these hooks.

What fires, and when

SessionStart

Fires once when a session begins, and again after a context compaction. It is where a plugin sets up its environment, or restores state the compaction dropped.

  • Matchesstartup${CLAUDE_PLUGIN_ROOT}/hooks/check-config.sh
Read hooks/hooks.json

Where it lives

  • hooks/check-config.shRunsGitHub
    Read the script
    #!/bin/bash
    # MeiGen Plugin โ€” SessionStart config check
    # Show setup guide on first launch if no API key is configured
    
    CONFIG_FILE="$HOME/.config/meigen/config.json"
    
    has_env_config() {
      [ -n "$MEIGEN_API_TOKEN" ] || [ -n "$OPENAI_API_KEY" ]
    }
    
    has_file_config() {
      [ -f "$CONFIG_FILE" ]
    }
    
    if has_env_config || has_file_config; then
      exit 0
    fi
    
    cat << 'EOF'
    MeiGen visual creative plugin loaded.
    
    No API key configured. Free features (inspiration search, prompt enhancement) are available without configuration.
    To enable image generation, run: /meigen:setup
    EOF
    

Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.

Ships withmeigen-ai-design-mcp

Supports GPT Image 2, Seedance & ComfyUI, with a 1,400+ prompt library, carefully crafted hooks and a multi-task orchestration system

Get the whole plugin