markdown-table-generator

Original🇨🇳 Chinese
Translated

Generate well-formatted markdown tables from data. Use when creating documentation tables or formatting tabular data.

5installs
Added on

NPX Install

npx skill4agent add ntaksh42/agents markdown-table-generator

SKILL.md Content (Chinese)

View Translation Comparison →

Markdown Table Generator Skill

A skill for generating and formatting Markdown tables.

Overview

Generates neatly aligned Markdown tables from data.

Main Features

  • Auto-alignment: Automatically adjusts column widths
  • Data Sources: Convert from CSV, JSON, and arrays
  • Alignment Settings: Left, center, or right alignment
  • Sorting: Sort by columns
  • Filtering: Only display rows that meet conditions
  • Styles: GitHub, GitLab, and standard Markdown

Usage

Generate a Markdown table from the following data:

Name: Tanaka, Age: 30, Occupation: Engineer
Name: Sato, Age: 25, Occupation: Designer
Name: Suzuki, Age: 28, Occupation: Manager

Examples

Basic Table

Input Data:
Product, Price, Stock
iPhone 15, 128000, 50
MacBook Pro, 298000, 20
AirPods Pro, 39800, 100
Generated Table:
markdown
| Product      | Price  | Stock |
|--------------|--------|-------|
| iPhone 15    | 128000 | 50    |
| MacBook Pro  | 298000 | 20    |
| AirPods Pro  | 39800  | 100   |

Alignment Settings

Left, Center, Right Alignment:
markdown
| Product      | Category | Price  |
|:-------------|:--------:|-------:|
| iPhone 15    | Smartphone | 128000 |
| MacBook Pro  | PC       | 298000 |
| AirPods Pro  | Audio    | 39800  |
  • :---
    = Left alignment
  • :---:
    = Center alignment
  • ---:
    = Right alignment

Table from JSON

Input JSON:
json
[
  {"name": "John", "age": 30, "city": "Tokyo"},
  {"name": "Jane", "age": 25, "city": "Osaka"}
]
Generated Table:
markdown
| name | age | city  |
|------|-----|-------|
| John | 30  | Tokyo |
| Jane | 25  | Osaka |

Table from CSV

Input CSV:
Name,Email,Role
Alice,alice@example.com,Admin
Bob,bob@example.com,User
Carol,carol@example.com,Editor
Generated Table:
markdown
| Name  | Email               | Role   |
|-------|---------------------|--------|
| Alice | alice@example.com   | Admin  |
| Bob   | bob@example.com     | User   |
| Carol | carol@example.com   | Editor |

Complex Table

Statistical Data:
markdown
| Metric               | Jan    | Feb    | Mar    | Average |
|:-------------------|--------:|--------:|--------:|---------:|
| Page Views          | 125,430 | 138,920 | 152,100 | 138,817  |
| Unique Users        | 45,230  | 52,100  | 58,920  | 52,083   |
| Conversion Rate     | 2.3%    | 2.8%    | 3.1%    | 2.7%     |
| Average Stay Time (sec) | 145     | 158     | 172     | 158      |

Checklist Table

markdown
| Task                   | Assignee | Status       | Deadline   |
|-------------------------|--------|-----------|-----------|
| Design Review           | Suzuki | ✅ Completed | 2024-06-15 |
| Implementation          | Tanaka | 🔄 In Progress | 2024-06-20 |
| Testing                 | Yamada | ⏳ Pending | 2024-06-25 |
| Release                 | Sato   | ⏳ Pending | 2024-06-30 |

Comparison Table

markdown
| Feature           | Free Plan | Pro      | Enterprise |
|---------------|:---------:|:--------:|:---------------:|
| Number of Users     | Up to 5   | Unlimited | Unlimited           |
| Storage     | 5GB       | 100GB    | Unlimited           |
| Support       | Community | Email   | 24/7 Phone Support       |
| Monthly Price   | ¥0        | ¥1,200   | Contact us     |

Formatting Features

Formatting Unaligned Tables

Input (Unaligned):
markdown
|Name|Age|City|
|-|-|-|
|John Doe|30|Tokyo|
|Jane|25|San Francisco|
Formatted Result:
markdown
| Name     | Age | City          |
|----------|-----|---------------|
| John Doe | 30  | Tokyo         |
| Jane     | 25  | San Francisco |

Sorting Feature

Sort the following table in descending order of price:
[Table]

Filtering

Extract only products with stock ≥50 from the following table:
[Table]

Conversion to HTML Table

Markdown:
markdown
| Name | Age |
|------|-----|
| John | 30  |
HTML:
html
<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Age</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>John</td>
      <td>30</td>
    </tr>
  </tbody>
</table>

Best Practices

  1. Appropriate Column Widths: Adjust according to content
  2. Alignment: Align numbers to the right, text to the left
  3. Headers: Keep them clear and concise
  4. Line Breaks: Split long text appropriately
  5. Symbols: Improve visibility with emojis (✅ ❌ ⚠️)

Version Information

  • Skill Version: 1.0.0
  • Last Updated: 2025-01-22

Usage Example:
Generate a Markdown table from the following data:

Product Name, Price, Stock
iPhone 15, 128000, 50
MacBook Pro, 298000, 20

Requirements:
- Align prices to the right
- Center-align stock
- Sort by price (descending)
A beautifully formatted table will be generated!