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

fix-smart-quotes

v1.0.3

Published

Fix straight quotes to smart quotes in Markdown (DE/EN)

Readme

fix-smart-quotes

Convert straight quotes to proper typographic (“smart”) quotes in Markdown files.

| Language | Before | After | |----------|--------|-------| | German | "text" | „text“ (U+201E / U+201C) | | English | "text" | “text” (U+201C / U+201D) |

Why?

Claude (including Claude.ai, Claude Desktop, and Claude Code) consistently uses straight quotes (") instead of typographic quotes. This applies to both generated text and edits to existing content. The reason: straight quotes are universally compatible. They work in code, terminals, and forms, avoiding encoding issues that can turn smart quotes into question marks.

Other AI assistants behave differently: ChatGPT and DeepSeek typically output smart quotes, while Claude and Gemini use straight quotes.

For prose and documentation, proper typography matters. German and English have distinct quote styles that convey professionalism and readability.

Example - text with proper German quotes:

Sie sagte: „Das ist wichtig.“

After Claude edits or generates text:

Sie sagte: "Das ist wichtig."

This tool restores the correct quotes: either manually via CLI or automatically after each Claude edit via hook.

Installation

npm install -g fix-smart-quotes

Or use directly without installing:

npx fix-smart-quotes file.md

CLI Usage

# Single file
fix-smart-quotes README.md

# Multiple files (shell expands glob)
fix-smart-quotes docs/*.md

Claude Code Hook

Automatically fix quotes after Claude edits Markdown files.

1. Create wrapper script at ~/.claude/hooks/fix-smart-quotes-wrapper.sh:

#!/bin/bash
INPUT=$(cat)
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty')
[ -z "$FILE_PATH" ] && exit 0
[[ ! "$FILE_PATH" =~ \.md$ ]] && exit 0
[ ! -f "$FILE_PATH" ] && exit 0
npx fix-smart-quotes "$FILE_PATH"
exit 0

2. Make executable: chmod +x ~/.claude/hooks/fix-smart-quotes-wrapper.sh

3. Add to ~/.claude/settings.json:

{
  "hooks": {
    "PostToolUse": [{
      "matcher": "Write|Edit",
      "hooks": [{"type": "command", "command": "~/.claude/hooks/fix-smart-quotes-wrapper.sh", "timeout": 30}]
    }]
  }
}

Note: Claude Code passes file paths via stdin JSON, not environment variables. The wrapper script handles this.

Important: After changing settings.json, restart Claude Code. Hook configuration is cached at startup.

Features

  • Auto-detects language via lang: frontmatter or content heuristics
  • Protects technical syntax: code blocks, inline code, HTML attributes, Liquid/Jekyll templates, Kramdown attributes, Markdown links
  • Zero dependencies

License

MIT