This skill automates software development overnight by leveraging Git hooks to enforce test-driven development (TDD). It ensures that all code changes are fully tested and meet specified quality standards before being committed. This approach allows Claude to work autonomously, building new features, refactoring existing code, or fixing bugs while adhering to a rigorous TDD process.
overnight-dev-coach agent.To prepare the project for overnight development:
```bash
git init
npm install --save-dev jest # Example for Node.js
```
overnight-dev plugin.```bash
/plugin marketplace add jeremylongshore/claude-code-plugins
/plugin install overnight-dev@claude-code-plugins-plus
```
/overnight-setup command to create necessary Git hooks and configuration files.```bash
/overnight-setup
```
To define the task for the overnight session:
```text
Task: Build user authentication with JWT (90% coverage)
Success: All tests pass, 90%+ coverage, fully documented
```
```javascript
// Example test case (Node.js with Jest)
it('should authenticate a user with valid credentials', async () => {
// Test implementation
});
```
```bash
git commit -m "feat: implement user authentication"
```
To allow Claude to work autonomously:
```text
Overnight Dev: Running pre-commit checks...
Running linting...
Linting passed
Running tests...
12 tests failing
Commit blocked!
```
```text
Claude: Fixing test failures in user authentication module.
```
```bash
git commit -m "fix: address test failures in user authentication"
```
To monitor the progress and finalize the session:
```bash
cat .overnight-dev-log.txt
```
```text
7 AM: You wake up to:
```
To automate the setup process, use the overnight-setup.sh script:
./scripts/overnight-setup.sh
To track the progress of the overnight session, use the progress-tracker.py script:
./scripts/progress-tracker.py --log .overnight-dev-log.txt
For detailed configuration options, load:
For best practices on writing effective tests, load:
Available templates:
assets/commit-template.txt - Template for generating commit messages.assets/readme-template.md - Template for generating README files.User request: "Implement JWT authentication with 90% test coverage overnight."
Workflow:
User request: "Refactor the database layer to use the repository pattern overnight."
Workflow:
User request: "Fix the bug in payment processing that causes incorrect amounts to be charged overnight."
Workflow:
overnight-dev-coach agent for guidance and support.Issue: Hooks are not running.
Solution: Make sure the hooks are executable:
chmod +x .git/hooks/pre-commit
chmod +x .git/hooks/commit-msg
Issue: Tests are failing immediately.
Solution: Ensure you have at least one passing test:
npm test # Should see: Tests passed
Issue: Lint errors are blocking everything.
Solution: Enable auto-fix:
{
"autoFix": true
}
Or fix manually:
npm run lint -- --fix
This skill integrates with Git repositories and various testing frameworks. It uses Git hooks to enforce TDD and ensure that all code changes are fully tested. The overnight-dev-coach agent provides guidance and support throughout the process.
# Example integration with Jest (Node.js)
{
"testCommand": "npm test -- --coverage --watchAll=false",
"lintCommand": "npm run lint",
"autoFix": true
}
# Example integration with pytest (Python)
{
"testCommand": "pytest --cov=. --cov-report=term-missing",
"lintCommand": "flake8 . && black --check .",
"autoFix": false
}
```