Automates version bumping and documentation updates for software projects...
Automates semantic versioning and changelog generation for software projects.
Use this skill when:
The skill uses a Python script that handles all version updates. Basic workflow:
python3 .claude/skills/auto-version/scripts/update_version.py <type>The script follows semantic versioning (MAJOR.MINOR.PATCH):
Ask the user which type applies to their changes.
.claude/skills/auto-version/scripts/update_version.py
# Basic usage (from project root)
python3 .claude/skills/auto-version/scripts/update_version.py <major|minor|patch>
# With explicit project path
python3 .claude/skills/auto-version/scripts/update_version.py patch /path/to/project
package.json
version fieldconfig/guidelines.ts
APP_VERSION constantpublic/manifest.json
version field for PWA metadataREADME.md
[](CHANGELOG.md)MEDICAL_DISCLAIMER.md (if exists)
**Current Version:** X.Y.Z lineCHANGELOG.md
public/ directory
The script categorizes commits using conventional commit patterns:
| Commit Prefix | Category |
|---|---|
| feat, feature | Features |
| fix, bugfix | Bug Fixes |
| break, ! | Breaking Changes |
| docs, doc | Documentation |
| refactor | Refactoring |
| test, spec | Tests |
| chore, build | Chore |
Ask the user what type of change this is:
"¿Qué tipo de cambio es este?"
- Major: Cambios breaking/incompatibles
- Minor: Nuevas features backwards compatible
- Patch: Bug fixes y mejoras menores
Execute the script with the appropriate increment type:
python3 .claude/skills/auto-version/scripts/update_version.py patch
The script will output what was updated:
🔄 Auto-version: Updating project version...
Project: /path/to/project
Increment: patch
Current version: 1.0.0
New version: 1.0.1
✓ Updated package.json: 1.0.0 → 1.0.1
✓ Updated config/guidelines.ts: 1.0.1
✓ Updated public/manifest.json: 1.0.0 → 1.0.1
✓ Updated README.md badge: 1.0.1
✓ Updated MEDICAL_DISCLAIMER.md: 1.0.1
✓ Updated CHANGELOG.md with version 1.0.1
✓ Copied MEDICAL_DISCLAIMER.md to public/
✓ Copied CHANGELOG.md to public/
✅ Version updated successfully to 1.0.1!
Stage and commit the changes:
git add package.json config/guidelines.ts README.md MEDICAL_DISCLAIMER.md CHANGELOG.md public/
git commit -m "chore: bump version to X.Y.Z"
git push
To update version in additional files, edit update_version.py and add new functions following this pattern:
def update_custom_file(project_root: Path, new_version: str) -> bool:
"""Update version in custom_file.ext."""
custom_file = project_root / "custom_file.ext"
if not custom_file.exists():
return False
with open(custom_file, 'r') as f:
content = f.read()
# Add your replacement logic here
pattern = r'Version: [\d.]+'
replacement = f'Version: {new_version}'
new_content = re.sub(pattern, replacement, content)
if new_content != content:
with open(custom_file, 'w') as f:
f.write(new_content)
print(f"✓ Updated custom_file.ext: {new_version}")
return True
return False
Then call the function in main() after the other updates.
To change how commits are categorized, edit the categorize_commit() function in the script.
Ensure the script is executable and at the correct path:
chmod +x .claude/skills/auto-version/scripts/update_version.py
If no commits are found, the script will still update version files but skip CHANGELOG generation. This happens when:
The script will warn and exit if the target version already exists in CHANGELOG.md.
User: "Actualiza la versión, hice un bug fix"
1. Ask: "¿Qué tipo de cambio?" → "patch"
2. Run: python3 .claude/skills/auto-version/scripts/update_version.py patch
3. Review outputs
4. Commit changes
User: "Nueva feature lista, prepara release"
1. Ask: "¿Qué tipo de cambio?" → "minor"
2. Run: python3 .claude/skills/auto-version/scripts/update_version.py minor
3. Review CHANGELOG entry
4. Commit and tag release
User: "Hice cambios breaking, nueva versión major"
1. Ask: "¿Qué tipo de cambio?" → "major"
2. Run: python3 .claude/skills/auto-version/scripts/update_version.py major
3. Review all updated files
4. Commit with breaking changes notes
Script features: