write-and-commit

Community

Create & commit files, atomically, faster.

Authorcowwoc
Version1.0.0
Installs0

System Documentation

What problem does it solve?

The common workflow of creating a new file, making it executable, staging it, and then committing it involves multiple sequential steps and LLM round-trips, wasting time on routine tasks. This Skill streamlines the process into a single atomic operation, boosting efficiency.

Core Features & Use Cases

  • Atomic File Creation & Commit: Combines writing a new file, setting executable permissions (if needed), staging, and committing into one efficient step.
  • Significant Performance Boost: Achieves 60-75% time savings by reducing LLM round-trips from 4-5 to 2-3.
  • Executable Support: Easily creates executable scripts with a --executable flag.
  • Safety & Recovery: Performs precondition validation and ensures that if the commit fails, the file still exists (staged), allowing for easy recovery.
  • Use Case: When you need to create a new utility script (cleanup-temp.sh) and commit it immediately, use this Skill. It will write the script content, make it executable, and commit it in a single, fast operation, saving you precious development time.

Quick Start

To create an executable script and commit it: cat > /tmp/cleanup-script-$$.sh <<'SCRIPT' #!/bin/bash find /tmp -name "*.tmp" -mtime +7 -delete SCRIPT cat > /tmp/commit-msg-$$.txt <<'MSG' Add temporary file cleanup script MSG /workspace/main/.claude/scripts/write-and-commit.sh
".claude/scripts/cleanup-temp.sh"
"/tmp/cleanup-script-$$.sh"
"/tmp/commit-msg-$$.txt"
--executable

Dependency Matrix

Required Modules

None required

Components

scripts

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: write-and-commit
Download link: https://github.com/cowwoc/styler/archive/main.zip#write-and-commit

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository