Skip to content

Add Claude AI integration with hooks and settings scaffolding#7

Merged
jalexw merged 2 commits into
mainfrom
claude/scaffold-claude-folder-jcRvW
May 11, 2026
Merged

Add Claude AI integration with hooks and settings scaffolding#7
jalexw merged 2 commits into
mainfrom
claude/scaffold-claude-folder-jcRvW

Conversation

@jalexw

@jalexw jalexw commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds Claude AI integration to the project scaffolding system by creating a .claude folder with configuration files and executable hooks that run during Claude sessions.

Key Changes

  • New Claude templates: Added two template files for Claude integration:

    • settings.json.ts: Generates Claude settings configuration with SessionStart hooks
    • install-deps-in-fresh-environment.sh.ts: Bash script that installs dependencies if node_modules doesn't exist
  • Scaffolding function: Implemented scaffoldClaudeFolder() that:

    • Creates .claude/hooks directory structure
    • Writes the settings configuration file
    • Writes and makes the hook script executable (chmod 755)
  • Integration:

    • Added Claude scaffolding to the main scaffold() function
    • Updated imports to include chmodSync for file permissions
    • Added .claude/settings.local.json to .gitignore for local overrides

Implementation Details

  • The hook script uses bun install for dependency management
  • The settings configuration uses a matcher-based hook system that triggers on SessionStart
  • File permissions are properly set to make the bash script executable
  • The scaffolding follows the existing pattern used for other template types (Cypress, etc.)

https://claude.ai/code/session_01KTy1ELU3hDts5i2EWZ6bib

claude added 2 commits May 11, 2026 13:02
Adds a .claude/settings.json and .claude/hooks/install-deps-in-fresh-environment.sh
to scaffolded projects so Claude Code web sessions auto-install dependencies on
fresh checkouts. Also gitignores .claude/settings.local.json.
@jalexw jalexw self-assigned this May 11, 2026
@jalexw jalexw merged commit babb97c into main May 11, 2026
2 checks passed
@jalexw jalexw deleted the claude/scaffold-claude-folder-jcRvW branch May 11, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants