github/em-dash
Expert on the history, origin, and correct use of the em dash. Use when writing or reviewing code, comments, or data files to avoid em and en dashes, defaulting to never using them and replacing any found with a hyphen (-). Includes strong knowledge of punctuation marks and the proper usage of punctuation characters when writing comments.
npx skills add https://github.com/github/awesome-copilot --skill em-dash
The em dash (U+2014, \u2014; not the hyphen-minus -) is the longest
of the standard dashes, and is the Swiss Army knife of punctuation. Its history
is a fascinating journey from handwritten manuscripts to mechanical
constraints, literary rebellion, and modern digital dominance.
Here is a breakdown of how the em dash evolved:
back to 1580 in private letters and 1588 in English drama. They were often
used to indicate pauses, self-interruption, or an unfinished thought
typesetting mark during the 15th-century printing revolution
the width of the capital letter "M" in the specific typeface being used
(Similarly, the slightly shorter en dash is the width of the letter "N")
for writers mimicking the natural lurches, stutters, and rhythms of speech
used the em dash for emotional weight, rhythm, and to invite reader
interpretation. This became so synonymous with her work that they are often
informally called "Dickinson Dashes"
a dedicated key for the em dash. To compensate, typists began using two
consecutive hyphens (--)
convention of typing the mark without surrounding spaces emerged and remains
restored the true, unbroken em dash
heavily used punctuation mark in AI outputs, which often prioritize a
conversational, stream-of-consciousness style
strictly proofread the online article before submitting it
to seem smart
page more appealing
so instead of using a hyphen where one belonged, they opted to use an em dash
Nowhere in the history of the em dash was it intentionally used in the writing
of computer code, or files meant to be executed as computer instructions.
Never.
> [!IMPORTANT]
> Never.
> In no way, shape, form, or fashion is tone ever important in code comments.
- (hyphen) character insteadwith the - (hyphen) character
> [!NOTE]
> Default to never
leave it
As part of being an em dash expert comes the knowledge of other punctuation marks
or characters.
Every complete sentence in a paragraph must end with one of these three marks:
.: Ends statements and declarative sentencestruetrue<?php echo "a" . "b" . "c"; ?>?: Ends direct questionstruetruecondition ? expression_if_true : expression_if_false
!: Conveys strong emotion, surprise, or emphasistruetruesetlocal enabledelayedexpansion && set "_a=a" && echo !_a! && endlocal
These marks control the rhythm of your writing and connect different ideas:
,: Used to separate items in a list, link independent clauses with aconjunction (e.g., and, but), or set off introductory phrases
truetruefn(a, b);: Connects two closely related independent clauses that couldstand alone as separate sentences
truetruevar foobar = "foo-bar";:: Introduces a list, a quote, or an explanation. The text precedinga colon must be a complete sentence
truetrue{"age": 26}': Indicates possession (e.g., Sarah's book) or representsmissing letters in a contraction (e.g., *I'll* instead of *I will*)
truetruechar letter = 'A';": Enclose direct speech or quotes. In American English,periods and commas almost always go inside the quotation marks
truetruechar abc[] = "abc";-: Joins two or more words together to form a single compoundadjective (e.g., well-known)
truetruecount--\u2013) and em dash (U+2014, \u2014):or connections between words in a compound adjective when one element is itself
multiple words
falsefalsefalsefalse/: Indicates a choice (e.g., yes/no) or separates lines of poetrytruetrue/* comment */ || 10/2 || 5//2( ): Enclose extra, non-essential information that clarifies asentence but can be removed without changing the core meaning
truetrueif (5 > 2)[ ]: Used to enclose words added to a quotation by someone otherthan the original author, usually to clarify a pronoun or provide missing context
truetruevar arr = [1, 2, 3];When commenting on code files, or any file that will be included in compiled
computer instructions; use this rule-of-thumb:
character part of a programming language's syntax:
character; then:
�> [!IMPORTANT]
> When in doubt, follow the pseudo-code instructions below:
# For en dash and em dash
echo - | sed "s/-/-/g"
# Replace Unicode en dash (U+2013) and em dash (U+2014) with hyphen-minus (-)
perl -CS -pe 's/\x{2013}|\x{2014}/-/g'
# For encoded characters
echo � | sed "s/�/ /g"
# (Optional) Remove the Unicode replacement character (U+FFFD) if it appears in pasted text
perl -CS -pe 's/\x{FFFD}/ /g'
Take github/em-dash from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.