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

ai-writing-fix-cli

v0.1.1

Published

A CLI tool that detects AI-like expressions in Japanese text using textlint, providing human-readable reports and JSON output for AI tools.

Downloads

7

Readme

AI-Writing Fix CLI

CI License: MIT

A CLI tool that detects "AI-like" expressions in Japanese text using textlint, providing human-readable reports and JSON output for AI tools.

日本語 README

Overview

This CLI tool helps identify and improve AI-generated text patterns in Japanese documents. It uses textlint with specialized rules to detect the following patterns:

  • Mechanical list formatting with emojis
  • Hyperbolic expressions like "revolutionary" or "world's first"
  • Formulaic emphasis patterns
  • Verbose, passive, and abstract technical writing

Perfect for incremental improvement workflows with Claude Code and other AI tools.

Features

  • Zero Configuration - Works immediately without .textlintrc setup
  • JSON Reports - Structured output for AI integration
  • Human-Readable Output - Clear issue reports with suggestions
  • Exit Codes - 0 for clean files, 1 when issues found
  • Comprehensive Tests - Vitest test suite with 100% coverage
  • TypeScript - Type-safe development with modern ES modules

🚀 Quick Start

# Check for AI-like expressions (human-readable)
npx ai-writing-fix-cli document.md

# Output JSON report (for AI integration)
npx ai-writing-fix-cli document.md --json > report.json

Installation

# Run directly with npx (recommended)
npx ai-writing-fix-cli <file> [--json]

# Or install globally
npm install -g ai-writing-fix-cli
ai-fix <file> [--json]

# For development
git clone https://github.com/shinshin86/ai-writing-fix-cli.git
cd ai-writing-fix-cli
npm install

Options

| Option | Description | |--------|-------------| | --json | Output structured JSON for AI tool integration | | --demo | Display usage examples and demo |

Report Format

The --json flag outputs structured JSON:

{
  "file": "document.md",
  "issues": [
    {
      "line": 12,
      "column": 5,
      "rule": "@textlint-ja/ai-writing/no-ai-hype-expressions",
      "message": "Avoid hyperbolic expressions",
      "before": "revolutionary technology",
      "after": null
    }
  ]
}
  • after: null indicates no automatic fix available
  • Exit code 0: No issues found
  • Exit code 1: Issues found (manual correction required)

Claude Code Integration

Perfect for incremental improvement workflows. Follow these steps:

  1. Generate: Claude creates content and saves to draft.md
  2. Check: npx ai-writing-fix-cli draft.md --json > report.json
  3. Improve: Claude processes report.json and fixes issues
  4. Repeat: Continue until exit code 0

Configuration

Default Configuration

The tool works immediately without any setup. If no .textlintrc file exists, it uses built-in AI-writing detection rules:

{
  "rules": {
    "@textlint-ja/preset-ai-writing": true
  }
}

Custom Configuration

Create a .textlintrc file to customize rules:

{
  "rules": {
    "@textlint-ja/preset-ai-writing": true,
    "preset-ja-technical-writing": {
      "preset": {
        "no-doubled-joshi": false
      }
    }
  }
}

Development

# Install dependencies
npm install

# Build TypeScript
npm run build

# Run in development mode (TypeScript directly)
npm run dev test.md --json

# Run tests
npm test

# Run tests in CI mode
npm run test:ci

# Test with sample files
npx . test/fixtures/ai-like.md --json
npx . test/fixtures/clean.md

Textlint Rules

This tool includes rules from @textlint-ja/textlint-rule-preset-ai-writing:

| Rule | Description | |------|-------------| | no-ai-list-formatting | Detects mechanical list formatting with emojis | | no-ai-hype-expressions | Catches hyperbolic expressions like "revolutionary" | | no-ai-emphasis-patterns | Identifies formulaic emphasis patterns | | ai-tech-writing-guideline | Comprehensive technical writing improvements |

CI Integration

Example GitHub Actions workflow:

name: AI Writing Lint
on: [pull_request]
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20' }
      - run: npm ci
      - run: npx ai-writing-fix-cli '**/*.md'

Project Structure

ai-writing-fix-cli/
├── src/
│   └── ai-fix.ts      # TypeScript source code
├── dist/
│   ├── ai-fix.js      # Compiled JavaScript (main entry)
│   └── ai-fix.d.ts    # TypeScript declarations
├── test/
│   └── fixtures/      # Test sample files
│       ├── ai-like.md # File with AI-like expressions
│       └── clean.md   # Clean file for testing
├── ai-fix.test.ts     # TypeScript test suite
├── tsconfig.json      # TypeScript configuration
├── vitest.config.js   # Test configuration
├── .textlintrc        # Linting rules
├── package.json
├── README.md          # This file
└── README.ja.md       # Japanese documentation

License

MIT License - see LICENSE for details.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for your changes
  4. Ensure all tests pass: npm test
  5. Submit a pull request

Links