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

@claude-tools-i-use/ai-conflict-sync

v0.1.1

Published

Prevent AI coding tools from editing files with unsaved changes in your IDE

Readme

ai-conflict-sync

Prevent AI coding tools from editing files with unsaved changes in your IDE.

The Problem

AI coding tools like Claude Code operate in the terminal, unaware of your IDE state. They frequently edit files you have open with unsaved changes, causing conflicts and lost work.

The Solution

ai-conflict-sync creates a bridge between your IDE and AI tools:

  1. Watch Mode: Monitors files you're editing and creates lock markers
  2. Check Mode: AI tools can check if a file is safe to edit
  3. Hook Mode: Integrates with git pre-commit and AI tool hooks

Installation

npm install -g ai-conflict-sync

Usage

Start the Watcher Daemon

# Watch current directory for file changes
acs watch

# Watch specific directories
acs watch src/ lib/

# Run in background
acs watch --daemon

Check if Files are Safe to Edit

# Check a single file
acs check src/index.ts

# Check multiple files
acs check src/*.ts

# Exit codes: 0 = safe, 1 = conflicts found

Manual Lock/Unlock

# Mark a file as being edited
acs lock src/important.ts

# Release the lock
acs unlock src/important.ts

# List all locked files
acs list

Integration with Claude Code

Add to your CLAUDE.md:

Before editing any file, run: acs check <filepath>
If the check fails, ask the user to save their changes first.

Or use the Claude Code hook (in ~/.claude/hooks.json):

{
  "pre_edit": {
    "command": "acs check $FILE",
    "on_fail": "abort"
  }
}

How It Works

  1. File Watching: Uses chokidar to detect file modifications
  2. Lock Files: Creates .acs-lock markers in a temp directory
  3. Staleness Detection: Compares file mtime with last known state
  4. IDE Integration: Can read VS Code's workspace state (optional)

Lock File Format

Locks are stored in ~/.ai-conflict-sync/locks/:

{
  "file": "/path/to/file.ts",
  "lockedAt": "2026-01-04T12:00:00Z",
  "lastMtime": 1704369600000,
  "reason": "file_modified"
}

Configuration

Create ~/.ai-conflict-sync/config.json:

{
  "watchPaths": ["~/projects"],
  "ignorePaths": ["node_modules", ".git", "dist"],
  "lockTimeout": 300,
  "daemon": false
}

Commands

| Command | Description | | ---------------------- | ------------------------------- | | acs watch [paths...] | Start watching for file changes | | acs check <file> | Check if file is safe to edit | | acs lock <file> | Manually lock a file | | acs unlock <file> | Release a lock | | acs list | List all active locks | | acs clear | Clear all locks | | acs status | Show daemon status |

License

MIT