SuperAPI AI Directory

push-workflow

Office & productivity

View repository

Updated 10-16 06:45

About this skill

Push Workflow

This repository uses lefthook for pre-commit and pre-push checks. Follow this workflow to avoid hook failures.

Lefthook Checks

pre-commit: Security Check

Runs Claude to review the staged diff for:

  • Hardcoded API keys, passwords, tokens
  • Dangerous functions (eval, exec, system calls)
  • SQL injection, XSS vulnerabilities
  • Personally identifiable information (PC names, usernames)

Proactive handling: Before committing, review own changes for these issues. If any are found, fix them before staging.

pre-push: Version Check

Runs bun ./scripts/check-version-update.ts. For each plugin with changed files, verifies that .claude-plugin/marketplace.json has an updated version for that plugin entry.

This is the most common failure point.

Workflow

Before Committing

  1. Review staged changes for security issues (secrets, dangerous patterns)
  2. If plugin files were modified, proceed to version bump steps below before committing

Version Bump Procedure

When files under plugins/<name>/ have been modified:

  1. Identify which plugins have changes:

    git diff --name-only origin/master HEAD
    

    Filter for paths starting with plugins/<name>/

  2. For each changed plugin, bump the version field in .claude-plugin/marketplace.json

    • Use semver patch bump (e.g., 0.1.4 -> 0.1.5) unless the change warrants minor/major
    • New features: minor bump (e.g., 0.1.4 -> 0.2.0)
    • Breaking changes: major bump
  3. Run version sync:

    bun ./scripts/sync-versions.ts
    

    This copies versions from marketplace.json to each plugins/*/plugin.json

  4. Stage and commit the version changes together with the feature changes, or as a separate commit

Before Pushing

Verify all changed plugins have version bumps:

bun ./scripts/check-version-update.ts

If this fails, go back to the version bump procedure.

Commit Message Convention

Follow the existing convention visible in git log:

feat(<plugin-name>): <description>
fix(<plugin-name>): <description>
refactor(<plugin-name>): <description>
chore(<plugin-name>): <description>

Quick Reference

Step Action Command
1 Check changed plugins git diff --name-only origin/master HEAD
2 Bump version in marketplace.json Edit .claude-plugin/marketplace.json
3 Sync to plugin.json bun ./scripts/sync-versions.ts
4 Verify bun ./scripts/check-version-update.ts
5 Commit & Push git add . && git commit && git push