npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

openclaw-md-table-formatter

v0.1.0

Published

Markdown table formatter hook for OpenClaw

Readme

openclaw-md-table-formatter

npm version npm downloads License: MIT

| | Follow @JungHoonGhae on GitHub for more projects. | | :-----| :----- | | | Follow @lucas_ghae on X for updates. |

Markdown table formatter hook for OpenClaw — format tables in agent tool results automatically.

Disclaimer: This is an independent community hook. It is not affiliated with, endorsed by, or sponsored by OpenClaw. OpenClaw™ is a trademark of its respective owners.

Support

If this hook helps you, consider supporting its maintenance:

The Problem

Markdown tables from AI agents are often messy:

| Name | Age | Role |
|---|---|---|
| Alice | 30 | Engineer |
| Bob | 25 | Designer |

Columns don't align. Hard to read. Looks unprofessional in Discord/Telegram.

The Solution

This hook automatically formats markdown tables in agent tool results:

  • ✅ Proper column alignment (left, center, right)
  • ✅ Handles emojis and unicode characters
  • ✅ Preserves markdown inside inline code
  • ✅ Works with bold, italic, strikethrough
  • ✅ Invalid tables left unchanged with comment

Before

| Name | Age | Role |
|---|---|---|
| Alice | 30 | Engineer |
| Bob | 25 | Designer |

After

| Name  | Age | Role     |
|:------|:---:|:---------|
| Alice | 30  | Engineer |
| Bob   | 25  | Designer |

Installation

From npm

openclaw hooks install openclaw-md-table-formatter

From local directory

openclaw hooks install ./path/to/openclaw-md-table-formatter

Link for development

openclaw hooks install -l ./path/to/openclaw-md-table-formatter

Usage

After installation, enable the hook:

openclaw hooks enable md-table-formatter

Restart your gateway:

openclaw gateway --force

That's it! Tables in tool results will be formatted automatically.

How It Works

This hook intercepts tool_result_persist events, which fire when tool results are about to be saved to the session transcript:

| Step | Action | |------|--------| | 1. Check | Verify tool result contains text content | | 2. Parse | Extract markdown tables from text | | 3. Calculate | Determine column widths (considering markdown, emojis, unicode) | | 4. Format | Apply consistent spacing and alignment | | 5. Return | Save formatted text to transcript |

Features

| Feature | Description | |---------|-------------| | Alignment | Left (:---), center (:---:), right (---:) | | Markdown handling | Strips bold/italic/strike for width calculation | | Code preservation | Markdown inside `code` stays intact | | Unicode support | Emojis and CJK characters calculated correctly | | Error handling | Invalid tables left unchanged with comment |

Troubleshooting

| Problem | Fix | |---------|-----| | Hook not found | Run openclaw hooks install openclaw-md-table-formatter | | Tables not formatting | Run openclaw hooks enable md-table-formatter then restart gateway | | Invalid table comment | Ensure table has separator row (\|---\|) and same column count |

Requirements

  • OpenClaw >= 2026.2.0

Limitations

  • Only affects tool results, not user messages or direct agent responses
  • Tables must have a valid separator row (|---|---|)
  • All rows must have the same number of columns

Development

git clone https://github.com/JungHoonGhae/openclaw-md-table-formatter.git
cd openclaw-md-table-formatter
bun install
bun run build

Links

License

MIT - See LICENSE for details.

Contributing

Contributions are welcome! Feel free to submit a Pull Request at github.com/JungHoonGhae/openclaw-md-table-formatter.

Legal Notice

This project is provided "as is" without warranty of any kind. The use of OpenClaw hook API is subject to OpenClaw's terms of service. Users are responsible for complying with all applicable terms and conditions when using this hook.

Related