Automates project setup with best practices, including pre-commit hooks, linting, formatting, and boilerplate. Runs when creating new projects, when configuration files are missing, or when setting up a development environment. Ensures quality tooling from the start.
You are activating project setup automation. Your role is to establish best practices, quality tooling, and proper configuration for new or existing projects.
This skill activates when:
Start with essentials, add more as needed:
Check what exists:
ls -la # Check for config files
git status # Check Git state
Identify gaps:
.gitignore present?.editorconfig for consistency?Generate appropriate ignore patterns:
Ensure consistent formatting across editors:
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.py]
indent_size = 4
[*.md]
trim_trailing_whitespace = false
Linting & Formatting:
Configuration (pyproject.toml):
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W"]
[tool.pyright]
typeCheckingMode = "basic"
Linting & Formatting:
Configuration:
// .prettierrc
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5"
}
// .eslintrc.json
{
"extends": ["eslint:recommended"],
"env": {
"node": true,
"es2021": true
}
}
Pre-commit runs checks automatically before each commit.
pip install pre-commit
pre-commit install
Python Project:
repos:
# Universal checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-merge-conflict
- id: check-added-large-files
args: ["--maxkb=500"]
# Python: Ruff (linting + formatting)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
# Python: Type checking
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.338
hooks:
- id: pyright
# Security: Detect secrets
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
args: ["--baseline", ".secrets.baseline"]
JavaScript/TypeScript Project:
repos:
# Universal checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-merge-conflict
- id: check-added-large-files
# JavaScript: Prettier
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
types_or: [javascript, jsx, ts, tsx, json, yaml, markdown]
# JavaScript: ESLint
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.54.0
hooks:
- id: eslint
files: \.[jt]sx?$
types: [file]
# Security
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
For existing projects, create baseline to avoid flagging existing issues:
# Create secrets baseline (won't flag existing patterns)
detect-secrets scan > .secrets.baseline
# Run pre-commit on all files
pre-commit run --all-files
Create or update README.md with:
Essential Files:
requirements.txt or pyproject.toml.python-version (for version pinning)pytest.ini or pyproject.toml (test config)Virtual Environment:
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt
Essential Files:
package.jsontsconfig.json (TypeScript).nvmrc (Node version)Install Dependencies:
npm install
# or
yarn install
Essential Files:
Cargo.tomlrustfmt.tomlclippy.tomlSetup:
cargo build
cargo fmt
cargo clippy
Essential Files:
go.mod.golangci.ymlSetup:
go mod download
go fmt ./...
go vet ./...
Create comprehensive setup:
project/
├── .gitignore
├── .editorconfig
├── .pre-commit-config.yaml
├── pyproject.toml
├── README.md
├── requirements.txt
├── requirements-dev.txt
├── src/
│ └── project/
│ └── __init__.py
└── tests/
└── __init__.py
project/
├── .gitignore
├── .editorconfig
├── .pre-commit-config.yaml
├── .prettierrc
├── .eslintrc.json
├── package.json
├── tsconfig.json
├── README.md
├── src/
│ └── index.ts
└── tests/
└── index.test.ts
Specs/PreCommitHooks.mdSpecs/ProjectStructure.md~/.amplihack/.claude/templates/These are essential for all projects:
.gitignore - Prevent committing unwanted files.editorconfig - Consistent formattingWhen multiple developers:
When shipping to users:
User: "I'm starting a new Python project for a REST API."
Setting Up Projects Skill:
Great! Let me set up a solid foundation for your Python REST API project.
## Setup Plan
I'll create:
1. Project structure with best practices
2. Pre-commit hooks for automated quality
3. Python configs (ruff, pyright)
4. Git ignore patterns
5. README template
## Project Structure
Creating:
api-project/ ├── .gitignore # Ignore patterns ├── .editorconfig # Editor consistency ├── .pre-commit-config.yaml # Pre-commit hooks ├── pyproject.toml # Python config + dependencies ├── README.md # Documentation ├── requirements.txt # Production dependencies ├── requirements-dev.txt # Development dependencies ├── src/ │ └── api/ │ ├── init.py │ ├── main.py # FastAPI app entry │ └── routers/ # API routes ├── tests/ │ ├── init.py │ └── test_main.py └── .env.example # Environment template
## Quality Tooling
Installing:
- **Ruff**: Fast linting + formatting
- **Pyright**: Type checking
- **Detect-secrets**: Prevent credential leaks
- **Pre-commit**: Automated checks
## Pre-commit Hooks
Configured to run on every commit:
- Trailing whitespace removal
- File ending fixes
- YAML/JSON validation
- Large file detection
- Ruff linting + formatting
- Type checking with pyright
- Secret detection
## Setup Instructions
```bash
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements-dev.txt
# Install pre-commit hooks
pre-commit install
# Run initial check
pre-commit run --all-files
Ready to create these files?
## Quality Checklist
Before completing setup:
- [ ] All essential configs present
- [ ] Pre-commit hooks installed and tested
- [ ] README documents setup process
- [ ] .gitignore covers common patterns
- [ ] Quality tooling configured
- [ ] Dependencies documented
- [ ] Example .env file provided (no secrets!)
- [ ] Tests directory created
## Common Mistakes to Avoid
### 1. No .gitignore
**Problem**: Commits unwanted files (node_modules, .env, etc.)
**Fix**: Create comprehensive .gitignore first
### 2. Inconsistent Formatting
**Problem**: Merge conflicts from formatting differences
**Fix**: Set up Prettier/Black and .editorconfig
### 3. No Pre-commit Hooks
**Problem**: Issues caught late in CI or code review
**Fix**: Install pre-commit hooks from start
### 4. Hardcoded Secrets
**Problem**: Credentials committed to Git
**Fix**: Use .env files + detect-secrets hook
### 5. Missing Type Checking
**Problem**: Type errors caught at runtime
**Fix**: Enable TypeScript/Mypy from start
### 6. No Documentation
**Problem**: New developers struggle with setup
**Fix**: Maintain clear README with setup steps
## Success Criteria
Good project setup:
- Developer can clone and run in <5 minutes
- Quality checks run automatically
- Consistent formatting across team
- No secrets in repository
- Clear documentation
- Minimal friction for contributors
## Related Capabilities
- **Skill**: "Architecting Solutions" for design decisions
- **Skill**: "Reviewing Code" for quality validation
- **Agent**: Builder agent for code generation
- **Documentation**: `Specs/PreCommitHooks.md`
- **Templates**: `~/.amplihack/.claude/templates/`
---
Remember: Time spent on setup saves exponentially more time fixing avoidable issues later. Start with quality automation from day one.
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer