docs-md-table-formattinglisted
Install: claude install-skill bitranox/bitranox-skills
# Markdown Table Formatting
## Overview
Rules for consistently formatted, readable markdown tables. Misaligned tables are hard to scan in source view and may trigger linter warnings.
**A `reformat-md-tables` PostToolUse hook auto-realigns tables in every `*.md` file on each Write/Edit**, so tables Claude writes stay aligned with no manual step. To bulk-reformat a tree by hand or in CI, run this skill's `reformat_tables.py -r <dir>` (see Programmatic Reformatting below).
## Rules
### 1. Pad all cells to column width
Every cell in a column must be padded with trailing spaces to match the widest content in that column.
```txt
# BAD - unpadded
| Name | Value |
|------|-------|
| Type | Settable |
| Value | String (colon-separated list) |
# GOOD - padded to widest content per column
| Name | Value |
|-------|-------------------------------|
| Type | Settable |
| Value | String (colon-separated list) |
```
### 2. Separator dashes touch the pipes
No spaces between pipes and dashes in the separator row. Dash count = column width + 2 (matching the space-padded content cells).
```txt
# BAD - spaces around dashes, and columns wider than their content
| Name | Value |
| ----- | -------- |
# GOOD - dashes touch pipes, width follows the widest cell (rule 1)
| Name | Value |
|------|-------|
```
That GOOD block is exactly what `reformat_tables.py` emits for the BAD input above: it re-sizes
each column to its widest cell