agentsclimarketplace

Version stamp automation

Skill fabioc-aloha/Alex_Skill_Mall/plugins/documentation/version-stamp-automation

Version numbers in 5+ files WILL drift with manual edits:From its SKILL.md

Install
npx -y skills add fabioc-aloha/Alex_Skill_Mall --skill version-stamp-automation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.2 KB, 548 tokens by cl100k_base, as published. Nobody here has run it

Version Stamp Automation

The Problem

Version numbers in 5+ files WILL drift with manual edits:

  • package.json says 2.1.0
  • README badge says 2.0.0
  • CHANGELOG header says 2.1.0-beta
  • Extension manifest says 2.0.1

The Solution

1. Single Source of Truth

// package.json is the ONE source
{
  "version": "2.1.0"
}

2. Bump Script That Derives All Locations

// scripts/bump-version.cjs
const fs = require('fs');
const path = require('path');

const newVersion = process.argv[2];
if (!newVersion) {
  console.error('Usage: node bump-version.cjs <version>');
  process.exit(1);
}

// Define all version locations
const locations = [
  {
    file: 'package.json',
    pattern: /"version":\s*"[^"]+"/,
    replace: `"version": "${newVersion}"`
  },
  {
    file: 'README.md',
    pattern: /version-v[\d.]+/g,
    replace: `version-v${newVersion}`
  },
  {
    file: 'src/extension.ts',
    pattern: /VERSION\s*=\s*['"][^'"]+['"]/,
    replace: `VERSION = '${newVersion}'`
  }
];

locations.forEach(({ file, pattern, replace }) => {
  const filePath = path.resolve(file);
  if (!fs.existsSync(filePath)) return;
  
  let content = fs.readFileSync(filePath, 'utf8');
  content = content.replace(pattern, replace);
  fs.writeFileSync(filePath, content);
  console.log(`Updated: ${file}`);
});

3. Classify Each Reference

TypeActionExample
Auto-derivableScript updatesREADME badge, package.json
Manually datedLeave aloneCHANGELOG entries, planning docs
Build-timeInject at buildExtension about page

Verification

# After running bump script
grep -rn "2.1.0" . --include="*.json" --include="*.md" --include="*.ts"

# Should see consistent version everywhere (except historical docs)

When to Apply

  • Any project with version in 3+ files
  • Before any release process
  • When you notice drift

Tags

versioning automation documentation devops

Keep looking

Skills are one crate of 326,645. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.