Feature Request: SessionStart hooks should support automatic skill invocation and file reading

Resolved 💬 3 comments Opened Dec 2, 2025 by kipmcc Closed Dec 6, 2025

Summary

Add support for hooks to automatically invoke skills and read files at session start, allowing Claude to load project-specific context without user intervention.

Use Case

In our project (Aviado health analytics platform), we have:

  1. AI_ASSISTANT_INSTRUCTIONS.md - Critical workflow instructions, database credentials, deployment commands
  2. openai-api skill - Current OpenAI model availability (GPT-5 released Aug 2025, API parameter changes)

Currently, every session requires the user to ask Claude to:

  1. Read the instructions file
  2. Invoke the skill

This is error-prone - if forgotten, Claude may use outdated model information or miss critical project patterns.

Current Workaround (Insufficient)

{
  "hooks": {
    "SessionStart": [{
      "matcher": "startup",
      "hooks": [{
        "type": "command",
        "command": "echo 'Remember to read AI_ASSISTANT_INSTRUCTIONS.md and invoke openai-api skill'"
      }]
    }]
  }
}

This echoes a reminder, but Claude doesn't automatically act on it - the user still has to explicitly ask.

Proposed Solution

Add new hook types for SessionStart:

Option 1: type: "skill"

{
  "hooks": {
    "SessionStart": [{
      "matcher": "startup",
      "hooks": [
        {
          "type": "skill",
          "skill": "openai-api"
        }
      ]
    }]
  }
}

Option 2: type: "readFile"

{
  "hooks": {
    "SessionStart": [{
      "matcher": "startup", 
      "hooks": [
        {
          "type": "readFile",
          "path": "AI_ASSISTANT_INSTRUCTIONS.md",
          "injectAs": "context"
        }
      ]
    }]
  }
}

Option 3: type: "autoExecute" (combined)

{
  "hooks": {
    "SessionStart": [{
      "matcher": "startup",
      "hooks": [
        {
          "type": "autoExecute",
          "actions": [
            { "tool": "Read", "args": { "file_path": "AI_ASSISTANT_INSTRUCTIONS.md" } },
            { "tool": "Skill", "args": { "skill": "openai-api" } }
          ]
        }
      ]
    }]
  }
}

Benefits

  1. Consistency - Every session starts with correct context loaded
  2. Reduced errors - No risk of Claude using outdated information
  3. Better DX - Users don't have to remember setup steps
  4. Project portability - New team members get correct context automatically

Environment

  • Claude Code version: Latest (December 2025)
  • OS: macOS
  • Project type: Full-stack TypeScript/Python with Supabase Edge Functions

Additional Context

This feature would be especially valuable for projects that:

  • Use rapidly evolving APIs (OpenAI models change frequently)
  • Have complex deployment workflows
  • Require database credentials or connection details
  • Have team-specific coding standards

Thank you for considering this enhancement!

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗