Skip to content
blocklet-updater logo

Blocklet Updater

blocklet-updater

Creates a new release for a blocklet project by bumping version, building, and bundling. Use when asked to "create a new release", "bump and bundle", or "update blocklet version".

SKILL.md

Full skill instructions

Blocklet Updater

Bumps a blocklet project version and creates a release bundle.

Workflow

1. Version Bump (Smart Detection)

Check for project-specific version update scripts before falling back to blocklet version patch.

1.1 Detect Version Update Method

Check the following in priority order and use the first match:

PriorityDetectionCommand
1Makefile has bump-version targetmake bump-version
2package.json has bump-version scriptpnpm run bump-version
3package.json has version scriptpnpm run version
4lerna.json existslerna version patch --yes
5None of the aboveblocklet version patch (fallback)

Detection commands:

# Priority 1: Check Makefile for bump-version target
if [ -f "Makefile" ] && grep -q "^bump-version:" Makefile 2>/​dev/​null; then
    VERSION_CMD="make bump-version"
fi

# Priority 2: Check package.json for bump-version script
if [ -z "$VERSION_CMD" ] && [ -f "package.json" ]; then
    if cat package.json | jq -e '.scripts["bump-version"]' > /​dev/​null 2>&1; then
        VERSION_CMD="pnpm run bump-version"
    fi
fi

# Priority 3: Check package.json for version script
if [ -z "$VERSION_CMD" ] && [ -f "package.json" ]; then
    if cat package.json | jq -e '.scripts["version"]' > /​dev/​null 2>&1; then
        VERSION_CMD="pnpm run version"
    fi
fi

# Priority 4: Check for lerna.json
if [ -z "$VERSION_CMD" ] && [ -f "lerna.json" ]; then
    VERSION_CMD="lerna version patch --yes"
fi

# Priority 5: Fallback to blocklet version
if [ -z "$VERSION_CMD" ]; then
    VERSION_CMD="blocklet version patch"
fi
1.2 Execute Version Bump

Run the detected command:

$VERSION_CMD

Important: Project-specific scripts (like make bump-version) often:

  • Update version file
  • Auto-generate CHANGELOG.md entries
  • Update multiple package versions in monorepos
  • Call additional tooling scripts

If fails → EXIT with error output.

1.3 Update CHANGELOG (If Exists)

After version bump, verify and fix CHANGELOG.md if needed.

1.3.1 Get Actual Version

First, get the actual version that was set (from blocklet.yml or package.json):

# Get version from blocklet.yml
ACTUAL_VERSION=$(grep -E "^version:" blocklet.yml | sed 's/​version: *//' | tr -d '"'"'" 2>/​dev/​null)

# Fallback to package.json if no blocklet.yml
if [ -z "$ACTUAL_VERSION" ]; then
    ACTUAL_VERSION=$(cat package.json | jq -r '.version' 2>/​dev/​null)
fi
1.3.2 Find CHANGELOG Location
# Common CHANGELOG locations in monorepos
CHANGELOG_PATHS=(
    "CHANGELOG.md"
    "blocklets/​*/​CHANGELOG.md"
    "packages/​*/​CHANGELOG.md"
)

for pattern in "${CHANGELOG_PATHS[@]}"; do
    for file in $pattern; do
        if [ -f "$file" ]; then
            echo "Found: $file"
        fi
    done
done
1.3.3 Validate CHANGELOG Entry

For each CHANGELOG.md found, check if the latest entry matches the actual version:

# Extract first version number from CHANGELOG.md
CHANGELOG_VERSION=$(grep -E "^## \[?[0-9]+\.[0-9]+\.[0-9]+\]?" CHANGELOG.md | head -1 | grep -oE "[0-9]+\.[0-9]+\.[0-9]+")

if [ "$CHANGELOG_VERSION" != "$ACTUAL_VERSION" ]; then
    echo "⚠️ Version mismatch!"
    echo "   CHANGELOG shows: $CHANGELOG_VERSION"
    echo "   Actual version:  $ACTUAL_VERSION"
fi
1.3.4 Fix Version Mismatch

If CHANGELOG version doesn't match actual version, fix it:

  1. If CHANGELOG has a newer entry with wrong version (e.g., script partially ran):

    • Replace the wrong version number with the correct one
  2. If CHANGELOG has no entry for the new version:

    • Add a new entry at the top
# Example fix: Replace wrong version in first heading
sed -i "0,/^## \[*$WRONG_VERSION\]*/​s//## $ACTUAL_VERSION/" CHANGELOG.md
1.3.5 Check Entry Content

After fixing version, check if the entry has content:

# Get content between first ## and second ##
ENTRY_CONTENT=$(sed -n '/^## /,/^## /​p' CHANGELOG.md | sed '1d;$d' | grep -v "^$")

if [ -z "$ENTRY_CONTENT" ]; then
    echo "⚠️ CHANGELOG entry is empty, needs content"
fi
1.3.6 Generate Content for Empty Entry

If entry is empty, generate content based on:

  1. Git commits since last version tag:
# Get commits since last tag
LAST_TAG=$(git describe --tags --abbrev=0 2>/​dev/​null || echo "")
if [ -n "$LAST_TAG" ]; then
    git log $LAST_TAG..HEAD --oneline --no-merges
fi
  1. Categorize by commit type (feat, fix, chore, etc.):
## X.Y.Z (YYYY-MM-DD)

- feat: description of new feature
- fix: description of bug fix
- chore: description of maintenance task
  1. If no meaningful commits found, use AskUserQuestion to ask user for changelog content.
1.3.7 Common CHANGELOG Formats

Detect and follow the existing format:

FormatExample
Keep a Changelog## [1.2.3] - 2024-01-20
Simple with date## 1.2.3 (2024-1-20)
Simple no date## 1.2.3

Date format: Match the existing format in the file (e.g., 2024-01-20 vs 2024-1-20).

2. Build System Detection

Check if package.json exists and contains a build script.

If Build Script Exists

Install dependencies and build:

pnpm install && pnpm run build

If either fails → EXIT with error output.

If No Build Script

Skip build step - project is likely pre-built or static.

3. Entry Point Verification

Locate Output Directory & Entry Point

Find index.html in common locations: dist/ → build/ → out/ → public/ → ./

If not found → EXIT with error message: "No index.html entry point found."

Verify blocklet.yml Main Field

Read blocklet.yml and check the main field:

  • If main points to directory containing index.html → valid
  • If main is misaligned → update it to the correct output directory
  • After any update, inform user of the change

4. Metadata Verification

blocklet meta

If fails → EXIT with error output and suggestions.

5. Bundle Creation

blocklet bundle --create-release

If fails → EXIT with error output.

6. Finalization

Do NOT output any summary or recap after completion. Simply end silently after successful bundle creation. The tool outputs already provide sufficient feedback to the user.

Error Reference

See {baseDir}/​errors.md for all error conditions and suggestions.

Supporting Files

  • errors.md - Error reference
  • examples.md - Workflow examples

{baseDir} resolves to the skill's installation directory.

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View