npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@theoribbi/claude-code-autocommit

v2.1.0

Published

Autocommit for Claude Code - MCP server and slash command for generating Conventional Commits

Readme

claude-code-autocommit

Generate Conventional Commits messages from git changes in Claude Code.

Two installation methods available:

  • MCP Server - Full integration with tools for analyzing changes, generating messages, and executing commits
  • Slash Command - Lightweight /autocommit command that works directly in Claude Code

Installation

Option 1: Slash Command (Recommended for simplicity)

Install the /autocommit slash command:

# Install globally
npm install -g @theoribbi/claude-code-autocommit

# Add the slash command to your user commands
claude-code-autocommit-slash install

# Or install for a specific project only
claude-code-autocommit-slash install --project

Then use in Claude Code:

/autocommit              # Commit staged changes
/autocommit --all        # Stage all changes and commit
/autocommit "message"    # Commit with custom message

Option 2: MCP Server (Full integration)

The MCP server provides three tools for more granular control over the commit process.

Using npx (recommended)

Add to your settings file (~/.claude/settings.json for global, or .claude/settings.json for project):

{
  "mcpServers": {
    "autocommit": {
      "command": "npx",
      "args": ["-y", "@theoribbi/claude-code-autocommit"]
    }
  }
}

Manual installation

npm install -g @theoribbi/claude-code-autocommit

Then add to your settings file:

{
  "mcpServers": {
    "autocommit": {
      "command": "claude-code-autocommit"
    }
  }
}

Note: After modifying the settings file, restart Claude Code for the changes to take effect.

Slash Command Usage

The /autocommit command analyzes your staged changes and generates a conventional commit message.

/autocommit              # Generate commit for staged changes
/autocommit --all        # Stage all changes first, then commit
/autocommit "fix typo"   # Use custom message instead of generating one

The command will:

  1. Analyze the git diff
  2. Determine the appropriate commit type (feat, fix, docs, etc.)
  3. Detect the scope from directory structure
  4. Generate a descriptive commit message
  5. Show you the proposed message and ask for confirmation
  6. Execute the commit

MCP Server Tools

analyze_changes

Analyzes git changes and returns a token-efficient summary.

Parameters:

  • include_staged (boolean, default: true) - Include staged changes
  • include_unstaged (boolean, default: false) - Include unstaged changes
  • cwd (string, optional) - Working directory

Returns:

  • File paths with status (A/M/D/R) and change counts
  • Total additions/deletions
  • File extensions and top directories
  • Suggested commit type and scope

generate_commit_message

Generates a Conventional Commits message based on the changes.

Parameters:

  • type (string, optional) - Override commit type (feat, fix, docs, etc.)
  • scope (string, optional) - Override scope
  • description (string, optional) - Override description
  • breaking (boolean, default: false) - Mark as breaking change
  • include_staged (boolean, default: true) - Include staged changes
  • include_unstaged (boolean, default: false) - Include unstaged changes
  • cwd (string, optional) - Working directory

Returns:

  • Full commit message
  • Message components (type, scope, description)
  • Confidence level (high/medium/low)

execute_commit

Executes a git commit with the provided message.

Parameters:

  • message (string, required) - The commit message
  • confirmed (boolean, required) - Must be true to execute (safety check)
  • cwd (string, optional) - Working directory

Returns:

  • Success status
  • Commit hash (on success)
  • Error message (on failure)

Type Detection Heuristics

| Pattern | Type | |---------|------| | *.test.ts, __tests__/ | test | | *.md, docs/, README | docs | | .github/workflows/ | ci | | package.json, tsconfig.json | build | | *.css, .prettier* | style | | .gitignore, *.lock | chore | | New files in src/ | feat | | Modifications | fix |

Scope Detection

Scopes are extracted from directory structure:

  • src/auth/login.ts → scope: auth
  • packages/core/ → scope: core
  • Multiple directories → no scope

Package Exports

// MCP Server entry point
import "@theoribbi/claude-code-autocommit/mcp-server"

// Slash command installer
import "@theoribbi/claude-code-autocommit/slash-command"

Uninstall Slash Command

# Remove from user commands
claude-code-autocommit-slash uninstall

# Remove from project commands
claude-code-autocommit-slash uninstall --project

Development

# Install dependencies
npm install

# Build
npm run build

# Run MCP server locally
node dist/mcp/index.js

# Test slash command installer
node dist/slash-command/install.js --help

License

MIT