Project Organization
Use this skill when creating new projects, scaffolding packages, or reviewing project structure to ensure consistency with established patterns.
Quick Reference
R packages: See R project patterns Julia packages: See Julia project patterns
Core Principles
Project Root Structure
Every project should have:
project/
├── .claude/ # Claude Code project config (optional)
│ └── CLAUDE.md # Or in project root
├── .github/ # GitHub Actions and templates
│ └── workflows/
├── .pre-commit-config.yaml
├── .gitignore
├── CLAUDE.md # Project-specific instructions
├── LICENSE.md
├── NEWS.md # Changelog
├── README.md # Or README.Rmd for R
└── CITATION.cff # Citation metadata
CLAUDE.md Structure
Every project CLAUDE.md should include:
- Package/Project Overview - What it does, core purpose
- Development Commands - How to test, build, document
- Architecture - Key components and their relationships
- Testing Patterns - Framework, conventions, special considerations
- Code Style - Language-specific guidelines beyond global rules
Template:
# CLAUDE.md
This file provides guidance to Claude Code when working with this repository.
## Package Overview
[Brief description of purpose and core functionality]
## Development Commands
```bash
# Key commands with comments
Architecture
Core Components
- Component: Description
- Component: Description
Testing Patterns
[Framework, conventions, file naming]
Code Style
[Project-specific rules beyond global CLAUDE.md]
### Pre-commit Hooks
All projects use pre-commit for automated quality checks:
```bash
# Install
pip install pre-commit
pre-commit install
# Run manually
pre-commit run --all-files
Common hooks:
- Trailing whitespace removal
- End of file fixing
- Large file checks
- YAML validation
- Language-specific linting and formatting
When to Use This Skill
Activate when:
- Creating a new R or Julia package
- Setting up a research project repository
- Reviewing project structure for consistency
- Adding configuration files to existing projects
- Scaffolding CI/CD workflows
For language-specific patterns, see the reference files.