사용 방법
- 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
- 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
- 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/cosmix/loom --skill loom-md-tables시작 전 확인
- 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
- 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.
Markdown Table Formatting
Utility for fixing markdown table alignment and spacing. Normalizes column widths, ensures consistent padding, and preserves alignment markers.
Quick Examples
# Preview fixed output
python fix-md-tables.py document.md
# Fix in-place
python fix-md-tables.py document.md -iCommon Patterns
Status tables:
| Stage | Status | Branch |
| ----- | --------- | ---------- |
| build | Complete | loom/build |
| test | Executing | loom/test |Configuration tables:
| Option | Default | Description |
| ---------- | ------- | --------------------- |
| timeout | 300 | Session timeout (sec) |
| auto_merge | false | Enable auto merging |Right-aligned numbers (script preserves the ---: marker but left-aligns and right-pads the cell text — GFM still renders these right-aligned when displayed):
| Item | Count | Total |
| ----- | ----: | ----: |
| Files | 42 | 500 |
| Lines | 1,234 | 5,000 |Features
- Aligns each column to its widest cell (separators get a minimum width of 3)
- Single-space padding; cell content is always left-aligned and right-padded (
ljust) regardless of the alignment marker - Preserves the alignment marker in the separator row (
:---,:---:,---:), so GFM rendering still honors it - Uses the header's column count: short body rows gain empty trailing cells and excess body cells are dropped, matching GFM rendering
- Preserves a shared zero-to-three-space Markdown indent and recognizes GFM one-cell body rows without a pipe
- Inserts a blank line before and after each table when missing
Invocation
The script lives in this skill's directory, so pass its path (or copy it to the target dir). allowed-tools permits Bash(python *); invoke via python, not ./.
python /path/to/skills/loom-md-tables/fix-md-tables.py FILE.md # preview to stdout
python /path/to/skills/loom-md-tables/fix-md-tables.py FILE.md -i # -i or --in-place: rewrite⚠ A pipe-separated header must be immediately followed by a valid GFM delimiter row with the same number of cells and indent. The utility preserves escaped \| inside cells and ignores fenced code, raw HTML blocks, four-space indented code, and lines starting another block such as a blockquote or list item. Pipe-looking prose without a delimiter row is left unchanged. Leading/trailing pipes are optional under GFM; the normalized output uses them for readability. Preview the diff when a table sits inside a complex nested container.
Alignment Markers
| Syntax | Alignment |
|---|---|
--- | Left (default) |
:--- | Left |
---: | Right |
:---: | Center |
Verify before done
- [ ] Ran preview (no
-i) first and eyeballed the diff before rewriting in place. - [ ] Separator markers (
:---,---:,:---:) survived; alignment intent intact. - [ ] Header and delimiter counts/indents match; pipe-looking prose plus fenced/raw-HTML examples were intentionally left unchanged.