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-story

v1.4.2

Published

Automatic conversation history manager for Claude Code. Auto-saves all Claude conversations to markdown files with SQLite database tracking, just like SpecStory for Cursor.

Downloads

96

Readme

Claude Story

Automatic conversation history manager for Claude Code. Auto-saves all Claude conversations to markdown files with SQLite database tracking, just like SpecStory for Cursor.

npm version npm downloads Tests Coverage Security

🚀 Quick Start

# Install globally from npm
npm install -g claude-story

# Start monitoring (run once)
claude-story start

# Check status
claude-story status

That's it! Claude Story will now automatically save all your Claude Code conversations to .claude-story/ directories in each project.

🧪 Want to verify security? Run npm test after cloning to see all 32 security tests pass!

✨ Features

  • 🤖 Automatic Monitoring - Detects all Claude Code conversations without manual setup
  • 📁 Project Auto-Detection - Creates .claude-story/ directories in each project automatically
  • 💾 SQLite Database - Stores conversation metadata with unique IDs and timestamps
  • 📄 Markdown Export - Auto-exports conversations to readable markdown files
  • 🔍 Cross-Project Search - Compatible with MCP servers for enhanced search capabilities
  • ⚡ Real-time Sync - Conversations saved as you chat with Claude
  • 🙈 Git Integration - Automatically adds .claude-story/ to .gitignore when created

🎯 How It Works

Claude Story monitors the ~/.claude/projects/ directory where Claude Code stores conversation data. When you use Claude Code in any project, it automatically:

  1. Detects the conversation in real-time
  2. Creates a .claude-story/ directory in your project
  3. Saves the conversation to a SQLite database
  4. Exports to markdown files in history/ folder

📂 File Structure

After installation, your projects will have:

your-project/
├── .claude-story/
│   ├── conversations.db     # SQLite database
│   ├── history/             # Markdown exports
│   │   ├── 2025-01-15T10-30-45Z-building-new-feature.md
│   │   └── 2025-01-15T14-22-10Z-debugging-issue.md
│   └── .what-is-this.md     # Documentation

🛠 Commands

# Start monitoring (runs continuously)
claude-story start
# or
cs start

# Check detection status  
claude-story status
# or  
cs status

# Stop monitoring
claude-story stop
# or
cs stop

# Show help
claude-story help
# or
cs help

📦 Installation

Claude Story is available as an npm package:

npm install -g claude-story

🔧 Requirements

  • Node.js >= 16.0.0
  • Claude Code installed and used at least once
  • macOS/Linux (Windows support coming soon)

🆚 Claude Story vs SpecStory

| Feature | SpecStory (Cursor) | Claude Story (Claude Code) | |---------|-------------------|---------------------------| | Auto-detection | ✅ | ✅ | | SQLite database | ✅ | ✅ | | Markdown export | ✅ | ✅ | | Project directories | .specstory/ | .claude-story/ | | Setup required | None | claude-story start |

🔍 MCP Server Integration

Claude Story outputs standard markdown files that can be indexed by any MCP (Model Context Protocol) server for enhanced search and retrieval across projects. The organized file structure makes it easy to integrate with existing workflow tools.

🚨 Security & Privacy

Claude Story has been thoroughly security-tested and hardened:

🔒 Security Features

  • Local only - All data stays on your machine
  • No network requests - Works completely offline
  • Path validation - Prevents directory traversal and symlink escape attacks
  • Content sanitization - Automatically redacts API keys, tokens, and passwords
  • Rate limiting - Protects against resource exhaustion attacks
  • JSON size limits - Prevents DoS via oversized payloads
  • SQL injection protection - Uses parameterized queries exclusively

🧪 Security Testing

  • 48 comprehensive unit tests covering all security functions
  • Memory exhaustion testing with large file inputs
  • Symbolic link escape testing for directory traversal prevention
  • TOCTOU race condition testing for file system attacks
  • Property-based testing with thousands of random inputs
  • Performance stress testing under adversarial conditions

🛡️ Vulnerability Mitigations

  • Directory Traversal: Blocked via path validation and symlink resolution
  • Symlink Attacks: Prevented using fs.realpathSync() resolution
  • TOCTOU Races: Mitigated through parent directory validation
  • Content Exposure: Sensitive data automatically sanitized
  • Resource Exhaustion: Rate limiting and size constraints applied
  • Code Injection: No dynamic code execution or shell commands

Run npm test to verify all security tests pass.

📝 License

MIT © ryanriggin & claude code

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Install dependencies: npm install
  4. Run tests: npm test
  5. Run tests with coverage: npm run test:coverage
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

🧪 Testing

Claude Story includes a comprehensive test suite covering security, database operations, and configuration management.

Test Coverage:

  • 24 passing tests across 3 test suites
  • 34% overall coverage with focused testing on critical security functions
  • 85% database coverage - core functionality thoroughly tested
  • 81% config coverage - configuration management validated

Test Categories:

  • Security Tests: Path validation, content sanitization, rate limiting
  • Database Tests: Conversation lifecycle, exports, message handling
  • Config Tests: Configuration management and persistence

Development Scripts

npm test              # Run all security tests
npm run test:watch    # Run tests in watch mode
npm run test:coverage # Run tests with coverage report
npm start             # Start the daemon
npm run status        # Check daemon status

🐛 Issues

Found a bug? Report it here


Made with ❤️ for the Claude Code community