---
name: whatsapp-text-formatting
source: https://app.decimal.ai/s/whatsapp-text-formatting@1/SKILL.md
source_sha256: 16265d583fd9
---

# WhatsApp text formatting

## Contract

Enforces WhatsApp's native text markup on every message you send into a WhatsApp chat:
single-character emphasis delimiters, bare auto-linked URLs, and no heading syntax. Apply
whenever the reply is destined for WhatsApp (a 1:1 chat or a group). The base model's default
is standard Markdown, which WhatsApp does NOT render — doubled delimiters and `[text](url)`
links arrive as literal characters.

## Rules

WhatsApp emphasis uses ONE delimiter character on each side, not two. This is the whole point:
the form is deliberately different from Markdown.

1. **Bold** — wrap the text in a SINGLE asterisk: `*text*`. Never `**text**`. A doubled
   asterisk is NOT bold on WhatsApp; it renders as a literal `*` plus italic plus a literal `*`.

2. **Italic** — wrap the text in a SINGLE underscore: `_text_`. Never `*text*` for italic
   (that is bold here) and never `__text__` (doubled underscores render literally).

3. **Strikethrough** — wrap the text in a SINGLE tilde: `~text~`. Never `~~text~~`; the
   doubled-tilde Markdown form renders as literal tildes around the words.

4. **Inline monospace** — wrap in single backticks: `` `text` ``. Use it for short code,
   identifiers, commands, or values that must not be auto-formatted.

5. **Monospace block** — wrap a multi-line snippet in triple backticks on their own lines.
   Use it for code, logs, or anything where line breaks and spacing must be preserved.

6. **Links — paste the BARE URL.** Write `https://example.com` on its own and WhatsApp
   auto-links it. NEVER use Markdown link syntax `[label](https://example.com)` — WhatsApp does
   not parse it, so the recipient sees the literal characters `[label](https://example.com)` and
   gets no clickable link. If you want a label, put the words and the bare URL near each other.

7. **No headings.** WhatsApp has no `#`/`##` heading syntax. A line that starts with `# Title`
   shows the literal `#`. To make a heading-like line, BOLD it instead: a bold title line.

8. **Delimiter placement.** The delimiter must hug the text with no inner spaces — the run must
   start and end against a non-space character. Put whitespace (or the message start/end) on the
   OUTSIDE of the delimiters so WhatsApp recognizes the span.

9. **Combining styles** — nest single delimiters: bold + italic is one asterisk pair wrapping
   one underscore pair. Keep every delimiter balanced (one opener, one closer).

10. **Lists & quotes (optional).** A line beginning `- ` (or `* `) becomes a bullet; `1. `
    becomes a numbered item; `> ` becomes a quote. These match Markdown and are safe to use; the
    emphasis markup inside them still follows rules 1-3.

## Worked examples

One BEFORE (the Markdown the base defaults to) → AFTER (the WhatsApp-native form).

**Bold — server notice.** Tell the channel maintenance is over, "resolved" emphasized.
```
BEFORE:  Maintenance is **resolved** — all systems are back online.
AFTER:   Maintenance is *resolved* — all systems are back online.
```
Double asterisk → single asterisk.

**Italic — a soft caveat.**
```
BEFORE:  We'll aim for Friday, *though that may slip*.
AFTER:   We'll aim for Friday, _though that may slip_.
```
Markdown italic-by-asterisk → WhatsApp italic-by-underscore (asterisks would render bold).

**Strikethrough — a corrected figure.**
```
BEFORE:  The fee is ~~$40~~ now $25.
AFTER:   The fee is ~$40~ now $25.
```
Double tilde → single tilde.

**Link — share a page.**
```
BEFORE:  Sign up here: [the registration page](https://acme.example/signup)
AFTER:   Sign up here: https://acme.example/signup
```
Markdown link (renders as literal text on WhatsApp) → bare auto-linked URL.

**Heading — a titled announcement.**
```
BEFORE:  # Release 2.0 is live
         New dashboard and faster sync.
AFTER:   *Release 2.0 is live*
         New dashboard and faster sync.
```
`#` heading (shows a literal `#`) → a bold title line.

**Combined — bold name + italic note.**
```
BEFORE:  **Priya** will lead the call *(bring your notes)*.
AFTER:   *Priya* will lead the call _(bring your notes)_.
```
Each style switched to its single-character WhatsApp delimiter.

**Monospace block — a snippet.**
````
BEFORE:  Run `npm run deploy` then check the log.   (inline is fine)
AFTER:   Run `npm run deploy` then check the log.
````
Inline single backticks are the same on both; reserve triple backticks for multi-line blocks.

## Edge cases & exceptions

- **Asterisk that is NOT emphasis** (a math `2 * 3`, a literal bullet glyph in prose): leave a
  space on at least one inner side so WhatsApp does not treat it as a delimiter, e.g. `2 * 3`.
- **Underscores inside a URL or identifier** (`my_file.py`, a query string) are not italic —
  WhatsApp only treats `_x_` as italic when the underscores bound a word run with outer
  whitespace; inside a token they stay literal. Don't try to "fix" them.
- **A delimiter with an inner space** (`* text *`) does NOT render — WhatsApp ignores it and
  shows the literal asterisks. Always hug the text: `*text*`.
- **Want a literal `*`, `_`, or `~`** with no formatting: separate it from word characters with a
  space, or rephrase; WhatsApp has no backslash escape.
- **Long code / config**: use the triple-backtick block, not inline backticks, so wrapping and
  indentation survive.
- **A label you really want on a link**: WhatsApp can't hide a URL behind link text — put the
  human words and then the bare URL; never the `[label](url)` form.
- **Mixed Markdown habits**: `**bold** _italic_` is half-wrong — the bold half won't render.
  Convert every emphasis run, not just some.

## Do / Don't

- DON'T write `**bold**`. ALWAYS write `*bold*` (single asterisk).
- DON'T write `~~strike~~`. ALWAYS write `~strike~` (single tilde).
- DON'T use `*text*` for italic. ALWAYS use `_text_` (asterisks are bold here).
- DON'T write `[label](url)`. ALWAYS paste the bare URL.
- DON'T start a line with `#` for a heading. ALWAYS use a bold line instead.
- DON'T put spaces just inside the delimiters (`* x *`). ALWAYS hug the text (`*x*`).
- DON'T leave some emphasis in Markdown form. ALWAYS convert every run to single-delimiter form.

## Common mistakes (the base model's wrong defaults)

- Emitting `**bold**` out of Markdown habit — the most common failure; it renders wrong.
- Using `~~strikethrough~~` (GitHub-flavored Markdown) instead of single `~`.
- Reaching for `[text](url)` links, which WhatsApp shows as raw characters with no link.
- Opening a message with a `#`/`##` heading line that displays a literal `#`.
- Using `*emphasis*` meaning italic — on WhatsApp that is bold, so the intent flips.
- Padding delimiters with inner spaces so nothing renders at all.

## Quick checklist

- [ ] Bold is a SINGLE asterisk `*x*`, never `**x**`.
- [ ] Italic is a SINGLE underscore `_x_`, never `*x*` or `__x__`.
- [ ] Strikethrough is a SINGLE tilde `~x~`, never `~~x~~`.
- [ ] Links are BARE URLs, never `[label](url)`.
- [ ] No `#`/`##` heading lines — a bold line stands in for a heading.
- [ ] Delimiters hug the text (no inner spaces); every pair is balanced.
