Skip to content

itzCozi/nofingdashes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nofingdashes

AI coding assistant rules to stop em dashes and double dashes from infecting your codebase. Works with GitHub Copilot, Cursor, Claude Code, and 40+ other AI coding tools.

What's Included

File Purpose
/cleandashes Slash command that scans your codebase and fixes all em dashes, en dashes, and sloppy double-hyphen separators
no-dashes (auto-loaded) Always-on rules that prevent your AI from generating em dashes and double-hyphen separators in the first place
no-dashes.instructions.md VS Code-specific always-on instruction file (guaranteed on every prompt)

Installation

Option 1: npx skills (Recommended)

Works with Copilot, Cursor, Claude Code, Codex, and 40+ other tools.

# Install globally (applies to all projects)
npx skills add itzCozi/nofingdashes -g

# Or install to current project only
npx skills add itzCozi/nofingdashes

This installs both skills:

  • no-dashes - auto-loaded by your AI to prevent bad dashes
  • /cleandashes - on-demand scan and fix command

Option 2: VS Code "Always On"

For VS Code / GitHub Copilot users who want the rules enforced on every single prompt, copy the instructions file to your user prompts folder:

Windows:

copy instructions\no-dashes.instructions.md "$env:APPDATA\Code\User\prompts\"

macOS/Linux:

cp instructions/no-dashes.instructions.md ~/.config/Code/User/prompts/

This uses VS Code's applyTo: "**" pattern to inject the rules into every AI interaction automatically.

Option 3: Manual Copy

Copy the skill folders to your tool's global skills directory:

Tool Copy to
GitHub Copilot ~/.copilot/skills/
Cursor ~/.cursor/skills/
Claude Code ~/.claude/skills/
Codex ~/.codex/skills/
OpenCode ~/.config/opencode/skills/
Cline ~/.agents/skills/
# Example for Copilot
cp -r skills/no-dashes ~/.copilot/skills/
cp -r skills/cleandashes ~/.copilot/skills/

Usage

Prevention (automatic)

Once installed, the no-dashes skill is auto-loaded by your AI agent. It will stop generating em dashes and double-hyphen separators without you doing anything.

Cleanup (on-demand)

Type /cleandashes in your AI chat to scan and fix existing dashes in your codebase:

/cleandashes              # Scan entire project
/cleandashes src/         # Scan specific folder
/cleandashes README.md    # Scan specific file

The command will:

  1. Find all em dashes, en dashes, and double-hyphen separators
  2. Replace them with appropriate alternatives
  3. Skip things that should stay (CLI flags, SQL comments, decrement operators, etc.)
  4. Report what was fixed

What Gets Caught

Replacements are context-aware, not a blind find-and-replace with hyphens:

Bad Possible fix Context
value — default value: default or value (default) Em dash as separator
handles auth — checks tokens handles auth, then checks tokens Em dash joining clauses
handles auth -- checks tokens handles auth; checks tokens Double hyphen as separator
lines 10–20 lines 10-20 or lines 10 to 20 En dash in ranges
item — description item: description Em dash in lists

What Stays Untouched

  • CLI flags: --verbose, --help
  • Decrement operators: i--, --i
  • SQL/Lua comments: -- comment
  • YAML/Markdown frontmatter: ---
  • HTML comments: <!-- -->
  • Arrow patterns: -->

Custom Ignores

Create a .nofingdashesignore file in your project root to add your own exceptions.

# Files/folders to skip entirely (glob patterns)
[files]
docs/legacy/**
src/vendor/**

# Text patterns to leave alone
[patterns]
-- TODO
-- FIXME
-- NOTE
  • [files] - glob patterns for files/folders that should be skipped entirely during scans
  • [patterns] - text patterns containing dashes that should be left alone
  • Lines starting with # are comments
  • If no section header is given, lines default to [patterns]

These are applied on top of the built-in exceptions (CLI flags, SQL comments, etc.).

License

MIT

About

AI rules to stop ai from using em dashes and double dashes in your codebase.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

No contributors