This repository provides templates and instructions for Claude to initialize professional development standards in any repository.
Agent-init is an information resource, not a decision-making tool.
This repository provides comprehensive documentation and reference materials for Claude CLI to use when setting up projects. Key principles:
-
Information over Implementation - We provide extensive documentation about tools, patterns, and best practices rather than executable scripts that make assumptions.
-
Context-Aware Application - The Claude CLI applying these templates has no prior knowledge about the specific repository. By providing information rather than rigid scripts, Claude can make intelligent decisions based on the actual project context.
-
Maximum Flexibility - Every project is different. We document multiple approaches, tools, and patterns so Claude can choose the most appropriate ones for each situation.
-
Deferred Decision Making - We don't make decisions now about things we can't know. Instead, we provide the information needed to make those decisions when the context is available.
When applying these templates, use the documentation to understand available options and make context-appropriate choices based on:
- The project's existing structure and tools
- The programming languages in use
- The team's stated preferences
- The project's specific requirements
When adding to agent-init, focus on:
- Documenting multiple approaches rather than prescribing one
- Explaining when and why to use different tools
- Providing examples and patterns, not rigid implementations
- Teaching concepts that Claude can adapt to any situation
git submodule add -b stable https://github.com/garywu/agent-init.git external/agent-initgit submodule add -b beta https://github.com/garywu/agent-init.git external/agent-initgit submodule add https://github.com/garywu/claude-init.git external/claude-initSee RELEASES.md for detailed release management information.
When you ask Claude to set up professional development practices, Claude will use these templates to establish:
- Issue-driven development workflow - All work tracked through GitHub issues
- Professional standards - Linting, testing, CI/CD, security policies
- AI-assisted development - CLAUDE.md for session continuity
- Comprehensive documentation - Contributing guidelines, code of conduct
- Automation - Pre-commit hooks, GitHub Actions, semantic versioning
- Multi-stage releases - Beta testing before stable releases
Use the information in this repository to make intelligent decisions based on project context. Here's what to consider:
First, understand what you're working with:
- Empty directory: May need complete initialization including git setup
- Empty repository: Already has git but may lack professional structure
- Existing repository: Has code and possibly some tooling already
This repository provides:
- Templates: Starting points that should be customized for each project
- Documentation: Explanations of tools, patterns, and best practices
- Examples: Multiple approaches to common problems
- Guidelines: When and why to use different solutions
Consider these factors when applying templates:
- Language ecosystem: Different languages have different conventions (npm for JS, pip for Python, cargo for Rust)
- Existing tools: Work with what's already there rather than replacing
- Project size: Solo projects need different processes than team projects
- Domain requirements: Web apps, CLI tools, libraries all have different needs
- CLAUDE.md is essential: Always create this for session continuity
- Issues before implementation: Track work properly
- Respect existing choices: Don't override without good reason
- Document decisions: Explain why you chose specific approaches
- Progressive enhancement: Start simple, add complexity as needed
templates/
βββ .github/
β βββ ISSUE_TEMPLATE/ # Bug report, feature request, etc.
β βββ workflows/ # GitHub Actions CI/CD
β β βββ ci.yml # Continuous integration
β β βββ release-beta.yml # Beta release workflow
β β βββ release-stable.yml # Stable release workflow
β βββ pull_request_template.md
βββ scripts/
β βββ session/ # Session management tools
β β βββ session-start.sh
β β βββ session-end.sh
β β βββ session-status.sh
β β βββ session-log.sh
β βββ setup-github-labels.sh # Standardized label system
βββ docs/ # Documentation templates
β βββ astro.config.mjs # Astro documentation site
β βββ package.json # Docs dependencies
βββ CLAUDE.md # AI session tracking
βββ CONTRIBUTING.md # Contribution guidelines
βββ SECURITY.md # Security policy
βββ Makefile # Common development tasks
βββ .pre-commit-config.yaml # Code quality hooks
βββ .editorconfig # Editor configuration
βββ .gitignore # Comprehensive ignore patterns
βββ .yamllint # YAML linting rules
βββ .releaserc.json # Semantic release config
βββ README.md # Project template
Claude-init includes an intelligent EditorConfig system that eliminates indentation conflicts across different project types:
The system provides project-type-specific EditorConfig templates that prevent all pre-commit hook failures:
templates/editorconfig-variants/
βββ .editorconfig-web # 2-space for frontend projects
βββ .editorconfig-infrastructure # 4-space for systems/DevOps
βββ .editorconfig-backend # 4-space for server applications
βββ .editorconfig-fullstack # Language-specific rules
βββ .editorconfig-library # Ecosystem-appropriate standards
Claude CLI can automatically detect project type and apply the correct configuration:
- Web Projects: React, Vue, Angular β 2-space indentation
- Infrastructure: Docker, Terraform, shell scripts β 4-space for scripts
- Backend: Python, Go servers β 4-space following language standards
- Full-Stack: Mixed rules based on file location and type
- Libraries: Follows ecosystem conventions
- Automatic Detection:
scripts/setup-editorconfig.shanalyzes project and applies correct template - Evolution Support: Handles project growth (e.g., web β full-stack)
- Conflict Resolution: Eliminates global vs project-specific indentation conflicts
- Claude CLI Integration: Provides exact commands for zero-error operation
Agent-init includes a standardized GitHub label system for consistent issue tracking:
# Basic labels for any project
./scripts/setup-github-labels.sh
# With platform-specific labels
./templates/github-labels/setup-with-platforms.sh
# For dotfiles projects
./templates/github-labels/setup-dotfiles-labels.shThe standardized label set includes:
- Issue Types: bug, enhancement, documentation, question, chore, refactor
- Priority Levels: critical, high, medium, low
- Status: blocked, in-progress, needs-review, help wanted
- Categories: security, performance, testing, ci-cd, dependencies
- Size Labels: xs, s, m, l, xl (for PRs)
Optional extensions available for:
- Platform-specific labels (macos, linux, windows, etc.)
- Tool-specific labels (docker, kubernetes, npm, etc.)
- Shell-specific labels (bash, zsh, fish, powershell)
See templates/github-labels/README.md for customization options.
- Claude Decision Matrix - Instant patterns for project type detection
- Project Evolution Patterns - Handles growing complexity
- Claude CLI Integration - Zero-error commands and patterns
- Master Config - YAML-based rules for quick reference
Our documentation captures real-world debugging experiences and hard-won knowledge:
- Documentation Index - Start here for navigation and overview
- Project Structure Patterns - Organization best practices
- Environment Adaptation Patterns - CI, platform, and context handling
- Interactive CLI Tools - fzf, gum, and UX enhancement tools
- Linting and Formatting Guide - Multi-language reference
- Testing Framework Guide - Comprehensive testing patterns
- GitHub Actions Multi-Platform - CI/CD across OS platforms
- Documentation Site Setup - Astro/Starlight lessons learned
- Release Management Patterns - Semantic versioning automation
- Error Handling Patterns - Recovery and rollback strategies
- ShellCheck Best Practices - Shell script static analysis
- Building Validation Systems - Environment validation frameworks
- Python Environment Setup - Virtual environments and pipx
- Zero-Out Spacing Methodology - Systematic approach to pixel-perfect layouts
- UI Principles from Feedback - 23 battle-tested UI/UX principles
- XState Patterns - State machine patterns for complex UI logic
- Tailwind v4 Migration Guide - Lessons from alpha adoption
- Routing Architecture Patterns - File-based vs programmatic routing
- Database Evolution Patterns - From simple schemas to knowledge graphs
- AI-Optimized Development Guide - Structuring code for AI collaboration
- Debugging and Troubleshooting - Common issues and solutions
- Learning from Mistakes - How we capture debugging knowledge
- Claude Templates Reference - Examples and patterns for Claude
- 3.5 hours debugging Astro β Documented β 5 minutes for you
- Platform-specific CI failures β Documented β Avoid completely
- Complex test frameworks β Documented β Copy proven patterns
These tools are pre-installed on the system and can greatly enhance Claude CLI's capabilities:
rg(ripgrep) - Ultra-fast searchfd- User-friendly findag- Silver searcherfzf- Fuzzy finderbroot- Interactive tree navigation
bat- Better cat with syntax highlightingeza- Better ls with colors/iconssd- Better sed for find/replacejq/yq- JSON/YAML processing
gh- GitHub CLI (ESSENTIAL for issue/PR management)lazygit- Terminal UI for gitdelta- Better git difftig/gitui- Git interfaces
tokei- Count lines of codehyperfine- Benchmarking toolwatchexec- Run commands on file changepre-commit- Git hook framework
- Always start with CLAUDE.md - Document the session and plan
- Create issues before code changes - Track all work
- Use GitHub CLI (
gh) - For issue and PR management - Run linters before committing - Maintain code quality
- Document as you go - Keep everything up to date
When contributing to this repository, remember our core principle: provide information, not prescriptions.
- Multiple approaches: Document different ways to solve problems
- Context guides: Explain when to use which approach
- Tool documentation: How tools work, not just commands
- Pattern libraries: Common patterns with explanations
- Decision trees: Help Claude make intelligent choices
- Rigid scripts: That assume one way is right
- Hardcoded values: That won't work everywhere
- Single solutions: Without alternatives
- Assumptions: About project structure or preferences
Instead of:
# Bad: Prescriptive script
npm install -g eslint prettier
echo '{"extends": "airbnb"}' > .eslintrcProvide:
## JavaScript Linting Options
1. **ESLint** - Highly configurable, many presets available
- Popular configs: airbnb, standard, recommended
- When to use: Most JavaScript projects
- Considerations: Some teams have strong preferences
2. **Biome** - Fast, all-in-one formatter and linter
- When to use: New projects wanting simplicity
- Considerations: Less ecosystem support
[Include examples, trade-offs, and integration guides]This empowers Claude to make appropriate choices based on actual project context.
This repository embodies a key principle: Every debugging session is a learning opportunity.
- Experience Problems - We hit real issues in real projects
- Solve Through Debugging - Sometimes taking hours to find solutions
- Document Everything - Including what didn't work and why
- Share the Knowledge - So you can avoid our pain
-
Astro Documentation Build (Issue #15)
- 3.5 hours debugging missing pages
- Root cause:
astro syncrequirement not documented - Solution documented in Documentation Site Setup
-
Cross-Platform CI Failures
- Multiple hours debugging package-lock.json issues
- Platform-specific behaviors on macOS vs Linux
- Solutions in GitHub Actions Guide
-
Test Framework Development
- Iterative refinement over many projects
- Patterns for handling CI limitations
- Complete framework in Testing Guide
Without claude-init: Spend hours debugging common problems With claude-init: Find solutions in minutes
Every guide represents hours of debugging condensed into minutes of reading.