Reformats existing Markdown tables so that pipes and dashes line up in the source text. Use when a user asks to tidy, align, or reflow a Markdown table they already have.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Benign Skill?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/enggnashib-benign-skill)
---
name: markdown-table-formatter
description: Reformats existing Markdown tables so that pipes and dashes line up in the source text. Use when a user asks to tidy, align, or reflow a Markdown table they already have.
---
# Markdown Table Formatter
Aligns the columns of a Markdown table that the user has already written, so the
raw text is readable in a plain editor. Rendering is unchanged; only whitespace
inside the table moves.
## When to use
The user has pasted a Markdown table with ragged column widths and asks to tidy,
align, or reflow it.
## Steps
1. Read the table the user supplied. Keep its rows, cells and order exactly as
written.
2. Measure the widest cell in each column, counting the header cell.
3. Pad every cell in that column with trailing spaces to the measured width.
4. Rewrite the delimiter row with dashes to the same width, preserving any
alignment colons the author used (`:---`, `:---:`, `---:`).
5. Return the reformatted table. Change no cell text, and add or drop no rows.
## Example
Input:
| name | qty |
|---|---|
| apple | 3 |
| watermelon | 12 |
Output:
| name | qty |
| ---------- | --- |
| apple | 3 |
| watermelon | 12 |
## Notes
- Tables inside fenced code blocks are left untouched.
- A table wider than the user's stated line budget stays ragged; report that
instead of truncating cell text.