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

pi-mdxml-context

v0.1.14

Published

Pi extension that converts Markdown context to XML-like structure at model send time

Readme

pi-mdxml-context

Join dotfield.xyz on Discord

CI Publish npm version npm downloads License: MIT Pi package Trusted Publishing

Convert Markdown context to XML-like structure at model send time while keeping the original Markdown in session history.

What this is

pi-mdxml-context is a Pi extension for agent workflows where Markdown is convenient for humans, but explicit XML-like boundaries can make complex context easier for models to parse.

It converts loaded Markdown context files and recent Markdown tool results before each model request. Saved session history stays in Markdown; conversion happens only in the provider-bound context.

Features

  • Converts Markdown context files before model requests.
  • Converts Markdown tool results without mutating saved session history.
  • Preserves source metadata on the generated XML root element.
  • Supports frontmatter, GFM, code blocks, tables, wikilinks, and Obsidian-style callouts.
  • Provides preview and on/off toggle commands.
  • Skips conversion when XML output grows too large.

Install

Install the published npm package with Pi:

pi install npm:pi-mdxml-context

Pin a specific version when you want reproducible installs:

pi install npm:[email protected]

Install into the current project instead of your user Pi settings:

pi install npm:pi-mdxml-context -l

Or install from GitHub:

pi install git:github.com/eiei114/pi-mdxml-context

Try it without permanently installing:

pi -e npm:pi-mdxml-context

Quick start

After install, reload Pi if needed:

/reload

Check that conversion is active:

/mdxml:status

Preview XML-like output for a Markdown file:

/mdxml:preview path/to/file.md

For commands, output shape, runtime hooks, and safety behavior, see docs/usage.md.

Usage summary

| Command | Description | | --- | --- | | /mdxml:on | Enable send-time conversion. | | /mdxml:off | Disable send-time conversion. | | /mdxml:status | Show conversion state and recent stats. | | /mdxml:preview <path> | Preview XML-like output for a Markdown file. | | /mdxml:preview recent:N | Preview XML-like output for a recent Markdown tool result. |

Conversion is enabled by default after the extension loads. Use /mdxml:off to disable it immediately.

Package contents

| Path | Purpose | | --- | --- | | index.ts | Pi TypeScript extension entrypoint | | tests/ | Converter, runtime hook, and preview tests | | docs/ | Usage and release docs (usage.md, release.md) | | README.md | Public entrypoint (this file) | | CHANGELOG.md | Version history | | CODE_OF_CONDUCT.md | Contributor Covenant code of conduct | | CONTRIBUTING.md | Contribution guidelines | | SECURITY.md | Vulnerability reporting | | LICENSE | MIT license |

Development

npm install
npm run check
npm test

Before opening a PR with publishable changes, bump package.json and update CHANGELOG.md in the same PR. CI runs npm run version:check on pull requests.

Release

This package uses npm Trusted Publishing with GitHub Actions OIDC — no NPM_TOKEN is required.

On main, a version bump in package.json triggers Auto Release, which creates the semver tag and GitHub Release, then dispatches Publish to npm (publish.yml).

See docs/release.md for setup details and tag-to-npm verification steps. See CHANGELOG.md for semver history.

Security

Pi packages run with your local permissions. Review extensions before installing third-party packages.

For vulnerability reporting, see SECURITY.md.

Links

  • npm: https://www.npmjs.com/package/pi-mdxml-context
  • GitHub: https://github.com/eiei114/pi-mdxml-context
  • Issues: https://github.com/eiei114/pi-mdxml-context/issues
  • Roadmap: ROADMAP.md

License

MIT