Hey DEV community! π
A few days ago, I built a VS Code extension called Marksmith to fix the most annoying parts of writing Markdown (like pasting Excel tables and syncing preview scrolls).
But recently, I noticed a huge shift in my own workflow: Half the Markdown I write isn't for humans anymore. Itβs being fed directly into Claude, ChatGPT, or Gemini as prompts and context.
When you're constantly stuffing docs into context windows, two things happen:
- You worry about hitting context limits (or racking up API costs).
- You waste time dealing with AI "hallucinations" when you ask it to generate docs back for you.
So, for the v0.3.0 release,
I decided to pivot Marksmith into something new: An Agent AI-Ready Markdown Toolkit. π
Here is what I added to survive the AI era:
π 1. Real-time LLM Token Estimator
Instead of just counting words, Marksmithβs Document X-Ray sidebar now includes a Heuristic Token Estimator for GPT, Claude, and Gemini.
Before you copy-paste that massive README into your AI assistant, you can see exactly how "heavy" it is in terms of tokens right inside your editor. No more guessing if you're about to blow past your context limit!
βοΈ 2. Copy Optimized for AI (1-Click Minify)
Formatting is great for humans, but LLMs don't need all those extra spaces, perfectly aligned markdown tables, or empty lines.
I added a CodeLens button at the top of your files. Click it, and Marksmith instantly minifies your Markdown (compresses tables, strips blanks) and copies it to your clipboard.
Result: You save significant tokens and API costs without ruining your beautiful local .md file.
π΅οΈ 3. Hallucination Quick Fix
Ever ask an AI to write documentation, and it leaves behind a bunch of [TODO: Insert link here] or makes up a fake local image path?
Marksmith now automatically scans your document and puts a red squiggly line under AI placeholders and broken local links. Click the π‘ icon, and you can instantly strip them out or fix them. It acts as a safety net before you commit AI-generated docs.
π‘οΈ 4. Security Hardening (SSRF / RCE blocked)
Wait, security in a Markdown extension? Yes!
If you are previewing AI-generated Markdown, you are essentially rendering untrusted input. Maliciously crafted Markdown can trigger SSRF (Server-Side Request Forgery) by trying to fetch internal network metadata, or even execute code during PDF exports.
I completely locked down the extension. It uses strict DOMPurify sandboxing and actively blocks attempts to ping internal/cloud IPs.
π¨ Bonus: A 90s Retro Redesign
Because coding should be fun, I spent the weekend completely rebuilding the landing page using a Mac OS Classic / Neo-Brutalism theme. Let me know what you think of the vibes! πΎ
π Open VSX / Cursor Support
For all my Cursor, Windsurf, and VSCodium users out thereβthank you for the support! The extension has been doing surprisingly well on Open VSX, and it's officially verified there too.
π Check it out here:
- π₯οΈ Website & Demo: rakkunn.github.io/MarkSmith
- π Source Code: GitHub Repository
It is 100% free and open-source. If you are building with AI or just write a ton of docs, I hope this saves you as much time as it saves me.
Would love to hear your feedback in the comments! Happy coding! π»β¨
Top comments (0)