<?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: Ashadul Mridha</title>
    <description>The latest articles on DEV Community by Ashadul Mridha (@ashadulmridha).</description>
    <link>https://dev.to/ashadulmridha</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F874109%2Fa759e176-3d14-468e-9495-55ee227a9b7f.jpeg</url>
      <title>DEV Community: Ashadul Mridha</title>
      <link>https://dev.to/ashadulmridha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ashadulmridha"/>
    <language>en</language>
    <item>
      <title>Why Your Application Needs Observability: Building a Self-Hosted Observability Pipeline with the LGTM Stack (Loki, Grafana, Tempo, Mimir)</title>
      <dc:creator>Ashadul Mridha</dc:creator>
      <pubDate>Fri, 10 Jul 2026 12:53:37 +0000</pubDate>
      <link>https://dev.to/ashadulmridha/why-your-application-needs-observability-building-a-self-hosted-observability-pipeline-with-the-1pgm</link>
      <guid>https://dev.to/ashadulmridha/why-your-application-needs-observability-building-a-self-hosted-observability-pipeline-with-the-1pgm</guid>
      <description>&lt;h2&gt;
  
  
  Understanding Observability with the LGTM Stack
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;From "what happened last night?" to "here's exactly what happened and why" — in under 5 minutes&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;What Is Observability?&lt;/li&gt;
&lt;li&gt;
The Three Pillars of Observability

&lt;ul&gt;
&lt;li&gt;Metrics&lt;/li&gt;
&lt;li&gt;Logs&lt;/li&gt;
&lt;li&gt;Traces&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Why You Need All Three Together&lt;/li&gt;
&lt;li&gt;The LGTM Stack&lt;/li&gt;
&lt;li&gt;Architecture: How It All Fits Together&lt;/li&gt;
&lt;li&gt;OpenTelemetry: The Instrumentation Standard&lt;/li&gt;
&lt;li&gt;The OTel Collector: The Brain of the Pipeline&lt;/li&gt;
&lt;li&gt;Loki: Log Aggregation&lt;/li&gt;
&lt;li&gt;Tempo: Distributed Tracing&lt;/li&gt;
&lt;li&gt;Mimir: Metrics at Scale&lt;/li&gt;
&lt;li&gt;Grafana: Connecting the Dots&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Let me tell you a story that probably sounds familiar.&lt;/p&gt;

&lt;p&gt;It's 2 AM on a Sunday. Your API is slow. Users are complaining. But you're not at your desk — you're in a Sleeping, or just living your life. You have no idea it's even happening.&lt;/p&gt;

&lt;p&gt;The next morning you walk into the office and your boss meets you at the door.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Hey, the API was really slow yesterday around 2 AM. What happened?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And you're stuck. Completely stuck. You pull up the server logs — it's a wall of unformatted text. Maybe the issue already fixed itself. Maybe the container restarted overnight and the logs are gone. You weren't there, and your system left no trail.&lt;/p&gt;

&lt;p&gt;So you say the thing every developer dreads saying: &lt;em&gt;"I don't know. I'll look into it."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now imagine the exact same situation — but this time you have observability set up.&lt;/p&gt;

&lt;p&gt;You open your dashboard, set the time range to yesterday 2 AM, and within two minutes you can see everything. Response times spiked to 4 seconds. The database connection pool got exhausted. And it started the exact moment a scheduled batch job kicked off and hammered the DB with hundreds of queries at once.&lt;/p&gt;

&lt;p&gt;You have a graph. You have traces. You have the exact log line that caused it.&lt;/p&gt;

&lt;p&gt;You walk back to your boss with your laptop: &lt;em&gt;"Here's what happened and here's the fix."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That's observability.&lt;/strong&gt; Your system tells its own story — even when you're not watching.&lt;/p&gt;

&lt;p&gt;That's what this blog is about. I'll walk you through what observability actually means, the three types of data that make it work, and the LGTM stack — an open-source toolset that brings it all together beautifully.&lt;/p&gt;

&lt;p&gt;No prior knowledge needed. Let's start from zero.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is Observability?
&lt;/h2&gt;

&lt;p&gt;At its core, &lt;strong&gt;observability&lt;/strong&gt; is the ability to understand what's happening inside your system just by looking at what it's putting out — without having to poke around, add new code, or redeploy anything.&lt;/p&gt;

&lt;p&gt;The word comes from control engineering. A system is "observable" if you can figure out its internal state purely from its outputs. Applied to software, the question is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Based on what my system is emitting right now — its logs, its metrics, its traces — can I answer any question about what it's doing?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If yes, your system is observable. If you're flying blind, it's not.&lt;/p&gt;

&lt;h3&gt;
  
  
  Observability Is Not the Same as Monitoring
&lt;/h3&gt;

&lt;p&gt;People use these words interchangeably, but they mean different things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitoring&lt;/strong&gt; is about watching for things you already know could go wrong. You set a threshold — "alert me if error rate goes above 5%" — and you wait. It's reactive. It only catches known problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Observability&lt;/strong&gt; is about being able to investigate &lt;em&gt;anything&lt;/em&gt;, including things you never anticipated. It's not just "is something broken?" — it's "what broke, why, when, and who was affected?"&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Monitoring&lt;/th&gt;
&lt;th&gt;Observability&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Question it answers&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;"Is it working?"&lt;/td&gt;
&lt;td&gt;"Why is it broken?"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Approach&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Pre-defined alerts and dashboards&lt;/td&gt;
&lt;td&gt;Open-ended investigation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Good for&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Known failure modes&lt;/td&gt;
&lt;td&gt;Unknown, unexpected problems&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Limitation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Can't help with surprises&lt;/td&gt;
&lt;td&gt;Requires instrumentation upfront&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Think of it this way: monitoring is a smoke alarm. Observability is having a camera, floor plan, and fire inspector — so you can figure out exactly where the fire started and why.&lt;/p&gt;

&lt;p&gt;You need both. But monitoring alone will leave you helpless when something you didn't expect goes wrong. And in production, the unexpected is the norm.&lt;/p&gt;

&lt;h3&gt;
  
  
  When Does Observability Really Matter?
&lt;/h3&gt;

&lt;p&gt;Short answer: as soon as your system is more complex than a single script running on one machine.&lt;/p&gt;

&lt;p&gt;But let's be honest — if you have a personal project with 10 users, basic &lt;code&gt;console.log&lt;/code&gt; probably works fine. The pain hits when the system grows. Here's how to recognize the tipping point:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario 1: A user reports "the checkout is broken"&lt;/strong&gt;&lt;br&gt;
You check your logs. You see the request hit your API. No error. But the order never went through. Where did it break? The payment service? The inventory check? The email queue? Without observability, you're grep-ing through logs across 4 services, hoping to piece together what happened. With observability, you pull up one trace and see the full picture in seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario 2: A background job fails silently at 3 AM&lt;/strong&gt;&lt;br&gt;
No alert fires. No user complains immediately. Hours later you notice thousands of emails weren't sent. You have no idea when it broke, which jobs were affected, or what the error was — because the container restarted and took the logs with it. Observability would have caught the spike in job failures the moment it started.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario 3: Your API looks healthy, but users are angry&lt;/strong&gt;&lt;br&gt;
Average response time: 120ms. P99 response time: 8 seconds. Your averages are lying to you. A small percentage of users are hitting a slow database query, but it's buried in the noise. Metrics with proper histograms surface this immediately.&lt;/p&gt;



&lt;p&gt;Here's a quick rule of thumb:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;If your system has...&lt;/th&gt;
&lt;th&gt;You need...&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1 service, &amp;lt;100 users&lt;/td&gt;
&lt;td&gt;Basic logging is fine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multiple services&lt;/td&gt;
&lt;td&gt;Distributed tracing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Background workers / queues&lt;/td&gt;
&lt;td&gt;Metrics + alerting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Containers (Docker/K8s)&lt;/td&gt;
&lt;td&gt;Centralized log aggregation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;External APIs / third parties&lt;/td&gt;
&lt;td&gt;Error rate tracking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Any paying users&lt;/td&gt;
&lt;td&gt;All of the above&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The bottom line: observability isn't about being fancy. It's about being able to answer &lt;em&gt;"what is broken, where, and why"&lt;/em&gt; without waking up four engineers at 2 AM to find out.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Three Pillars of Observability
&lt;/h2&gt;

&lt;p&gt;There are three types of data that together give you a complete picture of your system. Each one answers a different kind of question. Miss any one of them and you'll have blind spots.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌──────────────────────────────────────────────────────┐
│                   OBSERVABILITY                      │
│                                                      │
│   ┌──────────┐    ┌──────────┐    ┌──────────────┐  │
│   │ METRICS  │    │  LOGS    │    │   TRACES     │  │
│   │          │    │          │    │              │  │
│   │ "What?"  │    │  "What   │    │ "Where and   │  │
│   │          │    │happened?"│    │   when?"     │  │
│   └──────────┘    └──────────┘    └──────────────┘  │
└──────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  1. Metrics
&lt;/h3&gt;

&lt;p&gt;Metrics are numbers that your system continuously measures and records over time. Things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How many requests per second is my API handling right now?&lt;/li&gt;
&lt;li&gt;What's the 95th percentile response time over the last hour?&lt;/li&gt;
&lt;li&gt;How many payment failures happened in the last 5 minutes?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of metrics like the dashboard in your car — you glance at it and immediately know your speed, fuel level, and engine temperature without having to pop the hood. Metrics are cheap to store, fast to query, and perfect for alerts.&lt;/p&gt;

&lt;h4&gt;
  
  
  Types of Metrics
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Counter&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A number that only goes up&lt;/td&gt;
&lt;td&gt;Total requests, total errors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Histogram&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Distribution of values across ranges&lt;/td&gt;
&lt;td&gt;Response times, order amounts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Gauge&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A snapshot value that can go up or down&lt;/td&gt;
&lt;td&gt;Active DB connections, memory usage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;UpDownCounter&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Like a counter but can decrease too&lt;/td&gt;
&lt;td&gt;Active background jobs in the queue&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  The RED Method — A Simple Starting Point
&lt;/h4&gt;

&lt;p&gt;If you don't know where to start with metrics, use RED. It stands for three things every HTTP service should track:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;R&lt;/strong&gt;ate — how many requests per second?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;E&lt;/strong&gt;rrors — what percentage of requests are failing?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;D&lt;/strong&gt;uration — how long are requests taking?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Track these per endpoint and over time, and you've got a solid foundation. You'll immediately see when something starts degrading — even before users start complaining.&lt;/p&gt;

&lt;h4&gt;
  
  
  Don't Stop at Infrastructure Metrics
&lt;/h4&gt;

&lt;p&gt;CPU usage and memory matter, but they don't tell the whole story. &lt;strong&gt;Business metrics&lt;/strong&gt; are often more useful:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Infrastructure:  http_request_duration_p99 &amp;gt; 2s    ← okay, something's slow
Business:        payments_failed_total + 340        ← 340 payments are failing!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The infrastructure metric tells you there's a problem. The business metric tells you how bad it actually is. Add both.&lt;/p&gt;

&lt;h4&gt;
  
  
  Checking CPU and RAM Right Now
&lt;/h4&gt;

&lt;p&gt;Here's what actually checking infrastructure health looks like in practice. These PromQL queries run in Grafana against Mimir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# CPU usage % — how much of the CPU is your process consuming right now?
rate(process_cpu_seconds_total[1m]) * 100

# Memory used in MB — how much RAM is the Node process holding?
process_resident_memory_bytes / 1024 / 1024

# Host-level memory usage % — what fraction of the server's RAM is in use?
(1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) * 100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first two come from the OTel SDK automatically for any Node.js process. The third (&lt;code&gt;node_memory_*&lt;/code&gt;) comes from the &lt;code&gt;hostmetrics&lt;/code&gt; receiver in the OTel Collector — the one that scrapes the machine itself. Once that receiver is enabled, you get CPU, memory, disk, and network for free without writing a line of application code.&lt;/p&gt;

&lt;p&gt;So yes: run those three queries in Grafana and you can see exactly how your CPU and RAM are doing right now.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Logs
&lt;/h3&gt;

&lt;p&gt;Logs are text records of specific things that happened in your system, with timestamps. They answer the "what exactly happened?" questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What was the error message at 02:34 AM?&lt;/li&gt;
&lt;li&gt;What was in the request body when it failed?&lt;/li&gt;
&lt;li&gt;Did the retry succeed on the second attempt or the third?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Logs are the most familiar tool — every developer has used them. But there's a big difference between logs that are actually useful and logs that just make you feel like you're doing something.&lt;/p&gt;

&lt;h4&gt;
  
  
  Structured Logs vs. Plain Text Logs
&lt;/h4&gt;

&lt;p&gt;Most people start with plain text logs. They look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[2026-04-13 02:34:11] ERROR Payment failed for order ORD-12345
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is fine for reading manually. But at scale, when you're sifting through millions of log lines across multiple services, it's nearly useless. You can't filter by order ID. You can't group by error type. You're back to guessing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structured logs&lt;/strong&gt; fix this. Instead of a sentence, you write a JSON object with consistent fields:&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;"timestamp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-04-13T02:34:11.000Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"level"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"service"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"payment-service"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"correlationId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"f47ac10b-58cc-4372-a567-0e02b2c3d479"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"orderId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ORD-12345"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Payment gateway timeout"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"attempt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"durationMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2001&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;Now you can query: &lt;em&gt;show me all errors for order ORD-12345 across every service, sorted by time.&lt;/em&gt; One query. Done.&lt;/p&gt;

&lt;h4&gt;
  
  
  Correlation IDs — The Glue Between Services
&lt;/h4&gt;

&lt;p&gt;Here's a problem you'll run into quickly in any multi-service system. A single user request might create 20 log entries across 4 different services. Without something connecting them, those entries look completely unrelated.&lt;/p&gt;

&lt;p&gt;The solution is a &lt;strong&gt;correlation ID&lt;/strong&gt; — a unique identifier that gets created at the very start of a request and passed along to every service and background job it touches.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User sends request → ID generated: "f47ac10b"

  auth-service     → {"correlationId": "f47ac10b", "message": "Token validated"}
  order-service    → {"correlationId": "f47ac10b", "message": "Order created"}
  payment-worker   → {"correlationId": "f47ac10b", "message": "Payment gateway timeout"}
  notification-svc → {"correlationId": "f47ac10b", "message": "Email queued"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now finding everything related to that one user's request is a single filter: &lt;code&gt;correlationId = "f47ac10b"&lt;/code&gt;. It's a simple idea with an enormous payoff.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Traces
&lt;/h3&gt;

&lt;p&gt;Traces are the most powerful and also the least understood of the three pillars. Let me explain it simply.&lt;/p&gt;

&lt;p&gt;When a user makes a request to your API, it doesn't just go to one place. It might:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Hit your API server&lt;/li&gt;
&lt;li&gt;Query the database&lt;/li&gt;
&lt;li&gt;Call an external payment API&lt;/li&gt;
&lt;li&gt;Push a job to a background queue&lt;/li&gt;
&lt;li&gt;Have a worker pick up that job and do more things&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A &lt;strong&gt;trace&lt;/strong&gt; records all of that as one connected picture. You can see every step, how long each one took, and exactly how they're related.&lt;/p&gt;

&lt;p&gt;Here's what a trace actually looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST /orders  [total: 412ms]
├── validate user token        [12ms]
├── fetch product from DB      [22ms]
├── check inventory level      [47ms]
├── calculate price with tax   [8ms]
├── write order to database    [31ms]
├── push payment job to queue  [12ms]
└── push notification to queue [9ms]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each line is called a &lt;strong&gt;span&lt;/strong&gt; — a single named operation with a start time and duration. They all share the same trace ID, so you know they belong together.&lt;/p&gt;

&lt;h4&gt;
  
  
  Quick Glossary
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Trace&lt;/strong&gt; — the full journey of one request from start to finish&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Span&lt;/strong&gt; — one specific operation within that journey&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trace ID&lt;/strong&gt; — a unique ID that ties all the spans together&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parent span&lt;/strong&gt; — the operation that triggered another (e.g., the HTTP request that triggered the DB query)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  The Real Power: Following a Request Across Services
&lt;/h4&gt;

&lt;p&gt;Here's where traces get really valuable. When a background worker picks up the payment job later, it can continue the same trace. So the full picture looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST /orders  [412ms]
└── payment-worker: process job  [1.8s]
    ├── call payment gateway     [1.7s]  ← here's your problem
    └── update order status      [40ms]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without traces, you'd know something was slow. With traces, you know &lt;em&gt;exactly&lt;/em&gt; what was slow and by how much — even across async boundaries that are invisible to logs and metrics.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why You Need All Three Together
&lt;/h2&gt;

&lt;p&gt;Here's the thing: each pillar alone is useful, but none of them is enough on its own.&lt;/p&gt;

&lt;p&gt;Metrics tell you something is wrong. They don't tell you why.&lt;br&gt;&lt;br&gt;
Logs tell you what happened. They don't tell you where in the call chain it started.&lt;br&gt;&lt;br&gt;
Traces show you the flow. They don't always show you the context and details.&lt;/p&gt;

&lt;p&gt;When you combine all three around the same event, you get the full picture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Step 1 — METRICS: alert fires
  "payment failure rate &amp;gt; 20% in the last 5 minutes"

Step 2 — TRACES: find the broken requests
  All failing orders have a payment-gateway span with status = TIMEOUT
  Duration: 2001ms — they're hitting the 2-second ceiling every time

Step 3 — LOGS: find out why
  Filter by that trace's correlationId
  "Payment gateway connection refused — attempt 3 of 3"
  "All retries exhausted. Marking order as payment_failed."

Root cause: the payment gateway API is unreachable
Impact: 47 orders failed in the last 5 minutes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Metrics caught it. Traces located it. Logs explained it. No SSH. No guessing. No "I'll have to look into it."&lt;/p&gt;

&lt;p&gt;That's the goal.&lt;/p&gt;




&lt;h2&gt;
  
  
  The LGTM Stack
&lt;/h2&gt;

&lt;p&gt;Now let's talk about the tools. &lt;strong&gt;LGTM&lt;/strong&gt; is an open-source observability stack where each letter stands for one tool, each designed for one signal type:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Letter&lt;/th&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;What It Does&lt;/th&gt;
&lt;th&gt;Query Language&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;L&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Loki&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Stores and searches logs&lt;/td&gt;
&lt;td&gt;LogQL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;G&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Grafana&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Dashboards, alerts, and visualization&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;T&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Tempo&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Stores and searches distributed traces&lt;/td&gt;
&lt;td&gt;TraceQL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;M&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Mimir&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Stores metrics (Prometheus-compatible)&lt;/td&gt;
&lt;td&gt;PromQL&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;All four are open-source projects from Grafana Labs, and they're designed to talk to each other out of the box — especially inside Grafana.&lt;/p&gt;

&lt;p&gt;On top of these four, there's one more piece that makes the whole thing work: the &lt;strong&gt;OpenTelemetry Collector&lt;/strong&gt;. It sits between your application and the stack, receives all your telemetry, and routes it to the right place.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why This Stack Over Paid Alternatives?
&lt;/h3&gt;

&lt;p&gt;There are great paid observability platforms — Datadog, New Relic, Dynatrace. They're excellent. But they come with trade-offs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cost&lt;/strong&gt; — at scale, these services can be surprisingly expensive&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vendor lock-in&lt;/strong&gt; — your instrumentation is tied to their SDK&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data control&lt;/strong&gt; — your logs and traces live on their servers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The LGTM stack gives you everything a paid platform does, completely self-hosted, with no per-seat or per-GB pricing. The trade-off is that you have to run it yourself. But with Docker Compose or Kubernetes, that's much easier than it sounds.&lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture: How It All Fits Together
&lt;/h2&gt;

&lt;p&gt;Here's the full data flow from your application all the way to the dashboards:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌──────────────────────────────────────────────────────────────┐
│                    Your Backend Application                  │
│                                                              │
│  ┌─────────────┐  ┌────────────────┐  ┌──────────────────┐  │
│  │   Logger    │  │ Metrics Client │  │   Tracing SDK    │  │
│  │ (structured │  │  (counters,    │  │  (auto + manual  │  │
│  │    JSON)    │  │  histograms)   │  │    spans)        │  │
│  └──────┬──────┘  └───────┬────────┘  └────────┬─────────┘  │
│         └─────────────────┴────────────────────┘            │
│                           │                                  │
│              OTLP (OpenTelemetry Protocol)                   │
└───────────────────────────┼──────────────────────────────────┘
                            │
                            ▼
┌──────────────────────────────────────────────────────────────┐
│                  OpenTelemetry Collector                     │
│                                                              │
│  Receive → Process (batch, filter, enrich) → Export          │
│                                                              │
│    Logs    ────────────────────────────────► Loki            │
│    Metrics ────────────────────────────────► Mimir           │
│    Traces  ────────────────────────────────► Tempo           │
└──────────────────────────────────────────────────────────────┘
                │                  │                 │
                ▼                  ▼                 ▼
          ┌──────────┐      ┌──────────┐      ┌──────────┐
          │   Loki   │      │  Mimir   │      │  Tempo   │
          │  (Logs)  │      │(Metrics) │      │ (Traces) │
          │  LogQL   │      │  PromQL  │      │ TraceQL  │
          └────┬─────┘      └────┬─────┘      └────┬─────┘
               └────────────────┼─────────────────┘
                                │
                                ▼
               ┌─────────────────────────────┐
               │           Grafana            │
               │                             │
               │  Dashboards · Alerts        │
               │  Trace Explorer             │
               │  Log Explorer               │
               │  Cross-signal correlation   │
               └─────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The core idea here is &lt;strong&gt;your application only talks to one place&lt;/strong&gt; — the Collector. It doesn't need to know about Loki, Mimir, or Tempo. The Collector handles the routing.&lt;/p&gt;




&lt;h2&gt;
  
  
  OpenTelemetry: The Instrumentation Standard
&lt;/h2&gt;

&lt;p&gt;Before getting into each LGTM component, there's one thing worth understanding first: &lt;strong&gt;OpenTelemetry&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;OpenTelemetry (OTel for short) is an open-source framework that gives you a standard, vendor-neutral way to instrument your application. It was created by merging two earlier projects (OpenCensus and OpenTracing) and is now backed by the CNCF with adoption across pretty much every major company and cloud provider.&lt;/p&gt;

&lt;p&gt;What does it actually give you?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;APIs&lt;/strong&gt; — standard interfaces for emitting logs, metrics, and traces from your code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SDKs&lt;/strong&gt; — implementations for Node.js, Python, Java, Go, .NET, Ruby, and more&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto-instrumentation&lt;/strong&gt; — it can automatically patch popular libraries with zero code changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OTLP&lt;/strong&gt; — a standard wire protocol for sending telemetry data to any backend&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Instrument once, change backends freely.&lt;/strong&gt; Your instrumentation is permanent. Your backend is swappable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Auto-Instrumentation Is a Game Changer
&lt;/h3&gt;

&lt;p&gt;One of my favourite things about OTel is auto-instrumentation. For most popular frameworks and libraries, OTel can automatically create spans and collect metrics without you writing a single line of tracing code:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Library&lt;/th&gt;
&lt;th&gt;What you get automatically&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;HTTP server&lt;/td&gt;
&lt;td&gt;Span for every incoming request, status code, duration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HTTP client&lt;/td&gt;
&lt;td&gt;Span for every outgoing request with URL and status&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PostgreSQL / MySQL&lt;/td&gt;
&lt;td&gt;Span for every query with the SQL statement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Redis&lt;/td&gt;
&lt;td&gt;Span for every command&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Express / NestJS / FastAPI&lt;/td&gt;
&lt;td&gt;Route handler spans, middleware spans&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BullMQ / Kafka&lt;/td&gt;
&lt;td&gt;Job processing spans&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For a typical backend, auto-instrumentation alone covers about 80% of what you need. You only add manual spans for the business logic that the framework can't see on its own.&lt;/p&gt;




&lt;h2&gt;
  
  
  The OTel Collector: The Brain of the Pipeline
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;OpenTelemetry Collector&lt;/strong&gt; is a standalone service that receives all the telemetry from your application and routes it to the right storage backend.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Your App  ──OTLP──►  OTel Collector  ──────►  Loki / Tempo / Mimir
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why Not Just Send Directly to Each Backend?
&lt;/h3&gt;

&lt;p&gt;You could skip the Collector and have your app send logs directly to Loki, traces directly to Tempo, and metrics directly to Mimir. It would work. But you'd lose a lot.&lt;/p&gt;

&lt;p&gt;With the Collector in the middle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your app has one endpoint to worry about — the Collector handles the rest&lt;/li&gt;
&lt;li&gt;You can batch data before sending, which is much more efficient&lt;/li&gt;
&lt;li&gt;You can filter, sample, or transform data in one place without touching your app&lt;/li&gt;
&lt;li&gt;You can add backends, remove backends, or change routing without redeploying your service&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's a small operational overhead that pays for itself quickly.&lt;/p&gt;

&lt;h3&gt;
  
  
  How the Collector Is Configured: Receivers → Processors → Exporters
&lt;/h3&gt;

&lt;p&gt;The Collector works as a pipeline in three stages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Receivers          Processors         Exporters
─────────          ──────────         ─────────
OTLP (gRPC)  ──►  Batch        ──►  Loki    (logs)
OTLP (HTTP)  ──►  Filter       ──►  Tempo   (traces)
Host Metrics ──►  Attributes   ──►  Mimir   (metrics)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Receivers&lt;/strong&gt; are how data gets in. The &lt;code&gt;otlp&lt;/code&gt; receiver accepts data from your app over gRPC or HTTP. There's also a &lt;code&gt;hostmetrics&lt;/code&gt; receiver that automatically scrapes CPU, memory, disk, and network stats from the host machine — you get infrastructure metrics without writing a single line of application code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Processors&lt;/strong&gt; sit in the middle and can transform data before it goes out. The most common is &lt;code&gt;batch&lt;/code&gt;, which groups records together for efficient transmission. You can also add processors to sample traces (so you don't store every single one), redact sensitive fields like passwords, or enrich data with extra metadata.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exporters&lt;/strong&gt; are how data gets out. Each backend has its own exporter configured with the right protocol — logs to Loki, metrics to Mimir, traces to Tempo.&lt;/p&gt;




&lt;h2&gt;
  
  
  Loki: Log Aggregation
&lt;/h2&gt;

&lt;p&gt;Loki is where your logs live. It's built by Grafana Labs with one guiding philosophy: &lt;strong&gt;index labels, not log content&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Makes Loki Different
&lt;/h3&gt;

&lt;p&gt;If you've used Elasticsearch before, you're used to the idea that every word in every log line gets indexed. This makes searches very fast but also makes storage very expensive at scale. Indexing millions of log lines burns a lot of disk and RAM.&lt;/p&gt;

&lt;p&gt;Loki takes a fundamentally different approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It only indexes &lt;strong&gt;labels&lt;/strong&gt; — a small set of key-value pairs like &lt;code&gt;service=payment-service, level=error&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The actual log content is stored compressed and unindexed&lt;/li&gt;
&lt;li&gt;When you query by content, Loki scans only the compressed chunks that match your labels&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result? Loki is dramatically cheaper to operate than Elasticsearch, while still being fast enough for the most common queries you'll actually run.&lt;/p&gt;

&lt;h3&gt;
  
  
  LogQL — Loki's Query Language
&lt;/h3&gt;

&lt;p&gt;LogQL lets you filter logs by labels and content. For example, to find all error logs for a specific order:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{service="payment-service"} | json | orderId="ORD-12345"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  One Thing to Get Right: Label Cardinality
&lt;/h3&gt;

&lt;p&gt;Good labels are &lt;strong&gt;low cardinality&lt;/strong&gt; — &lt;code&gt;service&lt;/code&gt;, &lt;code&gt;level&lt;/code&gt;, &lt;code&gt;environment&lt;/code&gt;. Never use &lt;code&gt;user_id&lt;/code&gt; or &lt;code&gt;request_id&lt;/code&gt; as labels. High-cardinality labels blow up Loki's index and kill performance. If you need to search by something unique like a correlation ID, put it in the log body — not as a label.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tempo: Distributed Tracing
&lt;/h2&gt;

&lt;p&gt;Tempo is where your traces live. It's purpose-built for storing and querying distributed traces at high volume.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Tempo Stores Traces
&lt;/h3&gt;

&lt;p&gt;Tempo is optimized for ingestion — it can take in a huge volume of spans without slowing down. Traces are stored as compressed blocks on disk. You can configure retention to control how long they're kept.&lt;/p&gt;

&lt;h3&gt;
  
  
  Finding a Trace
&lt;/h3&gt;

&lt;p&gt;The simplest way: paste a trace ID. When your app includes the trace ID in its response headers (which OTel does by default), you grab it, open Tempo in Grafana, and paste it in. You instantly see the full trace — every span, every timing, every attribute.&lt;/p&gt;

&lt;h3&gt;
  
  
  TraceQL — Searching Traces Like a Pro
&lt;/h3&gt;

&lt;p&gt;What if you don't have a specific trace ID? TraceQL lets you search by the shape and attributes of traces:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Find traces where the payment service had an error
{ span.service.name = "payment-service" &amp;amp;&amp;amp; status = error }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is incredibly useful for finding the outliers — the slow requests, the error-producing requests — without knowing their trace IDs in advance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bonus: Automatic Metrics from Traces
&lt;/h3&gt;

&lt;p&gt;Tempo has a built-in &lt;strong&gt;metrics generator&lt;/strong&gt; that reads your trace data and automatically derives RED metrics (rate, error rate, duration) and writes them to Mimir. This means you get latency percentile graphs and error rates &lt;em&gt;for free&lt;/em&gt;, derived directly from real trace data.&lt;/p&gt;

&lt;p&gt;It also generates a &lt;strong&gt;service graph&lt;/strong&gt; — a visual map of which services talk to which, built automatically from your spans. This is fantastic for understanding how your system is actually wired together, especially in larger architectures.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mimir: Metrics at Scale
&lt;/h2&gt;

&lt;p&gt;Mimir is where your metrics live. It's a Prometheus-compatible metrics backend that's built to scale horizontally.&lt;/p&gt;

&lt;h3&gt;
  
  
  Isn't Prometheus Enough?
&lt;/h3&gt;

&lt;p&gt;Prometheus is great for getting started, and a lot of teams run it happily in production. But it has some real limitations as you grow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All storage is local — if the machine dies, your metrics history might go with it&lt;/li&gt;
&lt;li&gt;Long-term retention gets expensive because Prometheus keeps everything in memory-mapped files&lt;/li&gt;
&lt;li&gt;High-cardinality metrics (lots of unique label combinations) can push Prometheus to its memory limits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Mimir solves all of these with a distributed architecture. The best part? It's 100% PromQL compatible. Every query you've written for Prometheus works unchanged in Mimir. Every Grafana dashboard you've built works without modification.&lt;/p&gt;

&lt;h3&gt;
  
  
  PromQL — Querying Metrics
&lt;/h3&gt;

&lt;p&gt;PromQL is the query language for Prometheus-compatible metrics. Once you understand the &lt;code&gt;rate()&lt;/code&gt; pattern, most of what you need falls naturally into place:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# 95th percentile response time
histogram_quantile(0.95, sum by (le) (rate(http_server_request_duration_bucket[5m])))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For infrastructure, the &lt;code&gt;hostmetrics&lt;/code&gt; receiver in the OTel Collector automatically scrapes CPU, memory, disk, and network from the host — no application code needed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Host-level memory usage %
(1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) * 100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Grafana: Connecting the Dots
&lt;/h2&gt;

&lt;p&gt;Grafana is the front door to everything. It connects to Loki, Tempo, and Mimir as datasources and gives you one unified place to explore, visualize, and alert on all of your observability data.&lt;/p&gt;

&lt;p&gt;But Grafana is more than just a dashboard tool. The feature that really sets it apart is &lt;strong&gt;cross-signal correlation&lt;/strong&gt; — the ability to jump between signals with a single click.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Cross-Signal Correlation Works
&lt;/h3&gt;

&lt;p&gt;When you configure Grafana's datasources properly, it links everything together:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A log entry that contains a &lt;code&gt;traceId&lt;/code&gt; gets a clickable button → click it, jump straight to that trace in Tempo&lt;/li&gt;
&lt;li&gt;A trace in Tempo has a "Logs" button → click it, Loki opens pre-filtered to that trace's time window and service&lt;/li&gt;
&lt;li&gt;Tempo's trace view can also show derived metrics from Mimir alongside the timeline&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This sounds small. It's not. It means you can start your investigation anywhere — a metric alert, a slow trace, a single error log — and navigate to the full picture in three clicks.&lt;/p&gt;

&lt;h3&gt;
  
  
  What a Real Investigation Looks Like in Grafana
&lt;/h3&gt;

&lt;p&gt;Let me walk through the boss scenario from the beginning — but now with Grafana:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You arrive at work. Boss says: "API was slow yesterday at 2 PM."

Step 1 — Open Grafana, set time range to yesterday 2 PM - 3 PM
  → Metrics dashboard shows: response time spike to 4.2s starting at 14:07
  → Error rate: 0% — so nothing crashed, just slow

Step 2 — Switch to Traces, filter by time range, sort by duration
  → Top slow traces: all on GET /products
  → Open one — the DB query span is 3.8s out of 4.2s total

Step 3 — Click "Logs" on that trace
  → Loki opens, filtered to that trace's correlationId
  → "Slow query detected: 3821ms — SELECT * FROM products WHERE..."
  → "Auto-vacuum running on products table"

Root cause: PostgreSQL auto-vacuum ran during peak hours and locked the table.
Fix: Schedule auto-vacuum for off-peak hours.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You have graphs, traces, and logs. You have a root cause. You have a fix. Your boss is happy.&lt;/p&gt;

&lt;p&gt;No SSH. No grepping. No guessing.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Let me come back to where we started.&lt;/p&gt;

&lt;p&gt;You walk into the office. Your boss asks what happened at 2 PM yesterday. Before, you had nothing. Now, you open Grafana, spend two minutes clicking through metrics → traces → logs, and you hand your boss a complete picture with a root cause and a fix.&lt;/p&gt;

&lt;p&gt;That's the real value of observability. It's not about fancy tools or complex architectures. It's about making sure your system leaves a trail — so that when something goes wrong (and something always goes wrong), you can figure out what happened without being there when it happened.&lt;/p&gt;

&lt;p&gt;The LGTM stack gives you everything you need to build that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Loki&lt;/strong&gt; stores your logs efficiently and makes them searchable&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grafana&lt;/strong&gt; brings everything together in one UI with built-in signal correlation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tempo&lt;/strong&gt; captures complete traces across every service and async worker&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mimir&lt;/strong&gt; stores your metrics at any scale with full Prometheus compatibility&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenTelemetry&lt;/strong&gt; provides vendor-neutral instrumentation — instrument once, stay flexible forever&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And here's the thing: you don't have to build all of this at once.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start with structured logs.&lt;/strong&gt; Add JSON formatting and a correlation ID to your requests. That alone will make debugging dramatically easier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Then add metrics.&lt;/strong&gt; Track the RED method — rate, errors, duration — for your most important endpoints. Set up an alert.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Then add tracing.&lt;/strong&gt; Once you have logs and metrics, traces fill in the last gaps — showing you exactly what path each request took.&lt;/p&gt;

&lt;p&gt;Each step builds on the last. Each step makes your system a little less of a black box. And once you've traced your first real production bug from alert to root cause in under 5 minutes, I promise you'll never want to go back to grepping log files at 2 AM.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Stack versions: Loki 3.4.2 · Grafana 11.6.0 · Tempo 2.6.1 · Mimir 2.14.0 · OpenTelemetry Collector 0.120.0 · OpenTelemetry SDK 0.213.0&lt;/em&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>devops</category>
      <category>monitoring</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Claude Code: সম্পূর্ণ বাংলা গাইড</title>
      <dc:creator>Ashadul Mridha</dc:creator>
      <pubDate>Fri, 16 Jan 2026 18:13:43 +0000</pubDate>
      <link>https://dev.to/ashadulmridha/claude-code-smpuurnn-baanlaa-gaaidd-2b8m</link>
      <guid>https://dev.to/ashadulmridha/claude-code-smpuurnn-baanlaa-gaaidd-2b8m</guid>
      <description>&lt;p&gt;Terminal খুলে natural language-এ instruction দিলেই যদি আপনার project setup হয়ে যায়, test run হয়, deployment ready হয় - এমন experience চাইলে Claude Code একবার দেখতে পারেন।&lt;/p&gt;

&lt;p&gt;Claude Code নিয়ে অনেকেই শুনেছেন, কিন্তু Agents, Skills, Hooks, Slash Command কী, Plugins আর MCP আসলে কীভাবে কাজ করে - এই basic জিনিসগুলো পরিষ্কার না থাকলে এটার আসল power বোঝা মুশকিল।&lt;/p&gt;

&lt;p&gt;এই পোস্টে Claude Code-এর core concepts গুলো simple ভাবে explain করব - যেন আপনি বুঝতে পারেন এটা দিয়ে আসলে কী কী করা সম্ভব, আর কীভাবে এটা আপনার কাজে লাগাতে পারবেন।&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[Agents]&lt;/li&gt;
&lt;li&gt;[Skills]&lt;/li&gt;
&lt;li&gt;[Hooks]&lt;/li&gt;
&lt;li&gt;[Slash Commands]&lt;/li&gt;
&lt;li&gt;[Plugins]&lt;/li&gt;
&lt;li&gt;[File Structure]&lt;/li&gt;
&lt;li&gt;[Quick Reference]&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Agents
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Agents কী?
&lt;/h3&gt;

&lt;p&gt;Agents বলতে মূলত Claude-এর এমন কিছু সহকারীকে বোঝায়, যাদের প্রত্যেকটা নির্দিষ্ট একটা কাজের জন্য ব্যবহার করা হয়। বড় কোনো প্রজেক্ট একা একটানা সামলানো অনেক সময় কঠিন হয়ে যায়। তাই প্রজেক্টকে ছোট ছোট অংশে ভাগ করে নেওয়া হয়, আর সেই অংশগুলো আলাদা আলাদা Agent দেখাশোনা করে।&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;সুবিধা:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;কাজগুলো আরও গুছিয়ে করা যায়&lt;/li&gt;
&lt;li&gt;একসাথে একাধিক কাজ এগোয়&lt;/li&gt;
&lt;li&gt;ভুল কম হয় এবং output quality ভালো হয়&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  বাস্তব উদাহরণ
&lt;/h3&gt;

&lt;p&gt;ধরুন আপনি একটা Full Stack ইকমার্সের অ্যাপ্লিকেশন বানাচ্ছেন। এখানে আপনি বিভিন্ন agent তৈরি করতে পারেন:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Frontend Development এর জন্য:&lt;/strong&gt;&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;# .claude/agents/frontend-agent.md&lt;/span&gt;

You are a frontend development specialist focused on React and modern UI/UX.

&lt;span class="gu"&gt;## Your Responsibilities&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Build responsive React components
&lt;span class="p"&gt;-&lt;/span&gt; Implement state management
&lt;span class="p"&gt;-&lt;/span&gt; Ensure accessibility standards
&lt;span class="p"&gt;-&lt;/span&gt; Optimize performance

&lt;span class="gu"&gt;## Technologies&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; React 18+
&lt;span class="p"&gt;-&lt;/span&gt; Tailwind CSS
&lt;span class="p"&gt;-&lt;/span&gt; React Query
&lt;span class="p"&gt;-&lt;/span&gt; TypeScript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Backend Development এর জন্য:&lt;/strong&gt;&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;# .claude/agents/backend-agent.md&lt;/span&gt;

You are a backend development expert specializing in Node.js and Express.

&lt;span class="gu"&gt;## Your Responsibilities&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Design RESTful APIs
&lt;span class="p"&gt;-&lt;/span&gt; Database schema design
&lt;span class="p"&gt;-&lt;/span&gt; Authentication &amp;amp; Authorization
&lt;span class="p"&gt;-&lt;/span&gt; Error handling and logging

&lt;span class="gu"&gt;## Technologies&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Node.js
&lt;span class="p"&gt;-&lt;/span&gt; Express.js
&lt;span class="p"&gt;-&lt;/span&gt; PostgreSQL
&lt;span class="p"&gt;-&lt;/span&gt; JWT Authentication
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;API Design এর জন্য:&lt;/strong&gt;&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;# .claude/agents/api-designer-agent.md&lt;/span&gt;

You are an API design specialist.

&lt;span class="gu"&gt;## Your Responsibilities&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Design RESTful endpoints
&lt;span class="p"&gt;-&lt;/span&gt; Define request/response structures
&lt;span class="p"&gt;-&lt;/span&gt; Plan versioning strategy
&lt;span class="p"&gt;-&lt;/span&gt; Document API specifications

&lt;span class="gu"&gt;## Guidelines&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Follow REST principles
&lt;span class="p"&gt;-&lt;/span&gt; Use proper HTTP methods
&lt;span class="p"&gt;-&lt;/span&gt; Implement pagination
&lt;span class="p"&gt;-&lt;/span&gt; Version APIs properly
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code Review এর জন্য:&lt;/strong&gt;&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;# .claude/agents/code-reviewer-agent.md&lt;/span&gt;

You are a code quality expert.

&lt;span class="gu"&gt;## Your Responsibilities&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Review code for best practices
&lt;span class="p"&gt;-&lt;/span&gt; Check for security vulnerabilities
&lt;span class="p"&gt;-&lt;/span&gt; Ensure consistent coding style
&lt;span class="p"&gt;-&lt;/span&gt; Suggest optimizations

&lt;span class="gu"&gt;## Focus Areas&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Code readability
&lt;span class="p"&gt;-&lt;/span&gt; Performance issues
&lt;span class="p"&gt;-&lt;/span&gt; Security concerns
&lt;span class="p"&gt;-&lt;/span&gt; Test coverage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Agents কীভাবে কাজ করে?
&lt;/h3&gt;

&lt;p&gt;Claude Code দুইভাবে agents ব্যবহার করে:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Automatic Mode&lt;/strong&gt;: Claude অটোমেটিক বুঝে নেয় কোন agent দরকার&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manual Mode&lt;/strong&gt;: আপনি &lt;code&gt;@agent-name&lt;/code&gt; দিয়ে সরাসরি একটা নির্দিষ্ট agent কে কল করতে পারেন&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;উদাহরণ:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;আপনি: @frontend-agent Create a user profile component
আপনি: @backend-agent Design an API for user authentication
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Skills
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Skills কী?
&lt;/h3&gt;

&lt;p&gt;Skills হলো Claude-এর জন্য best practices, domain-specific knowledge, এবং structured workflows। এটা agents-দের কাজ করার জন্য একটা নির্দেশিকা বা গাইডবুক হিসেবে কাজ করে। কাজের প্রয়োজন অনুসারে Claude অটোমেটিক এই skills পড়ে এবং apply করে।&lt;/p&gt;

&lt;h3&gt;
  
  
  Skills vs Agents এর পার্থক্য
&lt;/h3&gt;

&lt;p&gt;সহজ ভাষায়:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agents&lt;/strong&gt; = কাজ করার জন্য বিশেষায়িত সহকারী&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skills&lt;/strong&gt; = সেই সহকারীকে &lt;strong&gt;কীভাবে&lt;/strong&gt; কাজ করতে হবে তার জন্য knowledge বা guideline দেয়।&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;একটা উদাহরণ দিলে ব্যাপারটা আরও পরিষ্কার হবে:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;backend-agent&lt;/code&gt; হলো রাঁধুনি (যে রান্না করবে)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rest-api-best-practices&lt;/code&gt; skill হলো রেসিপি বই (যেখানে লেখা আছে কীভাবে রান্না করতে হবে)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  বাস্তব উদাহরণ
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;REST API Design Skill:&lt;/strong&gt;&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;# .claude/skills/rest-api-best-practices.md&lt;/span&gt;

&lt;span class="gh"&gt;# REST API Design Guidelines&lt;/span&gt;

&lt;span class="gu"&gt;## URL Structure&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Use nouns, not verbs: &lt;span class="sb"&gt;`/users`&lt;/span&gt; not &lt;span class="sb"&gt;`/getUsers`&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Use plural form: &lt;span class="sb"&gt;`/products`&lt;/span&gt; not &lt;span class="sb"&gt;`/product`&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Nested resources: &lt;span class="sb"&gt;`/users/{id}/orders`&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Keep URLs simple and intuitive

&lt;span class="gu"&gt;## HTTP Methods&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**GET**&lt;/span&gt;: Retrieve data (no side effects)
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**POST**&lt;/span&gt;: Create new resource
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**PUT**&lt;/span&gt;: Update entire resource
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**PATCH**&lt;/span&gt;: Partial update
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**DELETE**&lt;/span&gt;: Remove resource

&lt;span class="gu"&gt;## Response Status Codes&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**200 OK**&lt;/span&gt;: Successful GET, PUT, PATCH
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**201 Created**&lt;/span&gt;: Successful POST
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**204 No Content**&lt;/span&gt;: Successful DELETE
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**400 Bad Request**&lt;/span&gt;: Invalid input
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**401 Unauthorized**&lt;/span&gt;: Authentication required
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**403 Forbidden**&lt;/span&gt;: No permission
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**404 Not Found**&lt;/span&gt;: Resource doesn't exist
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**500 Internal Server Error**&lt;/span&gt;: Server error

&lt;span class="gu"&gt;## Response Structure&lt;/span&gt;
Always return consistent JSON:

{
  "success": true,
  "data": {...},
  "message": "Operation successful",
  "timestamp": "2024-01-15T10:30:00Z"
}

&lt;span class="gu"&gt;## Pagination&lt;/span&gt;

{
  "data": [...],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 100,
    "totalPages": 5
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Database Schema Design Skill:&lt;/strong&gt;&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;# .claude/skills/database-design.md&lt;/span&gt;

&lt;span class="gh"&gt;# Database Design Principles&lt;/span&gt;

&lt;span class="gu"&gt;## Naming Conventions&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Tables**&lt;/span&gt;: plural, snake_case (e.g., &lt;span class="sb"&gt;`user_profiles`&lt;/span&gt;, &lt;span class="sb"&gt;`order_items`&lt;/span&gt;)
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Columns**&lt;/span&gt;: snake_case (e.g., &lt;span class="sb"&gt;`first_name`&lt;/span&gt;, &lt;span class="sb"&gt;`created_at`&lt;/span&gt;)
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Primary Key**&lt;/span&gt;: Always use &lt;span class="sb"&gt;`id`&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Foreign Key**&lt;/span&gt;: &lt;span class="sb"&gt;`{table}_id`&lt;/span&gt; (e.g., &lt;span class="sb"&gt;`user_id`&lt;/span&gt;, &lt;span class="sb"&gt;`product_id`&lt;/span&gt;)
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Junction Tables**&lt;/span&gt;: &lt;span class="sb"&gt;`{table1}_{table2}`&lt;/span&gt; (e.g., &lt;span class="sb"&gt;`users_roles`&lt;/span&gt;)

&lt;span class="gu"&gt;## Data Types Best Practices&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**IDs**&lt;/span&gt;: BIGINT UNSIGNED AUTO_INCREMENT
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Strings**&lt;/span&gt;: VARCHAR(255) for short text, TEXT for long content
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Dates**&lt;/span&gt;: TIMESTAMP (includes timezone)
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Money**&lt;/span&gt;: DECIMAL(10, 2)
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Boolean**&lt;/span&gt;: TINYINT(1) or BOOLEAN

&lt;span class="gu"&gt;## Essential Columns&lt;/span&gt;
Every table should have:

id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

&lt;span class="gu"&gt;## Indexing Rules&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Always index foreign keys
&lt;span class="p"&gt;-&lt;/span&gt; Index columns used in WHERE, JOIN, ORDER BY
&lt;span class="p"&gt;-&lt;/span&gt; Composite index for multi-column queries
&lt;span class="p"&gt;-&lt;/span&gt; Don't over-index (slows down INSERT/UPDATE)

&lt;span class="gu"&gt;## Relationships&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**One-to-Many**&lt;/span&gt;: Foreign key in the "many" table
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Many-to-Many**&lt;/span&gt;: Use junction table
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**One-to-One**&lt;/span&gt;: Foreign key with UNIQUE constraint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Security Best Practices Skill:&lt;/strong&gt;&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;# .claude/skills/security-guidelines.md&lt;/span&gt;

&lt;span class="gh"&gt;# Security Best Practices&lt;/span&gt;

&lt;span class="gu"&gt;## Authentication&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Use bcrypt for password hashing (min 10 rounds)
&lt;span class="p"&gt;-&lt;/span&gt; Implement JWT with short expiry (15-30 minutes)
&lt;span class="p"&gt;-&lt;/span&gt; Use refresh tokens for long sessions
&lt;span class="p"&gt;-&lt;/span&gt; Enable rate limiting on login endpoints

&lt;span class="gu"&gt;## Data Validation&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Always validate user input
&lt;span class="p"&gt;-&lt;/span&gt; Sanitize data before database queries
&lt;span class="p"&gt;-&lt;/span&gt; Use parameterized queries (prevent SQL injection)
&lt;span class="p"&gt;-&lt;/span&gt; Validate file uploads (type, size, content)

&lt;span class="gu"&gt;## API Security&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Always use HTTPS in production
&lt;span class="p"&gt;-&lt;/span&gt; Implement CORS properly
&lt;span class="p"&gt;-&lt;/span&gt; Use API keys for service-to-service communication
&lt;span class="p"&gt;-&lt;/span&gt; Rate limit all endpoints

&lt;span class="gu"&gt;## Sensitive Data&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Never log passwords or tokens
&lt;span class="p"&gt;-&lt;/span&gt; Encrypt sensitive data at rest
&lt;span class="p"&gt;-&lt;/span&gt; Use environment variables for secrets
&lt;span class="p"&gt;-&lt;/span&gt; Never commit .env files to git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Agent কীভাবে Skills ব্যবহার করে
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# .claude/agents/backend-agent.md&lt;/span&gt;

You are a backend development specialist.

&lt;span class="gu"&gt;## Skills to Apply&lt;/span&gt;
When working, always reference and follow these skills:
&lt;span class="p"&gt;-&lt;/span&gt; rest-api-best-practices
&lt;span class="p"&gt;-&lt;/span&gt; database-design
&lt;span class="p"&gt;-&lt;/span&gt; security-guidelines

&lt;span class="gu"&gt;## Instructions&lt;/span&gt;
&lt;span class="p"&gt;1.&lt;/span&gt; Before designing any API, review REST API best practices
&lt;span class="p"&gt;2.&lt;/span&gt; For database work, follow the database design skill
&lt;span class="p"&gt;3.&lt;/span&gt; Always check security guidelines before implementing auth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;এভাবে agent-রা skills থেকে knowledge নিয়ে আরও ভালোভাবে কাজ করতে পারে।&lt;/p&gt;




&lt;h2&gt;
  
  
  Hooks - Lifecycle Automation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Hooks কী?
&lt;/h3&gt;

&lt;p&gt;Hooks হলো custom bash script যেগুলো Claude Code-এর নির্দিষ্ট lifecycle event-এ অটোমেটিক trigger হয়। এর মাধ্যমে আপনি repetitive কাজগুলো অটোমেট করে ফেলতে পারেন।&lt;/p&gt;

&lt;h3&gt;
  
  
  Available Lifecycle Events
&lt;/h3&gt;

&lt;p&gt;Claude Code এর মূল কয়েকটি event:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;sessionStart&lt;/strong&gt; - যখন Claude Code session শুরু হয়&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;sessionEnd&lt;/strong&gt; - যখন session শেষ হয়&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;stop&lt;/strong&gt; - যখন Claude response দেওয়া বন্ধ করে&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;beforeCommand&lt;/strong&gt; - কোনো command execute হওয়ার আগে&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;afterCommand&lt;/strong&gt; - কোনো command execute হওয়ার পরে&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  বাস্তব উদাহরণ
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Example 1: Auto Code Formatting (stop event)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;কোড লেখার পর ম্যানুয়ালি ফরম্যাট করা বিরক্তিকর। এই hook দিয়ে Claude যখনই code লেখা শেষ করবে, automatically prettier run হবে:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# .claude/hooks/format-on-stop.sh&lt;/span&gt;
&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Formatting code..."&lt;/span&gt;

&lt;span class="c"&gt;# Format JavaScript/TypeScript files&lt;/span&gt;
npx prettier &lt;span class="nt"&gt;--write&lt;/span&gt; &lt;span class="s2"&gt;"src/**/*.{js,jsx,ts,tsx,json,css,md}"&lt;/span&gt;

&lt;span class="c"&gt;# Format Python files&lt;/span&gt;
black src/

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"✓ Code formatting complete!"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example 2: Auto Git Commit (sessionEnd event)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Session শেষে automatically changes commit করুন:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# .claude/hooks/auto-commit.sh&lt;/span&gt;
&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="c"&gt;# Check if there are any changes&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;git status &lt;span class="nt"&gt;-s&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Auto-committing changes..."&lt;/span&gt;

    &lt;span class="c"&gt;# Add all changes&lt;/span&gt;
    git add &lt;span class="nb"&gt;.&lt;/span&gt;

    &lt;span class="c"&gt;# Create commit with timestamp&lt;/span&gt;
    &lt;span class="nv"&gt;timestamp&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; &lt;span class="s2"&gt;"+%Y-%m-%d %H:%M:%S"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
    git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Auto-commit: Claude Code session ended at &lt;/span&gt;&lt;span class="nv"&gt;$timestamp&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"✓ Changes committed successfully!"&lt;/span&gt;
&lt;span class="k"&gt;else
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"No changes to commit"&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example 3: Test Runner (afterCommand event)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;কোড লেখার পর automatically tests run করুন:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# .claude/hooks/run-tests.sh&lt;/span&gt;
&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Running tests..."&lt;/span&gt;

&lt;span class="c"&gt;# Run Jest tests&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"package.json"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-q&lt;/span&gt; &lt;span class="s2"&gt;"jest"&lt;/span&gt; package.json&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;npm &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;--passWithNoTests&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="c"&gt;# Run pytest&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"pytest.ini"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"tests"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;pytest &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;span class="k"&gt;fi

&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"✓ Tests complete!"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Hooks Setup করা
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;.claude/hooks/&lt;/code&gt; folder তৈরি করুন&lt;/li&gt;
&lt;li&gt;Bash script লিখুন (&lt;code&gt;.sh&lt;/code&gt; extension সহ)&lt;/li&gt;
&lt;li&gt;Script-কে executable করুন:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x .claude/hooks/format-on-stop.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Slash Commands - দ্রুত কাজের Shortcut
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Slash Commands কী?
&lt;/h3&gt;

&lt;p&gt;Slash commands হলো repetitive কাজ দ্রুত করার শর্টকাট। একবার define করে ফেললে বারবার একই instruction দিতে হয় না। শুধু &lt;code&gt;/&lt;/code&gt; টাইপ করলেই সব available commands দেখা যায়।&lt;/p&gt;

&lt;h3&gt;
  
  
  কখন Slash Commands ব্যবহার করবেন?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;যখন একই ধরনের code বারবার লিখতে হয়&lt;/li&gt;
&lt;li&gt;যখন একটা নির্দিষ্ট pattern follow করতে হয়&lt;/li&gt;
&lt;li&gt;যখন boilerplate code তৈরি করতে হয়&lt;/li&gt;
&lt;li&gt;যখন complex workflow একটা command-এ execute করতে চান&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  বাস্তব উদাহরণ
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Example 1: React Component Generator&lt;/strong&gt;&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;# .claude/commands/create-component.md&lt;/span&gt;

&lt;span class="gh"&gt;# Create React Component&lt;/span&gt;

Generate a complete React component with the following structure:

&lt;span class="gu"&gt;## Files to Create&lt;/span&gt;
&lt;span class="p"&gt;
1.&lt;/span&gt; &lt;span class="gs"&gt;**Component File**&lt;/span&gt;: &lt;span class="sb"&gt;`src/components/{ComponentName}/{ComponentName}.jsx`&lt;/span&gt;
&lt;span class="p"&gt;2.&lt;/span&gt; &lt;span class="gs"&gt;**Styles**&lt;/span&gt;: &lt;span class="sb"&gt;`src/components/{ComponentName}/{ComponentName}.module.css`&lt;/span&gt;
&lt;span class="p"&gt;3.&lt;/span&gt; &lt;span class="gs"&gt;**Test File**&lt;/span&gt;: &lt;span class="sb"&gt;`src/components/{ComponentName}/__tests__/{ComponentName}.test.jsx`&lt;/span&gt;
&lt;span class="p"&gt;4.&lt;/span&gt; &lt;span class="gs"&gt;**Storybook**&lt;/span&gt;: &lt;span class="sb"&gt;`src/components/{ComponentName}/{ComponentName}.stories.jsx`&lt;/span&gt;

&lt;span class="gu"&gt;## Component Template&lt;/span&gt;

import React from 'react';
import PropTypes from 'prop-types';
import styles from './{ComponentName}.module.css';

/&lt;span class="ge"&gt;**&lt;/span&gt;
&lt;span class="p"&gt; *&lt;/span&gt; {ComponentName} component description
 &lt;span class="err"&gt;*&lt;/span&gt;/
const {ComponentName} = ({ title, children, className = '' }) =&amp;gt; {
  return (
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;className=&lt;/span&gt;&lt;span class="s"&gt;{`${styles.container}&lt;/span&gt; &lt;span class="err"&gt;${&lt;/span&gt;&lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="err"&gt;}`}&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;h2&lt;/span&gt; &lt;span class="na"&gt;className=&lt;/span&gt;&lt;span class="s"&gt;{styles.title}&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;{title}&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;className=&lt;/span&gt;&lt;span class="s"&gt;{styles.content}&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;{children}&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  );
};

{ComponentName}.propTypes = {
  title: PropTypes.string.isRequired,
  children: PropTypes.node,
  className: PropTypes.string,
};

export default {ComponentName};

&lt;span class="gu"&gt;## CSS Template&lt;/span&gt;

.container {
  padding: 1rem;
  border-radius: 8px;
  background-color: #ffffff;
}

.title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.content {
  font-size: 1rem;
  color: #333333;
}

&lt;span class="gu"&gt;## Test Template&lt;/span&gt;

import { render, screen } from '@testing-library/react';
import {ComponentName} from '../{ComponentName}';

describe('{ComponentName}', () =&amp;gt; {
  it('renders correctly', () =&amp;gt; {
    render(&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;&lt;span class="na"&gt;ComponentName&lt;/span&gt;&lt;span class="err"&gt;}&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Test Title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Test Content&lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;&lt;span class="nt"&gt;ComponentName&lt;/span&gt;&lt;span class="err"&gt;}&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;);
    expect(screen.getByText('Test Title')).toBeInTheDocument();
  });
});

&lt;span class="gu"&gt;## Prompt&lt;/span&gt;
Ask the user for the component name and create all files accordingly.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;ব্যবহার:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/create-component Button
/create-component UserProfile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example 2: Express API Endpoint Creator&lt;/strong&gt;&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;# .claude/commands/create-api-endpoint.md&lt;/span&gt;

&lt;span class="gh"&gt;# Create Express API Endpoint&lt;/span&gt;

Generate a complete API endpoint with the following structure:

&lt;span class="gu"&gt;## Files to Create&lt;/span&gt;
&lt;span class="p"&gt;
1.&lt;/span&gt; &lt;span class="gs"&gt;**Route**&lt;/span&gt;: &lt;span class="sb"&gt;`src/routes/{resource}.routes.js`&lt;/span&gt;
&lt;span class="p"&gt;2.&lt;/span&gt; &lt;span class="gs"&gt;**Controller**&lt;/span&gt;: &lt;span class="sb"&gt;`src/controllers/{resource}.controller.js`&lt;/span&gt;
&lt;span class="p"&gt;3.&lt;/span&gt; &lt;span class="gs"&gt;**Validation**&lt;/span&gt;: &lt;span class="sb"&gt;`src/middlewares/{resource}.validation.js`&lt;/span&gt;
&lt;span class="p"&gt;4.&lt;/span&gt; &lt;span class="gs"&gt;**Test**&lt;/span&gt;: &lt;span class="sb"&gt;`src/tests/{resource}.test.js`&lt;/span&gt;

&lt;span class="gu"&gt;## Route Template&lt;/span&gt;

const express = require('express');
const router = express.Router();
const {resourceCamelCase}Controller = require('../controllers/{resource}.controller');
const validate = require('../middlewares/{resource}.validation');

// GET all
router.get('/', {resourceCamelCase}Controller.getAll);

// GET by ID
router.get('/:id', {resourceCamelCase}Controller.getById);

// POST create
router.post('/', validate.create, {resourceCamelCase}Controller.create);

// PUT update
router.put('/:id', validate.update, {resourceCamelCase}Controller.update);

// DELETE
router.delete('/:id', {resourceCamelCase}Controller.delete);

module.exports = router;

&lt;span class="gu"&gt;## Controller Template&lt;/span&gt;

const asyncHandler = require('../utils/asyncHandler');
const ApiResponse = require('../utils/ApiResponse');
const ApiError = require('../utils/ApiError');

// @desc    Get all {resources}
// @route   GET /api/{resources}
// @access  Public
exports.getAll = asyncHandler(async (req, res) =&amp;gt; {
  // Implementation here
  res.status(200).json(new ApiResponse(200, [], 'Retrieved successfully'));
});

// @desc    Get {resource} by ID
// @route   GET /api/{resources}/:id
// @access  Public
exports.getById = asyncHandler(async (req, res) =&amp;gt; {
  const { id } = req.params;
  // Implementation here
  res.status(200).json(new ApiResponse(200, {}, 'Retrieved successfully'));
});

// @desc    Create new {resource}
// @route   POST /api/{resources}
// @access  Private
exports.create = asyncHandler(async (req, res) =&amp;gt; {
  // Implementation here
  res.status(201).json(new ApiResponse(201, {}, 'Created successfully'));
});

// @desc    Update {resource}
// @route   PUT /api/{resources}/:id
// @access  Private
exports.update = asyncHandler(async (req, res) =&amp;gt; {
  const { id } = req.params;
  // Implementation here
  res.status(200).json(new ApiResponse(200, {}, 'Updated successfully'));
});

// @desc    Delete {resource}
// @route   DELETE /api/{resources}/:id
// @access  Private
exports.delete = asyncHandler(async (req, res) =&amp;gt; {
  const { id } = req.params;
  // Implementation here
  res.status(200).json(new ApiResponse(200, null, 'Deleted successfully'));
});

&lt;span class="gu"&gt;## Validation Template&lt;/span&gt;

const { body, param } = require('express-validator');
const validate = require('../middlewares/validate');

exports.create = validate([
  body('name').notEmpty().withMessage('Name is required'),
  // Add more validations
]);

exports.update = validate([
  param('id').isInt().withMessage('Invalid ID'),
  body('name').optional().notEmpty(),
  // Add more validations
]);

&lt;span class="gu"&gt;## Prompt&lt;/span&gt;
Ask for:
&lt;span class="p"&gt;1.&lt;/span&gt; Resource name (singular, e.g., "user", "product")
&lt;span class="p"&gt;2.&lt;/span&gt; Fields for validation
&lt;span class="p"&gt;3.&lt;/span&gt; Authentication requirements
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;ব্যবহার:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/create-api-endpoint user
/create-api-endpoint product
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;ব্যবহার:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/create-migration users
/create-migration products
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Plugins - Ready-made Configuration
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Plugins কী?
&lt;/h3&gt;

&lt;p&gt;Plugins হলো ready made ও ভ্যালিডেট - Claude Code configuration bundle, যা নির্দিষ্ট workflow বা use case অনুযায়ী অপটিমাইজ করা থাকে। এগুলো সরাসরি install করে অতিরিক্ত custom configuration ছাড়াই ব্যবহার করা যায়। একটা plugin install করলে তার সাথে থাকা &lt;strong&gt;agents, skills, hooks, এবং commands&lt;/strong&gt; সব একসাথে আপনার project এ যুক্ত হয়ে যায়।&lt;/p&gt;

&lt;h3&gt;
  
  
  Plugins কেন ব্যবহার করবেন?
&lt;/h3&gt;

&lt;h4&gt;
  
  
  ১. সময় বাঁচায়
&lt;/h4&gt;

&lt;p&gt;নিজে থেকে agents, skills, hooks তৈরি করতে অনেক সময় লাগে। Plugin install করলে সব ready-made পেয়ে যাবেন।&lt;/p&gt;

&lt;h4&gt;
  
  
  ২. Community-tested
&lt;/h4&gt;

&lt;p&gt;হাজারো developer এই plugins ব্যবহার করেছে এবং improve করেছে। তাই quality নিয়ে নিশ্চিন্ত থাকতে পারেন।&lt;/p&gt;

&lt;h4&gt;
  
  
  ৩. Best Practices
&lt;/h4&gt;

&lt;p&gt;Industry standard best practices follow করা হয় plugin-গুলোতে।&lt;/p&gt;

&lt;h4&gt;
  
  
  ৪. Consistent Workflow
&lt;/h4&gt;

&lt;p&gt;Team-এর সবাই same plugin ব্যবহার করলে একই workflow follow হয়, collaboration সহজ হয়।&lt;/p&gt;

&lt;h3&gt;
  
  
  Claude Plugin Marketplace
&lt;/h3&gt;

&lt;p&gt;Claude-এর official plugin marketplace থেকে বিভিন্ন ধরনের plugin পাওয়া যায়:&lt;/p&gt;

&lt;h4&gt;
  
  
  Popular Plugins:
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;1. GitHub Plugin&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Git operations সহজ করে&lt;/li&gt;
&lt;li&gt;Pull Request management&lt;/li&gt;
&lt;li&gt;Issue tracking&lt;/li&gt;
&lt;li&gt;Code review automation&lt;/li&gt;
&lt;li&gt;Branch management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Notion Plugin&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Documentation automatically sync হয়&lt;/li&gt;
&lt;li&gt;Meeting notes তৈরি&lt;/li&gt;
&lt;li&gt;Task management&lt;/li&gt;
&lt;li&gt;Knowledge base update&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Docker Plugin&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Container management&lt;/li&gt;
&lt;li&gt;Dockerfile generation&lt;/li&gt;
&lt;li&gt;Docker Compose setup&lt;/li&gt;
&lt;li&gt;Container debugging&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Testing Plugin&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automated test generation&lt;/li&gt;
&lt;li&gt;Coverage report&lt;/li&gt;
&lt;li&gt;Test runner integration&lt;/li&gt;
&lt;li&gt;Mock data generation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;*&lt;em&gt;5. Database Plugin *&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Migration management&lt;/li&gt;
&lt;li&gt;Query optimization&lt;/li&gt;
&lt;li&gt;Schema visualization&lt;/li&gt;
&lt;li&gt;Seed data generation&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Plugin এ কী কী থাকে?
&lt;/h3&gt;

&lt;p&gt;একটা plugin-এ সাধারণত এই structure থাকে:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;github-plugin/
├── agents/
│   ├── git-expert-agent.md
│   ├── pr-reviewer-agent.md
│   └── issue-manager-agent.md
├── skills/
│   ├── git-workflow.md
│   ├── commit-message-guidelines.md
│   └── branch-naming-conventions.md
├── hooks/
│   ├── pre-commit-check.sh
│   ├── post-commit-push.sh
│   └── branch-protection.sh
└── commands/
    ├── create-pr.md
    ├── review-code.md
    └── create-issue.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Plugin কীভাবে Install করবেন?
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Method 1: Claude Code CLI
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude plugin &lt;span class="nb"&gt;install &lt;/span&gt;github
claude plugin &lt;span class="nb"&gt;install &lt;/span&gt;notion
claude plugin &lt;span class="nb"&gt;install &lt;/span&gt;docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Method 2: Manual Installation
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Plugin repository থেকে download করুন&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.claude/plugins/&lt;/code&gt; folder-এ রাখুন&lt;/li&gt;
&lt;li&gt;Claude Code restart করুন&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Plugin কীভাবে Configure করবেন?
&lt;/h3&gt;

&lt;p&gt;প্রতিটা plugin-এর একটা config file থাকে:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# .claude/plugins/github/config.yml&lt;/span&gt;

&lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

&lt;span class="na"&gt;agents&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;git-expert-agent&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;pr-reviewer-agent&lt;/span&gt;

&lt;span class="na"&gt;skills&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;git-workflow&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;commit-message-guidelines&lt;/span&gt;

&lt;span class="na"&gt;hooks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;sessionStart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;check-git-status&lt;/span&gt;
  &lt;span class="na"&gt;beforeCommand&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;validate-branch&lt;/span&gt;

&lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;create-pr&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;review-code&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Custom Plugin তৈরি করা
&lt;/h3&gt;

&lt;p&gt;আপনি চাইলে নিজের plugin ও তৈরি করতে পারেন এবং team-এর সাথে share করতে পারেন:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-company-plugin/
├── README.md
├── plugin.yml (metadata)
├── agents/
│   └── company-standards-agent.md
├── skills/
│   └── company-coding-standards.md
├── hooks/
│   └── company-workflow.sh
└── commands/
    └── create-ticket.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;plugin.yml:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;my-company-plugin&lt;/span&gt;
&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;1.0.0&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Company-specific development standards&lt;/span&gt;
&lt;span class="na"&gt;author&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Your Team&lt;/span&gt;
&lt;span class="na"&gt;dependencies&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;github&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;testing&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Plugin Best Practices
&lt;/h3&gt;

&lt;h4&gt;
  
  
  ১. শুধু প্রয়োজনীয় Plugin Enable করুন
&lt;/h4&gt;

&lt;p&gt;অনেক plugin একসাথে enable করলে performance কমতে পারে।&lt;/p&gt;

&lt;h4&gt;
  
  
  ২. Regular Update করুন
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude plugin update &lt;span class="nt"&gt;--all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  ৩. Plugin Documentation পড়ুন
&lt;/h4&gt;

&lt;p&gt;প্রতিটা plugin-এর নিজস্ব features এবং commands আছে। Install করার পর documentation check করুন।&lt;/p&gt;

&lt;h4&gt;
  
  
  ৪. Team-এ Same Plugins ব্যবহার করুন
&lt;/h4&gt;

&lt;p&gt;এতে সবার কাছে same workflow থাকবে।&lt;/p&gt;

&lt;h3&gt;
  
  
  Plugin vs Manual Setup - কখন কোনটা?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Plugin ব্যবহার করুন যখন:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Standard workflow follow করতে চান&lt;/li&gt;
&lt;li&gt;দ্রুত setup করতে চান&lt;/li&gt;
&lt;li&gt;Community-tested solution চান&lt;/li&gt;
&lt;li&gt;Team collaboration গুরুত্বপূর্ণ&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Manual Setup করুন যখন:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Very specific requirements আছে&lt;/li&gt;
&lt;li&gt;Company-specific workflow আছে&lt;/li&gt;
&lt;li&gt;Full control চান&lt;/li&gt;
&lt;li&gt;Learning purpose-এ কাজ করছেন&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  File Structure - সব একসাথে
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Project-Specific Configuration
&lt;/h3&gt;

&lt;p&gt;আপনার specific project-এর জন্য:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-ecommerce-app/
├── src/
├── tests/
└── .claude/
    ├── agents/
    │   ├── frontend-agent.md
    │   ├── backend-agent.md
    │   ├── api-designer-agent.md
    │   └── code-reviewer-agent.md
    │
    ├── skills/
    │   ├── rest-api-best-practices.md
    │   ├── database-design.md
    │   ├── security-guidelines.md
    │   └── react-patterns.md
    │
    ├── hooks/
    │   ├── format-on-stop.sh
    │   ├── auto-commit.sh
    │   ├── check-dependencies.sh
    │   └── run-tests.sh
    │
    ├── commands/
    │   ├── create-component.md
    │   ├── create-api-endpoint.md
    │   └── create-migration.md
    │
    └── plugins/
        ├── github/
        └── testing/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Global Configuration
&lt;/h3&gt;

&lt;p&gt;সব project-এ যা common থাকবে:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.config/claude/
├── agents/
│   ├── general-coding-agent.md
│   └── documentation-agent.md
│
├── skills/
│   ├── clean-code-principles.md
│   └── git-best-practices.md
│
├── hooks/
│   └── global-formatter.sh
│
└── commands/
    └── common-commands.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Quick Reference
&lt;/h2&gt;

&lt;p&gt;আপনার সুবিধার জন্য একটা quick reference table:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;কী করে&lt;/th&gt;
&lt;th&gt;কখন Trigger হয়&lt;/th&gt;
&lt;th&gt;File Location&lt;/th&gt;
&lt;th&gt;উদাহরণ&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Agents&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;নির্দিষ্ট কাজের বিশেষজ্ঞ&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;@agent-name&lt;/code&gt; বা auto&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.claude/agents/*.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;@backend-agent&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Skills&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Knowledge &amp;amp; guidelines&lt;/td&gt;
&lt;td&gt;Auto (যখন প্রয়োজন)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.claude/skills/*.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;rest-api-best-practices.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hooks&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Lifecycle automation&lt;/td&gt;
&lt;td&gt;Event-based&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.claude/hooks/*.sh&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;sessionStart&lt;/code&gt;, &lt;code&gt;stop&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Commands&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;দ্রুত কাজের shortcut&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/command-name&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.claude/commands/*.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/create-component&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Plugins&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Ready-made config bundle&lt;/td&gt;
&lt;td&gt;Manual install&lt;/td&gt;
&lt;td&gt;Marketplace / &lt;code&gt;.claude/plugins/&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;claude plugin install github&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🎯 শেষ কথা
&lt;/h2&gt;

&lt;p&gt;Claude Code একটা অসাধারণ শক্তিশালী টুল যা আপনার development workflow কে সম্পূর্ণ বদলে দিতে পারে। &lt;strong&gt;Agents, Skills, Hooks, Slash Commands, এবং Plugins&lt;/strong&gt; - এই পাঁচটা ফিচার একসাথে ব্যবহার করলে আপনি:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;দ্রুত এবং গুছিয়ে কাজ করতে পারবেন&lt;/li&gt;
&lt;li&gt;Repetitive কাজগুলো automate করে ফেলতে পারবেন&lt;/li&gt;
&lt;li&gt;Best practices maintain করতে পারবেন&lt;/li&gt;
&lt;li&gt;Team collaboration improve হবে&lt;/li&gt;
&lt;li&gt;Code quality অনেক ভালো হবে&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;শুরুতে একটু সময় নিয়ে setup করুন, তারপর দেখবেন কাজের গতি কতটা বেড়ে গেছে!&lt;/p&gt;

&lt;h3&gt;
  
  
  পরবর্তী পদক্ষেপ
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;একটা simple agent দিয়ে শুরু করুন&lt;/li&gt;
&lt;li&gt;১-২টা useful skill তৈরি করুন&lt;/li&gt;
&lt;li&gt;প্রয়োজনীয় hooks setup করুন&lt;/li&gt;
&lt;li&gt;Frequently used কাজের জন্য slash commands বানান&lt;/li&gt;
&lt;li&gt;Popular plugins explore করুন&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Happy Coding!&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;আপনার মতামত জানান&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;কোনো প্রশ্ন বা feedback থাকলে কমেন্টে জানাতে পারেন। এছাড়া আপনার নিজের তৈরি agents, skills বা plugins শেয়ার করতে পারেন!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔗 Connect with me:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: [&lt;a href="https://github.com/ashadul-mridha" rel="noopener noreferrer"&gt;https://github.com/ashadul-mridha&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt;LinkedIn: [&lt;a href="https://www.linkedin.com/in/ashadulmridha/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/ashadulmridha/&lt;/a&gt;]&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  ClaudeCode #AI #Productivity #Programming #DevTools #Automation #Bengali #BanglaContent
&lt;/h1&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>agents</category>
      <category>productivity</category>
    </item>
    <item>
      <title>3 Git features that changed how I work (and you probably aren't using them)</title>
      <dc:creator>Ashadul Mridha</dc:creator>
      <pubDate>Fri, 16 Jan 2026 09:59:03 +0000</pubDate>
      <link>https://dev.to/ashadulmridha/3-git-features-that-changed-how-i-work-and-you-probably-arent-using-them-1m8f</link>
      <guid>https://dev.to/ashadulmridha/3-git-features-that-changed-how-i-work-and-you-probably-arent-using-them-1m8f</guid>
      <description>&lt;p&gt;So I've been using Git for years, but honestly? I was just doing the basic add, commit, push routine. Then I discovered these three features and they genuinely made my workflow so much smoother.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Git Submodules - because copy-pasting code is exhausting
&lt;/h2&gt;

&lt;p&gt;Here's the thing - I had this auth library that I needed in like 5 different microservices. First, I was literally copy-pasting it everywhere. Nightmare to maintain. One bug fix meant updating 5 repos manually.&lt;/p&gt;

&lt;p&gt;Then I learned about submodules. Basically, you can include one Git repo inside another. Now I have a shared repo with common utilities, and all my projects reference it as a submodule. When I update the auth logic? Just run &lt;code&gt;git submodule update&lt;/code&gt; in each project and boom, everyone's on the latest version.&lt;/p&gt;

&lt;p&gt;Yeah, there's a learning curve, but it beats manually syncing code across projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Cherry-pick - for when you need THAT specific commit
&lt;/h2&gt;

&lt;p&gt;This one's a lifesaver. You know when you fix a bug in one branch but need that same fix in another branch? Without merging the entire thing?&lt;/p&gt;

&lt;p&gt;Last week I was working on a big feature branch. Production went down because of some API timeout issue. I quickly switched to main, fixed it, committed. But now my feature branch has the same bug. Instead of merging everything or fixing it again, I just cherry-picked that one commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git cherry-pick &amp;lt;commit-hash&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Saves so much time and keeps the history clean.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Git Stash - your work-in-progress safety net
&lt;/h2&gt;

&lt;p&gt;Okay this is probably the one I use most often. Picture this: you're halfway through implementing something, code's messy, nothing's working yet. Then your team lead pings you - "urgent bug in production, need you to check it out NOW."&lt;/p&gt;

&lt;p&gt;You can't commit half-baked code. But you also can't lose your work. That's where stash comes in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git stash              # saves your current mess
git checkout main      # switch branches safely
# fix the urgent stuff
git checkout feature   # back to your branch
git stash pop          # and your work is right there
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I probably stash stuff 3-4 times a day. It's become muscle memory at this point.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick tip: If you're learning these, start with stash. It's the easiest and you'll use it constantly. Cherry-pick is next. Submodules are powerful but you might not need them unless you're dealing with shared code across multiple projects.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>github</category>
      <category>git</category>
      <category>advance</category>
    </item>
  </channel>
</rss>
