em-dash
Skill này làm gì
Công cụ này hiểu lịch sử và cách dùng đúng của em dash (dấu gạch ngang dài). Nó bảo đảm bạn dùng dấu gạch nối (-) thay cho em dash trong code, chú thích hoặc file dữ liệu, vì em dash không phù hợp trong những ngữ cảnh này.
Khi nào nên dùng
- ✓Khi viết chú thích trong code.
- ✓Khi rà soát các file dữ liệu.
- ✓Khi bạn muốn chỉ dùng dấu gạch nối (-) trong văn bản kỹ thuật.
Liên kết skill
https://github.com/github/awesome-copilot/blob/main/skills/em-dash/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Thay tất cả em dash trong chú thích code này bằng dấu gạch nối: // Use an em dash here for a pause.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ biết rằng em dash không nên dùng trong code hoặc dữ liệu. Nó thay mọi em dash tìm thấy bằng dấu gạch nối (-), là ký tự phù hợp cho những tình huống này.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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:
History of the em dash
Early Beginnings (15th-18th Century)
- The First Dashes: Early appearances of the dash in English literature date back to 1580 in private letters and 1588 in English drama. They were often used to indicate pauses, self-interruption, or an unfinished thought
- Gutenberg and Early Printing: The em dash officially emerged as a standardized typesetting mark during the 15th-century printing revolution
The Etymology
- The "M" Width: The em dash is named because its standard length is equal to 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")
Literary Popularity (17th-19th Century)
- The Author's Tool: By the 17th and 18th centuries, it became a beloved tool for writers mimicking the natural lurches, stutters, and rhythms of speech
- Dickinson Dashes: In the 19th century, poets like Emily Dickinson famously 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"
The Typewriter Era (19th-20th Century)
- The Double-Hyphen Compromise: When typewriters were introduced, they lacked a dedicated key for the em dash. To compensate, typists began using two consecutive hyphens (--)
- The No-Space Rule: Because of this mechanical compromise, a stylistic convention of typing the mark without surrounding spaces emerged and remains
The Digital Age (Present Day)
- Return to Form: Modern digital typesetting and word processing programs have restored the true, unbroken em dash
- Modern Renaissance: The em dash is experiencing a resurgence of popularity
- It has become a hallmark of modern long-form prose and is also a favorite, heavily used punctuation mark in AI outputs, which often prioritize a conversational, stream-of-consciousness style
Speculation for em Dash Modern Renaissance
- Professional authors who had to meet deadlines and did not have the time to strictly proofread the online article before submitting it
- Professionals who wanted to show off their knowledge of HTML encoding in order to seem smart
- Graphic designers who wanted to make the visual composition of text on a web page more appealing
- The fact that popularity begets popularity
- People publishing web articles saw that everyone else was using em dashes, so instead of using a hyphen where one belonged, they opted to use an em dash
Analysis of em dash History
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.
When to use em or en dashes
Never.
In Code Files
[!IMPORTANT] Never. In no way, shape, form, or fashion is tone ever important in code comments.
- Never
- Use the
-(hyphen) character instead - If working as an agent, and an em dash is in a comment, then replace it
with the
-(hyphen) character
- Use the
In Raw Data and/or Text Files
[!NOTE] Default to never
- When instructed to, and it is 100% clear that the text is to be used as:
- Literature
- News
- If working as an agent, and an em dash is already part of the data, then leave it
Other Punctuation Characters
As part of being an em dash expert comes the knowledge of other punctuation marks or characters.
End-of-Sentence Marks
Every complete sentence in a paragraph must end with one of these three marks:
- Period
.: Ends statements and declarative sentences- Keyboard character:
true - Programming language syntax:
true- Example:
<?php echo "a" . "b" . "c"; ?>
- Example:
- Keyboard character:
- Question Mark
?: Ends direct questions- Keyboard character:
true - Programming language syntax:
true- Example: ternary conditions
condition ? expression_if_true : expression_if_false
- Example: ternary conditions
- Keyboard character:
- Exclamation Point
!: Conveys strong emotion, surprise, or emphasis- Keyboard character:
true - Programming language syntax:
true- Example:
- Keyboard character:
…
Câu hỏi thường gặp
Em dash là gì?
Đó là dấu câu dài hơn dấu gạch nối, thường dùng trong văn học để biểu thị khoảng ngắt hoặc nhấn mạnh.
Tại sao không nên dùng em dash trong code?
Em dash không phải là ký tự chuẩn trong nhiều ngôn ngữ lập trình và có thể gây lỗi. Dấu gạch nối (-) là ký tự đúng trong những ngữ cảnh này.
Tôi nên làm gì nếu thấy em dash trong file dữ liệu?
Nếu văn bản rõ ràng dành cho đọc (như văn học hoặc tin tức), hãy giữ nguyên em dash. Nếu không, đặc biệt trong ngữ cảnh kỹ thuật, hãy thay bằng dấu gạch nối.
Chi tiết
Mô tả gốc của tác giả
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.
repo: github/awesome-copilot
Độ phổ biến
- Sao GitHub
- 40k
- Vị trí xếp hạng
- #7188
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
acquire-codebase-knowledge
40kGiúp agent của bạn hiểu và ghi tài liệu cho một dự án mã nguồn có sẵn. Hữu ích khi đón thành viên mới hoặc nắm tổng quan về kiến trúc.
acreadiness-assess
40kGiúp agent của bạn đánh giá mức độ sẵn sàng cho AI của dự án và tạo báo cáo. Hữu ích để biết dự án đã sẵn sàng dùng công cụ AI đến đâu.
acreadiness-generate-instructions
40kGiúp agent của bạn tạo hướng dẫn cho công cụ AI dựa trên kết quả đánh giá. Hữu ích để cải thiện cách AI làm việc với mã và khắc phục các khoảng trống.
acreadiness-policy
40kGiúp agent của bạn xác định hoặc áp dụng chính sách đánh giá dự án bằng AI. Hữu ích để chuẩn hóa cách đánh giá dự án và đảm bảo tuân thủ.
Skill tương tự
obsidian-vault-maintainer
394kGiúp agent của bạn giữ gọn kho ghi nhớ kiểu Obsidian, với liên kết wiki hoạt động tốt, thuộc tính nhất quán và các phần tự tạo an toàn.
wiki-maintainer
394kGiúp agent của bạn duy trì wiki bộ nhớ OpenClaw với các trang có thể lặp lại, khối được quản lý an toàn và kiểm tra mâu thuẫn hoặc thiếu sót.
obsidian
394kCho phép agent của bạn đọc, tìm, tạo và sửa ghi chú, công việc, liên kết và thuộc tính trong Obsidian bằng dòng lệnh Obsidian chính thức.