Feature Request: SessionStart hooks should support automatic skill invocation and file reading
Status Closed — duplicate
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 3 comments · opened Dec 2, 2025 · 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:
AI_ASSISTANT_INSTRUCTIONS.md- Critical workflow instructions, database credentials, deployment commandsopenai-apiskill - Current OpenAI model availability (GPT-5 released Aug 2025, API parameter changes)
Currently, every session requires the user to ask Claude to:
- Read the instructions file
- 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
- Consistency - Every session starts with correct context loaded
- Reduced errors - No risk of Claude using outdated information
- Better DX - Users don't have to remember setup steps
- 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!
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗