A barebones, customizable starter template for Claude Code projects with devcontainer support, custom commands, and comprehensive hook logging for data science analysis.
- Use this template to create a new repository
- Install the Remote-Containers extension
- Open the repository in VS Code
- Select "Reopen in Container" when prompted (or use
Cmd+Shift+P→ "Remote-Containers: Reopen in Container") - Wait for setup to complete (installs dependencies and configures environment)
- Open a terminal in VS Code (
Ctrl+`` orView → Terminal`) - Start Claude Code by running:
claude - Try the example command:
/analyze-project
- Use this template to create a new repository
- Open the repository in Cursor
- Look for the devcontainer notification or use
Cmd+Shift+P→ "Dev Containers: Reopen in Container" - Wait for the container to build and setup to complete
- Open a terminal in Cursor (
Ctrl+`` orView → Terminal`) - Start Claude Code by running:
claude - Try the example command:
/analyze-project
- Pre-configured development environment with Node.js 20
- Automatic setup of tools and dependencies
- Consistent environment across team members
- Security-focused with network restrictions
/analyze-project- Analyze project structure and provide insights- Demonstrates YAML frontmatter, bash execution, and argument handling
- Easy to extend with your own commands
- Comprehensive logging of all Claude Code events (PreToolUse, PostToolUse, UserPromptSubmit)
- JSON format for easy data science analysis
- Built-in analysis tools to understand usage patterns
- Temporal analysis and tool usage statistics
Run the analysis script to gain insights:
# Analyze all logged events
python3 scripts/analyze-logs.py
# Filter by specific tool
python3 scripts/analyze-logs.py --tool "edit_file"
# Filter by event type
python3 scripts/analyze-logs.py --event "PostToolUse"After your devcontainer is built and running:
- Open a terminal in your IDE (
Ctrl+`` orView → Terminal`) - Run the command:
claude - Wait for Claude Code to initialize (first run may take a moment)
- Start chatting or use slash commands like
/analyze-project
claude- Start interactive sessionclaude --help- Show available optionsclaude --version- Check version/help- Show available slash commands (once in interactive mode)
.claude/
├── commands/ # Custom slash commands
│ └── analyze-project.md
└── settings.json # Hook configurations
.devcontainer/
├── devcontainer.json # Container setup
└── post-create.sh # Environment setup script
scripts/
├── log-hook-event.sh # Hook logging script
└── analyze-logs.py # Log analysis tool
logs/ # Generated logs (gitignored)
├── all-hooks.jsonl # All events
└── hooks-YYYY-MM-DD.jsonl # Daily logs
- Create a new
.mdfile in.claude/commands/ - Use YAML frontmatter for configuration:
---
description: Your command description
argument-hint: [optional-args]
allowed-tools: Bash(command:*), FileRead, etc.
---
Your command content here with $ARGUMENTS supportEdit .claude/settings.json to:
- Change which events are logged
- Add custom hook scripts
- Filter by specific tools or patterns
The included Python analysis script provides:
- Tool usage statistics
- Temporal patterns (hourly/daily usage)
- Argument pattern analysis
- Summary reports
- Requires the Remote-Containers extension
- Extensions are pre-configured in
devcontainer.json - Terminal integrates seamlessly with the container
- Built-in devcontainer support (no additional extensions needed)
- Claude Code integration works natively within the container
- All logging and analysis tools work the same way
- Use
Cmd+Shift+P→ "Dev Containers" to access container commands
- Log files are gitignored - they may contain sensitive data
- Use
.claude/settings.local.jsonfor sensitive local configurations - Review custom commands before sharing with team
- DevContainer provides isolation but always use trusted repositories
This template is designed to be forked and customized. Feel free to:
- Add more example commands
- Enhance the logging and analysis tools
- Improve the devcontainer configuration
- Share your customizations with the community
Happy coding with Claude!