<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muhammad Usman</title>
    <description>The latest articles on DEV Community by Muhammad Usman (@muhammadusmangm).</description>
    <link>https://dev.to/muhammadusmangm</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3838139%2F11c07e7c-796d-44b8-97d1-20856bb87101.png</url>
      <title>DEV Community: Muhammad Usman</title>
      <link>https://dev.to/muhammadusmangm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muhammadusmangm"/>
    <language>en</language>
    <item>
      <title>I built a CLI tool so I never have to write FFmpeg commands again</title>
      <dc:creator>Muhammad Usman</dc:creator>
      <pubDate>Wed, 25 Mar 2026 04:24:49 +0000</pubDate>
      <link>https://dev.to/muhammadusmangm/i-built-a-cli-tool-so-i-never-have-to-write-ffmpeg-commands-again-4ec7</link>
      <guid>https://dev.to/muhammadusmangm/i-built-a-cli-tool-so-i-never-have-to-write-ffmpeg-commands-again-4ec7</guid>
      <description>&lt;p&gt;If you build websites, you've been here before:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ffmpeg &lt;span class="nt"&gt;-i&lt;/span&gt; hero.mp4 &lt;span class="nt"&gt;-c&lt;/span&gt;:v libx264 &lt;span class="nt"&gt;-crf&lt;/span&gt; 23 &lt;span class="nt"&gt;-preset&lt;/span&gt; slow &lt;span class="nt"&gt;-movflags&lt;/span&gt; +faststart &lt;span class="nt"&gt;-c&lt;/span&gt;:a aac &lt;span class="nt"&gt;-b&lt;/span&gt;:a 128k out.mp4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wrong flag order? Re-run. Need a WebM version too? Write the whole thing again with completely different flags. Forgot &lt;code&gt;-movflags +faststart&lt;/code&gt;? Your video won't stream properly in the browser — and you won't know until a user complains.&lt;/p&gt;

&lt;p&gt;I got tired of copy-pasting this from my notes every single project. So I built &lt;strong&gt;VidX&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it in 10 seconds
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @muhammadusmangm/vidx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  What is VidX?
&lt;/h2&gt;

&lt;p&gt;VidX is an interactive CLI tool for web video optimization. Instead of memorizing FFmpeg flags, it walks you through everything with a beautiful terminal UI.&lt;/p&gt;

&lt;p&gt;You run one command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vidx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And it handles the rest — scanning your project for videos, letting you pick which ones to process, choosing format, quality, and resolution, then running the perfect FFmpeg command behind the scenes.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/wzJcF4gsRlg"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem It Solves
&lt;/h2&gt;

&lt;p&gt;FFmpeg is incredibly powerful — but its interface is designed for people who already know exactly what they're doing. For web developers who just need compressed, web-ready videos, it's way more friction than it should be.&lt;/p&gt;

&lt;p&gt;The specific pain points VidX eliminates:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Remembering codec flags&lt;/strong&gt; — libx264 for MP4, libvpx-vp9 for WebM, the exact CRF sweet spots for web, &lt;code&gt;-movflags +faststart&lt;/code&gt; so videos stream before fully downloading, &lt;code&gt;-pix_fmt yuv420p&lt;/code&gt; so Safari doesn't choke. VidX bakes all of this in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Generating both formats&lt;/strong&gt; — Modern best practice is to serve both MP4 and WebM and let the browser pick. With raw FFmpeg that means writing and running two completely separate commands. With VidX you just pick "Both" and it handles both in one run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Resizing&lt;/strong&gt; — Need to scale down a 4K video for web? VidX uses &lt;code&gt;scale=-2:720&lt;/code&gt; which keeps the aspect ratio and ensures the width stays divisible by 2 — something that trips up a lot of manual FFmpeg users and causes libx264 to error out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Starting over every project&lt;/strong&gt; — VidX supports a &lt;code&gt;.vidxrc&lt;/code&gt; config file. Set your preferred preset once per project and next time you just confirm and go.&lt;/p&gt;




&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1 — Detect
&lt;/h3&gt;

&lt;p&gt;VidX scans your project and lists every video file it finds, sorted by size (largest first since those are the most impactful to compress):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;📁 Found 3 videos in this project:

  • src/assets/hero-banner.mp4        48.2 MB
  • public/product-demo.mov          120.4 MB
  • public/bg-loop.webm                8.1 MB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2 — Select
&lt;/h3&gt;

&lt;p&gt;Pick which videos to process with Space/A keys — all pre-selected by default.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 — Configure
&lt;/h3&gt;

&lt;p&gt;Choose your output format, quality preset, and resolution through simple menus — no flags, no docs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 — Process
&lt;/h3&gt;

&lt;p&gt;VidX runs FFmpeg with a real-time progress bar showing percentage and ETA per file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5 — Summary
&lt;/h3&gt;

&lt;p&gt;See exactly how much space you saved, and the exact FFmpeg commands that were used — so you learn as you go.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🎉 Done! 2 videos processed in 43s

  hero-banner.mp4
    → hero-banner.mp4     48.2 MB  →   4.1 MB   (91% smaller) ✔
    → hero-banner.webm    48.2 MB  →   2.8 MB   (94% smaller) ✔
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Quality Presets
&lt;/h2&gt;

&lt;p&gt;VidX ships with three tuned presets:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Preset&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Web Optimized&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Most websites — great balance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;High Quality&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Hero videos, product showcases&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Small File&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Background loops, mobile-first&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Custom&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Full manual control&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each preset uses carefully chosen CRF values, bitrate caps, and codec settings that I've tuned specifically for web delivery — not just generic FFmpeg defaults.&lt;/p&gt;




&lt;h2&gt;
  
  
  FFmpeg Auto-Detection
&lt;/h2&gt;

&lt;p&gt;VidX checks if FFmpeg is installed on your system first. If it is, it uses it. If not, it silently falls back to a bundled static binary — so it works on any machine with zero manual setup.&lt;/p&gt;




&lt;h2&gt;
  
  
  CI/CD Mode
&lt;/h2&gt;

&lt;p&gt;VidX also supports a fully non-interactive mode for build pipelines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vidx &lt;span class="nt"&gt;--preset&lt;/span&gt; webOptimized &lt;span class="nt"&gt;--format&lt;/span&gt; both &lt;span class="nt"&gt;--resolution&lt;/span&gt; 720p &lt;span class="nt"&gt;--yes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And a &lt;code&gt;--dry-run&lt;/code&gt; flag that prints the FFmpeg commands without executing them — useful for debugging or learning.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;p&gt;Built with Node.js using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;@inquirer/prompts&lt;/code&gt; for the TUI&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cli-progress&lt;/code&gt; + &lt;code&gt;ora&lt;/code&gt; for progress display&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;chalk&lt;/code&gt; for terminal colors&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fast-glob&lt;/code&gt; for video detection&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ffmpeg-static&lt;/code&gt; as the bundled fallback binary&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @muhammadusmangm/vidx
&lt;span class="c"&gt;# or&lt;/span&gt;
npx @muhammadusmangm/vidx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Requires Node.js 18+. Works on macOS, Windows, and Linux.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;VidX v1 is live on npm right now. I'm actively maintaining it and would love feedback — if you try it, let me know what you think in the comments or open an issue on GitHub.&lt;/p&gt;

&lt;p&gt;If it saves you time, a ⭐ on the repo goes a long way.&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;npm:&lt;/strong&gt; npmjs.com/package/&lt;a class="mentioned-user" href="https://dev.to/muhammadusmangm"&gt;@muhammadusmangm&lt;/a&gt;/vidx&lt;br&gt;&lt;br&gt;
🔗 &lt;strong&gt;GitHub:&lt;/strong&gt; github.com/MuhammadUsmanGM/VidX&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built for web devs, by a web dev who got tired of FFmpeg flags.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ffmpeg</category>
      <category>opensource</category>
      <category>node</category>
    </item>
    <item>
      <title>Notion Reverse Autopilot - AI That Watches Your Chaos and Builds Order</title>
      <dc:creator>Muhammad Usman</dc:creator>
      <pubDate>Tue, 24 Mar 2026 13:41:23 +0000</pubDate>
      <link>https://dev.to/muhammadusmangm/notion-reverse-autopilot-ai-that-watches-your-chaos-and-builds-order-3nej</link>
      <guid>https://dev.to/muhammadusmangm/notion-reverse-autopilot-ai-that-watches-your-chaos-and-builds-order-3nej</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/notion-2026-03-04"&gt;Notion MCP Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Notion Reverse Autopilot&lt;/strong&gt; - an AI agent that flips the productivity paradigm on its head.&lt;/p&gt;

&lt;p&gt;Every productivity tool assumes you're organized. This one assumes you're &lt;strong&gt;not&lt;/strong&gt; - and fixes it autonomously.&lt;/p&gt;

&lt;p&gt;You dump random notes, half-thoughts, and messy content into Notion. The agent does the rest:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scans&lt;/strong&gt; your entire workspace through Notion MCP and generates a Chaos Score (0-100)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Categorizes&lt;/strong&gt; every page using AI — project, idea, task, journal, reference, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discovers hidden connections&lt;/strong&gt; between pages you never linked yourself&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generates cognitive insights&lt;/strong&gt; — your thinking patterns, blind spots, contradictions, and predictions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto-annotates&lt;/strong&gt; pages with category/tag/summary callouts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Creates a Brain Briefing&lt;/strong&gt; — a rich Notion page with your workspace health, cognitive profile, and what you'll likely need next&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Builds an Autopilot Dashboard&lt;/strong&gt; with health scores, chaos breakdown, and top insights&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Groups pages into Topic Clusters&lt;/strong&gt; automatically&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runs on schedule&lt;/strong&gt; — set it and forget it, your workspace organizes itself every X hours&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The core idea: &lt;strong&gt;you stay messy, the AI builds order — and understands you better than you understand yourself.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Highlights
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-provider AI&lt;/strong&gt; — works with Groq (free), Google Gemini (free), Ollama (free/local), or Anthropic. Zero cost to run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full changelog&lt;/strong&gt; — every action the agent takes is logged for transparency and undo&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CLI-first&lt;/strong&gt; — clean terminal interface powered by Rich. Scan, organize, briefing, schedule, history — all one command away.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chaos detection&lt;/strong&gt; — tracks untagged pages, orphan content, duplicates, empty pages, structureless content, and more&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smart rescanning&lt;/strong&gt; — after organizing, the agent recognizes its own annotations and the chaos score drops accordingly&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Video Demo
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/ntkTm6gPtqo"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Show us the code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/MuhammadUsmanGM" rel="noopener noreferrer"&gt;
        MuhammadUsmanGM
      &lt;/a&gt; / &lt;a href="https://github.com/MuhammadUsmanGM/notion-reverse-autopilot" rel="noopener noreferrer"&gt;
        notion-reverse-autopilot
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Notion Reverse Autopilot&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Your workspace organizes itself.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Most productivity tools assume you're organized. This one assumes you're NOT — and fixes it autonomously.&lt;/p&gt;
&lt;p&gt;Notion Reverse Autopilot is an AI agent that continuously watches your messy Notion workspace, auto-organizes everything, discovers hidden patterns about how you think, and surfaces insights you never knew existed.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"What if you never had to organize Notion again — and it actually understood you better than you understand yourself?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;How It Works&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;You dump chaos into Notion
        |
        v
┌─────────────────────────┐
│   Workspace Scanner     │  Crawls every page, database, block
└────────┬────────────────┘
         v
┌─────────────────────────┐
│   AI Analysis Engine    │  Categorizes, finds connections,
│                         │  detects cognitive patterns
└────────┬────────────────┘
         v
┌─────────────────────────┐
│   Auto-Organizer        │  Tags pages, links related ideas,
│                         │  builds topic clusters &amp;amp; dashboards
└────────┬────────────────┘
         v
┌─────────────────────────┐
│   Brain Briefing        │  Health score, hidden connections,
│                         │  contradictions, predictions
└─────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;You stay messy. The AI builds order.&lt;/strong&gt;&lt;/p&gt;…&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/MuhammadUsmanGM/notion-reverse-autopilot" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Tech Stack
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Notion Integration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Official &lt;code&gt;@notionhq/notion-mcp-server&lt;/code&gt; via MCP stdio protocol&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MCP Client&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Python &lt;code&gt;mcp&lt;/code&gt; SDK with auto-discovery of tools&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;AI Engine&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Google Gemini / Groq / Ollama / Anthropic (user's choice)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CLI&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Click + Rich&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;HTTP&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;httpx (for LLM API calls)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Package Manager&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;uv&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  How I Used Notion MCP
&lt;/h2&gt;

&lt;p&gt;Notion MCP is the &lt;strong&gt;core backbone&lt;/strong&gt; of this project. Every single interaction with Notion — reading pages, scanning content, creating dashboards, writing annotations — goes through the official MCP server. No direct REST API calls.&lt;/p&gt;

&lt;h3&gt;
  
  
  Architecture
&lt;/h3&gt;

&lt;p&gt;CLI Command (scan / organize / briefing)&lt;br&gt;
        │&lt;br&gt;
        ▼&lt;br&gt;
Python MCP Client (mcp SDK)&lt;br&gt;
        │ stdio transport&lt;br&gt;
        ▼&lt;br&gt;
@notionhq/notion-mcp-server (spawned as subprocess via npx)&lt;br&gt;
        │&lt;br&gt;
        ▼&lt;br&gt;
Notion Workspace (read + write)&lt;/p&gt;

&lt;h3&gt;
  
  
  How MCP is integrated
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Auto-discovery at startup&lt;/strong&gt;&lt;br&gt;
When the agent connects, it calls &lt;code&gt;session.list_tools()&lt;/code&gt; to discover all 22 available MCP tools dynamically. It then resolves each logical operation (search, create page, append blocks, etc.) to the correct tool name using a deterministic mapping. This makes the agent forward-compatible with any future MCP server version.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Reading the workspace&lt;/strong&gt;&lt;br&gt;
The agent uses MCP's &lt;code&gt;API-post-search&lt;/code&gt; to crawl every page and database in the workspace, then &lt;code&gt;API-get-block-children&lt;/code&gt; to read the full content of each page — all through the MCP protocol.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Writing back to Notion&lt;/strong&gt;&lt;br&gt;
After AI analysis, the agent writes results back through MCP:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;API-post-page&lt;/code&gt; — creates the Autopilot Hub, Dashboard, Brain Briefing, and Topic Clusters pages&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;API-patch-block-children&lt;/code&gt; — appends annotation callouts to existing user pages and updates the dashboard with scan results&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Full read-write loop&lt;/strong&gt;&lt;br&gt;
The complete cycle — scan → analyze → organize → briefing — is a full MCP read-write loop. The agent reads your chaos through MCP, processes it with AI, and writes the organized structure back through MCP. On the next scan, it reads its own annotations through MCP to recognize already-organized pages.&lt;/p&gt;

&lt;h3&gt;
  
  
  What MCP unlocks
&lt;/h3&gt;

&lt;p&gt;Without MCP, this would require direct REST API calls with manual auth headers, pagination handling, and rate limiting. MCP provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Standardized tool interface&lt;/strong&gt; — one protocol for all Notion operations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server-managed auth&lt;/strong&gt; — token passed via environment, not per-request headers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version-agnostic&lt;/strong&gt; — auto-discovery means no hardcoded endpoints that break on API changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Composable&lt;/strong&gt; — the same agent architecture could connect to multiple MCP servers (Notion + Slack + GitHub) in the future&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Notion MCP turns Notion from a document store into a programmable workspace brain — and this project proves it by making that brain self-organizing.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>notionchallenge</category>
      <category>mcp</category>
      <category>ai</category>
    </item>
    <item>
      <title>7 Mistakes I Made With Claude Code (And How I Fixed Them)</title>
      <dc:creator>Muhammad Usman</dc:creator>
      <pubDate>Sun, 22 Mar 2026 12:19:35 +0000</pubDate>
      <link>https://dev.to/muhammadusmangm/7-mistakes-i-made-with-claude-code-and-how-i-fixed-them-5d8n</link>
      <guid>https://dev.to/muhammadusmangm/7-mistakes-i-made-with-claude-code-and-how-i-fixed-them-5d8n</guid>
      <description>&lt;p&gt;I've been using Claude Code daily for months. It lives in my terminal, it knows my codebases, and on a good day it feels like pairing with a senior engineer who never gets tired.&lt;/p&gt;

&lt;p&gt;On a bad day, it wastes my time, hallucinates conventions, and racks up token costs for nothing.&lt;/p&gt;

&lt;p&gt;The difference between those two experiences? Almost entirely configuration and habits — not the tool itself. After enough frustration, I started documenting what actually works. That turned into a &lt;strong&gt;&lt;a href="https://github.com/MuhammadUsmanGM/claude-code-best-practices" rel="noopener noreferrer"&gt;GitHub repo of Claude Code best practices&lt;/a&gt;&lt;/strong&gt; — guides, real CLAUDE.md templates, hook scripts, MCP configs, and a contributing workflow for teams.&lt;/p&gt;

&lt;p&gt;Here's what I wish I'd known from day one.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mistake 1: Not having a CLAUDE.md file
&lt;/h2&gt;

&lt;p&gt;This was the biggest one. Without a &lt;code&gt;CLAUDE.md&lt;/code&gt;, Claude has no idea what your project does, where things live, or what conventions your team follows. It guesses — wrong test commands, wrong file locations, wrong code style.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt; is a Markdown file you commit to your repo root. Claude reads it automatically at the start of every session. Here's a minimal one that actually works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# MyApp&lt;/span&gt;

Node.js/Express backend with PostgreSQL.

&lt;span class="gu"&gt;## Commands&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`npm test`&lt;/span&gt; — run tests
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`npm run lint`&lt;/span&gt; — ESLint check
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`npm run dev`&lt;/span&gt; — start dev server

Run &lt;span class="sb"&gt;`npm run lint &amp;amp;&amp;amp; npm test`&lt;/span&gt; before committing.

&lt;span class="gu"&gt;## Structure&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`src/routes/`&lt;/span&gt; — API route handlers
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`src/models/`&lt;/span&gt; — Sequelize models
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`src/middleware/`&lt;/span&gt; — Express middleware

&lt;span class="gu"&gt;## Rules&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; TypeScript strict mode — no &lt;span class="sb"&gt;`any`&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; All API responses: &lt;span class="sb"&gt;`{ data, error, status }`&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Use &lt;span class="sb"&gt;`src/utils/logger.ts`&lt;/span&gt;, not console.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Twenty lines. Claude now knows your commands, your structure, and your rules — every session, without you repeating yourself.&lt;/p&gt;

&lt;p&gt;The repo has ready-to-use CLAUDE.md templates for &lt;a href="https://github.com/MuhammadUsmanGM/claude-code-best-practices/blob/main/examples/claude-md-react.md" rel="noopener noreferrer"&gt;React/TypeScript&lt;/a&gt;, &lt;a href="https://github.com/MuhammadUsmanGM/claude-code-best-practices/blob/main/examples/claude-md-python.md" rel="noopener noreferrer"&gt;Python/FastAPI&lt;/a&gt;, &lt;a href="https://github.com/MuhammadUsmanGM/claude-code-best-practices/blob/main/examples/claude-md-monorepo.md" rel="noopener noreferrer"&gt;monorepos&lt;/a&gt;, and a &lt;a href="https://github.com/MuhammadUsmanGM/claude-code-best-practices/blob/main/examples/claude-md-minimal.md" rel="noopener noreferrer"&gt;minimal starter&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mistake 2: Writing vague prompts
&lt;/h2&gt;

&lt;p&gt;I used to say things like "fix the bug" or "clean up this file." Claude would explore broadly, make assumptions, and often miss the point entirely.&lt;/p&gt;

&lt;p&gt;The fix is embarrassingly simple: be specific.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Bad&lt;/span&gt;
"fix the bug"

&lt;span class="gh"&gt;# Good&lt;/span&gt;
"fix the null reference error in src/auth/login.ts:42
 where user.email is accessed before the null check"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Point Claude at the file. Give it the line number if you have it. Tell it the symptom and the expected behavior. The more specific you are, the fewer tokens Claude wastes exploring, and the better the result.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mistake 3: Never running /compact
&lt;/h2&gt;

&lt;p&gt;Every message you send gets more expensive as the conversation grows — all that history is re-sent with each new message. I used to let sessions run for 80–100 exchanges without thinking about it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/compact&lt;/code&gt; summarizes the conversation history, dramatically cutting context size. I now run it after every completed subtask:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/compact focus on the auth refactor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The optional focus hint tells the compressor what to preserve. Everything else gets aggressively summarized.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; &lt;code&gt;/compact&lt;/code&gt; every 20–30 exchanges, or whenever you finish one piece of work and move to the next.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mistake 4: Using --dangerously-skip-permissions in the wrong places
&lt;/h2&gt;

&lt;p&gt;This flag disables all permission prompts. Claude can read, write, execute, and commit without asking. It's necessary for CI pipelines — but I made the mistake of using it locally on repos containing production credentials.&lt;/p&gt;

&lt;p&gt;The rule I follow now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CI/CD pipelines and containers&lt;/strong&gt; → &lt;code&gt;--dangerously-skip-permissions&lt;/code&gt; is fine and necessary&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local development on anything sensitive&lt;/strong&gt; → never&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In CI, pair it with &lt;code&gt;--allowedTools&lt;/code&gt; to limit the blast radius:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"review src/ for bugs"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--dangerously-skip-permissions&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--allowedTools&lt;/span&gt; &lt;span class="s2"&gt;"Read,Grep,Glob"&lt;/span&gt;  &lt;span class="c"&gt;# read-only, no writes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Full CI/CD patterns are in the &lt;a href="https://github.com/MuhammadUsmanGM/claude-code-best-practices/blob/main/guides/ci-and-automation.md" rel="noopener noreferrer"&gt;CI and Automation guide&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mistake 5: No .claudeignore file
&lt;/h2&gt;

&lt;p&gt;Claude can read any file in your project. Without a &lt;code&gt;.claudeignore&lt;/code&gt;, that includes your &lt;code&gt;.env&lt;/code&gt; files, private keys, and credential configs.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.claudeignore&lt;/code&gt; uses the same syntax as &lt;code&gt;.gitignore&lt;/code&gt; and lives at your project root:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;.&lt;span class="n"&gt;env&lt;/span&gt;
.&lt;span class="n"&gt;env&lt;/span&gt;.*
&lt;span class="n"&gt;credentials&lt;/span&gt;/
*.&lt;span class="n"&gt;pem&lt;/span&gt;
*.&lt;span class="n"&gt;key&lt;/span&gt;
&lt;span class="n"&gt;secrets&lt;/span&gt;.&lt;span class="n"&gt;yaml&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Files matching these patterns are completely invisible to Claude. Use it liberally — there's no cost to ignoring files Claude doesn't need. More security patterns are in the &lt;a href="https://github.com/MuhammadUsmanGM/claude-code-best-practices/blob/main/guides/security-practices.md" rel="noopener noreferrer"&gt;Security Practices guide&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mistake 6: Trying to do too much in one session
&lt;/h2&gt;

&lt;p&gt;I used to start a session and just keep going — bug fix, new feature, refactor, PR description — all in one 120-message conversation. By the end, Claude was confused about which decisions we'd made and why.&lt;/p&gt;

&lt;p&gt;Claude works best with focused sessions. One goal per session. When you're done, commit and start fresh.&lt;/p&gt;

&lt;p&gt;For large tasks touching more than a handful of files, use plan mode first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plan how to refactor the authentication system to use JWT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Review the plan. Ask questions. Only then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;looks good, go ahead and implement it
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Mistake 7: Not setting up hooks
&lt;/h2&gt;

&lt;p&gt;Hooks let you run shell commands automatically when Claude performs an action. I went months without setting any up, which meant Claude's edits didn't always match my formatting standards and I had no audit trail.&lt;/p&gt;

&lt;p&gt;Two hooks I now use on every project:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Auto-format after every file edit:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"PostToolUse"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"matcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Edit|Write"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx prettier --write &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;$CLAUDE_FILE_PATH&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; 2&amp;gt;/dev/null || true"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Desktop notification when Claude finishes:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Notification"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"matcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"osascript -e 'display notification &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;$CLAUDE_NOTIFICATION&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; with title &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;Claude Code&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;'"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The notification sounds minor but is genuinely useful — Claude often finishes while you've switched windows and you don't notice for five minutes. More ready-to-use hook scripts are in the &lt;a href="https://github.com/MuhammadUsmanGM/claude-code-best-practices/blob/main/examples/hook-scripts.md" rel="noopener noreferrer"&gt;examples folder&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The repo
&lt;/h2&gt;

&lt;p&gt;All of this — and more — is in &lt;strong&gt;&lt;a href="https://github.com/MuhammadUsmanGM/claude-code-best-practices" rel="noopener noreferrer"&gt;claude-code-best-practices&lt;/a&gt;&lt;/strong&gt;. It includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Guides on CLAUDE.md setup, context management, cost management, MCP servers, multi-agent workflows, CI/CD automation, security practices, and team setup&lt;/li&gt;
&lt;li&gt;CLAUDE.md templates for React, Python/FastAPI, monorepos, and minimal projects&lt;/li&gt;
&lt;li&gt;Ready-to-use hook scripts and MCP server configurations&lt;/li&gt;
&lt;li&gt;A CONTRIBUTING.md so the community can help keep it current&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you've found patterns that work (or patterns that don't), PRs are open.&lt;/p&gt;




&lt;p&gt;What mistakes did I miss? Drop them in the comments — if enough people have hit the same wall, I'll add a guide.&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>productivity</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
