Skip to content

About

A macOS app that automatically corrects English grammar in Claude Code prompts

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

English | 日本語

CCLangTutor

CCLangTutor icon
A macOS app that automatically corrects English grammar in your Claude Code prompts.

Features

  • Real-time Grammar Correction - Automatically analyzes your prompts as you use Claude Code
  • 0-100 Scoring System - Get a score for each prompt with color-coded feedback (green/yellow/red)
  • Detailed Explanations - See what's wrong and why, with specific corrections for each error
  • Improvement Advice - Receive suggestions on how to write better English
  • Interactive Chat - Ask follow-up questions about any correction to learn more
  • Multi-Provider Support - Choose between Claude, Gemini, or OpenAI as your AI backend
  • 7 Response Languages - Get explanations in English, Japanese, Spanish, French, German, Chinese, or Korean
  • Automatic Hook Setup - One-click installation of Claude Code hooks

Installation

  1. Download the latest .dmg from Releases
  2. Open the DMG and drag CCLangTutor.app to Applications
  3. Launch the app and click "Install Hooks" when prompted

Configuration

API Key

  1. Open CCLangTutor.app
  2. Go to Settings (⌘,)
  3. Select your preferred AI provider (Claude, Gemini, or OpenAI)
  4. Enter your API key
  5. Click "Save"

The API key is stored securely in macOS Keychain.

Response Language

You can choose the language for correction explanations and chat responses:

  • English (default)
  • 日本語 (Japanese)
  • Español (Spanish)
  • Français (French)
  • Deutsch (German)
  • 中文 (Chinese)
  • 한국어 (Korean)

Note: The target language for corrections is always English. This setting only affects the language of explanations.

Manual Hook Setup

If you prefer to configure hooks manually, add the following to ~/.claude/settings.json:

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "/Applications/CCLangTutor.app/Contents/MacOS/notifier"
          }
        ]
      }
    ]
  }
}

Usage

  1. Launch CCLangTutor.app (it runs in the background)
  2. Use Claude Code as normal
  3. Your prompts will be automatically analyzed and corrections displayed in the app
  4. Click on any correction to see details
  5. Use the chat to ask follow-up questions about the correction

Scoring System

Score Color Meaning
90-100 🟢 Green Excellent - minor or no issues
70-89 🟡 Yellow Good - some improvements needed
0-69 🔴 Red Needs work - significant issues

Slash Commands

When you use slash commands (e.g., /commit message here), only the argument portion is corrected, not the command itself.

Limitations

What gets corrected:

  • Regular prompts typed in the main input (when Claude is idle)
  • Slash command arguments (e.g., /commit fix the bug → "fix the bug" is corrected)

What does NOT get corrected:

  • Messages sent while Claude Code is processing (interrupt messages)
  • Responses to AskUserQuestion tool (including "Other" custom text)
  • Selecting predefined options (these are not user-written text anyway)

This is a limitation of Claude Code's hook system - the UserPromptSubmit hook only fires for regular prompt submissions.

Privacy

All your prompts are sent to the LLM provider you select (Claude, Gemini, or OpenAI) for grammar correction. If you have concerns about sending your prompts to external services, do not use this app.

Correction history is stored locally in ~/Library/Application Support/CCLangTutor/.


Development

Architecture

User prompt → Claude Code Hook (UserPromptSubmit)
                    ↓
            notifier CLI
                    ↓
            pending.json (stored)
                    ↓
            CCLangTutor.app (processes)
                    ↓
            AI API → corrections.json
                    ↓
            SwiftUI displays results

Requirements

Build from Source

git clone https://github.com/Saqoosha/CCLangTutor.git
cd CCLangTutor
./scripts/build.sh Release

# The app is located at:
# build/DerivedData/Build/Products/Release/CCLangTutor.app

Build Commands

./scripts/build.sh Debug      # Debug build
./scripts/build.sh Release    # Release build
./scripts/package_dmg.sh      # Package DMG (includes notarization)
./scripts/release.sh 1.0.0    # Release new version

Project Structure

Sources/
├── CCLangTutor/          # Main app (SwiftUI)
├── CCLangTutorCore/      # Shared models
└── notifier/             # CLI hook

License

MIT

About

A macOS app that automatically corrects English grammar in Claude Code prompts

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages