Creating a Markdown Converter Chrome Extension with Claude Code | Alpha | PandaiTech

Creating a Markdown Converter Chrome Extension with Claude Code

A tutorial on building a Chrome extension from scratch that converts web pages into Markdown format, including how to deploy it to your browser without any coding experience.

Learning Timeline
Key Insights

Advantages of Markdown Format for AI

Markdown is the best format for AI to understand website content because it preserves document structure without messy HTML code. This is very useful if you want to provide 'context' to ChatGPT or Claude.

Extension Customization Tips

You can ask Claude Code to add custom icons (e.g., your company logo) or add additional features like uploading files directly to Google Drive after the conversion is complete.

Important Step: Developer Mode

Don't forget to enable 'Developer mode' on the Extensions page. Otherwise, the 'Load unpacked' button will not be visible and you won't be able to install your custom-made extension.
Prompts

Prompt for Creating a Markdown Converter Extension

Target: Claude Code
I often want to provide the contents of a web page to a large language model to use as context. Could you create for me a Chrome extension that has the action of converting the current page to markdown and downloading the file to my downloads folder? I'll need you to walk me through the whole process of deploying the Chrome extension so that I can use it as well. It doesn't need to be public, but just the simplest way extension that converts the current page to markdown.
Step by Step

Folder Preparation and Code Generation with Claude Code

  1. Create a new empty folder on your computer and name it 'Chrome extension'.
  2. Open the 'Chrome extension' folder within the Claude Code interface.
  3. Type a prompt detailing your extension idea (refer to the Prompt Card).
  4. Make sure to ask Claude Code to provide full instructions on how to 'deployment' or install the extension.
  5. Wait for Claude Code to prepare the file structure plan, implementation details, and automatically generate all required code files into your folder.
  6. Verify that all files (such as manifest.json, background.js, etc.) have appeared in the folder before proceeding to the next step.

How to Install the Extension to Google Chrome (Deployment)

  1. Open the Google Chrome browser on your computer.
  2. Type `chrome://extensions/` in the address bar (URL bar) and press Enter.
  3. Enable the 'Developer mode' toggle located in the top right corner of the page.
  4. Click the 'Load unpacked' button that appears in the top left.
  5. Locate and select the 'Chrome extension' folder that was generated by Claude Code earlier.
  6. Click 'Select Folder' to load the extension into the browser.
  7. Ensure the 'Page to Markdown' extension (or the name you provided) appears in the list without any error messages.

Testing and Using the Extension

  1. Click the 'Extensions' icon (puzzle piece shape) in the Chrome toolbar (next to the URL bar).
  2. Find the 'Page to Markdown' extension and click the 'Pin' icon so it stays visible in the toolbar.
  3. Visit any website you want to convert into Markdown format.
  4. Click on the extension icon in the Chrome toolbar.
  5. Open the 'Downloads' folder on your computer to view the automatically generated Markdown file.
  6. Open the file to ensure the website content has been extracted and formatted correctly in Markdown.

More from AI-Powered Coding & App Development

View All