<?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: Jeet Dhandha</title>
    <description>The latest articles on DEV Community by Jeet Dhandha (@jeet_dhandha_3c9b0d80399a).</description>
    <link>https://dev.to/jeet_dhandha_3c9b0d80399a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3927602%2F3f9c17de-2867-4d61-b21d-1acb2a2b3757.jpg</url>
      <title>DEV Community: Jeet Dhandha</title>
      <link>https://dev.to/jeet_dhandha_3c9b0d80399a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jeet_dhandha_3c9b0d80399a"/>
    <language>en</language>
    <item>
      <title>How I stopped Claude from cloning entire GitHub repos for a 10-line snippet</title>
      <dc:creator>Jeet Dhandha</dc:creator>
      <pubDate>Tue, 12 May 2026 16:43:35 +0000</pubDate>
      <link>https://dev.to/jeet_dhandha_3c9b0d80399a/how-i-stopped-claude-from-cloning-entire-github-repos-for-a-10-line-snippet-54aj</link>
      <guid>https://dev.to/jeet_dhandha_3c9b0d80399a/how-i-stopped-claude-from-cloning-entire-github-repos-for-a-10-line-snippet-54aj</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;TL;DR — I wrote a &lt;a href="https://github.com/jeet-dhandha/jd-skills/tree/main/skills/surgical-github-extraction" rel="noopener noreferrer"&gt;Claude Code skill&lt;/a&gt; that prevents Claude from cloning or &lt;code&gt;npm install&lt;/code&gt;-ing a repo when I only wanted &lt;em&gt;one function&lt;/em&gt; or &lt;em&gt;one idea&lt;/em&gt; from it. Raw files only, into &lt;code&gt;/tmp&lt;/code&gt;, smallest useful unit, adapted to my project's style. MIT, 70 lines of markdown. Part of &lt;a href="https://github.com/jeet-dhandha/jd-skills" rel="noopener noreferrer"&gt;&lt;code&gt;jd-skills&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The pattern that finally annoyed me enough
&lt;/h2&gt;

&lt;p&gt;You've done this. I've done this. You're in a Claude Code session, you paste a GitHub URL, and you say something like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Look at how this repo handles agent handoffs — can we do something similar?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And then Claude goes: &lt;code&gt;git clone https://github.com/...&lt;/code&gt;, reads 47 files, asks you which &lt;code&gt;__init__.py&lt;/code&gt; is interesting, and 90 seconds later you're three levels deep in someone else's repo scaffolding for what should have been a 12-line concept.&lt;/p&gt;

&lt;p&gt;Or worse — it adds the whole library to your &lt;code&gt;package.json&lt;/code&gt; as a dependency. For one function. You now own its transitive deps, its CVE notifications, and a version pin you'll never upgrade.&lt;/p&gt;

&lt;p&gt;The problem isn't Claude being lazy or sloppy. The problem is that &lt;strong&gt;"use this library" and "borrow an idea from this library" deserve completely different workflows&lt;/strong&gt;, and there was no rule telling Claude which one I meant.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule
&lt;/h2&gt;

&lt;p&gt;The fix is dumb-simple as a rule and surprisingly effective in practice:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When the user references a GitHub repo for &lt;em&gt;inspiration&lt;/em&gt; (not as a dependency), never clone it and never install it. Read the README first. If the README answers the question, stop there. If code is needed, fetch raw files via &lt;code&gt;raw.githubusercontent.com&lt;/code&gt; into the OS temp dir, lift the minimum useful unit, adapt it to the user's style, and cite the source commit SHA.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I wrote this up as a Claude Code skill — a &lt;code&gt;SKILL.md&lt;/code&gt; with a description that triggers auto-invocation when a GitHub URL is dropped in as inspiration. Claude reads the skill on session start, and it just… does the right thing now.&lt;/p&gt;

&lt;h2&gt;
  
  
  Walkthrough — the concept-only case
&lt;/h2&gt;

&lt;p&gt;I was working on a YC job-applier and someone pointed me at &lt;a href="https://github.com/TauricResearch/TradingAgents" rel="noopener noreferrer"&gt;TauricResearch/TradingAgents&lt;/a&gt;. "Can we use this multi-agent pattern?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Without the skill:&lt;/strong&gt; Claude would have cloned the whole trading repo, then I'd have spent 20 minutes pruning irrelevant files. The repo is for &lt;em&gt;trading&lt;/em&gt;. Almost none of it transfers to job applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With the skill:&lt;/strong&gt; Claude started with &lt;code&gt;raw.githubusercontent.com/TauricResearch/TradingAgents/main/README.md&lt;/code&gt; to map the rough shape — specialised role agents (analysts → bull/bear researchers debating → judge → trader → risk team) coordinated by a graph. Then it pulled a handful of source files via raw URLs to see how the pattern was actually wired: the agent prompt templates, the JSON schema each role hands back, and the graph node that routes between them. Four files into &lt;code&gt;/tmp&lt;/code&gt;, not a clone.&lt;/p&gt;

&lt;p&gt;That was enough to propose an analogue for my use case: &lt;code&gt;JobFitAnalyst&lt;/code&gt; + &lt;code&gt;RecruiterPersonaWriter&lt;/code&gt; + &lt;code&gt;Critic&lt;/code&gt; (a role that &lt;em&gt;argues against&lt;/em&gt; applying), orchestrated by my existing extractor pipeline — with the prompt and schema shapes borrowed from the trading agents but rewritten for jobs. We discussed the design before any code got written.&lt;/p&gt;

&lt;p&gt;Result: the pattern was useful. The framework around it wasn't. Cloning would have been pure friction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Walkthrough — the surgical lift case
&lt;/h2&gt;

&lt;p&gt;Different prompt: "There's a clean exponential backoff in &lt;a href="https://github.com/litl/backoff" rel="noopener noreferrer"&gt;litl/backoff&lt;/a&gt; — can we just steal it?"&lt;/p&gt;

&lt;p&gt;With the skill, Claude:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pinned the SHA&lt;/strong&gt; so the source is reproducible:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   gh api repos/litl/backoff/commits/master &lt;span class="nt"&gt;--jq&lt;/span&gt; &lt;span class="s1"&gt;'.sha'&lt;/span&gt; | &lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-c1-7&lt;/span&gt;
   &lt;span class="c"&gt;# → abc1234&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Listed the tree&lt;/strong&gt; via the API instead of cloning:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   gh api repos/litl/backoff/contents/backoff &lt;span class="nt"&gt;--jq&lt;/span&gt; &lt;span class="s1"&gt;'.[].path'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Identified &lt;code&gt;_wait_gen.py&lt;/code&gt;&lt;/strong&gt; as the target — ~40 lines of generator logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fetched just that file&lt;/strong&gt; to &lt;code&gt;/tmp/sge-backoff-abc1234/&lt;/code&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; &lt;span class="s2"&gt;"https://raw.githubusercontent.com/litl/backoff/abc1234/backoff/_wait_gen.py"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
     &lt;span class="nt"&gt;-o&lt;/span&gt; /tmp/sge-backoff-abc1234/_wait_gen.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Extracted the 8-line &lt;code&gt;expo&lt;/code&gt; generator&lt;/strong&gt;, rewrote it as a plain function matching my scraper's style (no Pythonic generators, just a list).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pasted it into &lt;code&gt;utils/retry.py&lt;/code&gt;&lt;/strong&gt; with a provenance comment:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;   &lt;span class="c1"&gt;# adapted from github.com/litl/backoff@abc1234:backoff/_wait_gen.py
&lt;/span&gt;   &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;exponential_backoff&lt;/span&gt;&lt;span class="p"&gt;(...):&lt;/span&gt;
       &lt;span class="bp"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No &lt;code&gt;pip install backoff&lt;/code&gt;. No git submodule. &lt;strong&gt;Eight lines, owned by me, traceable to the source.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a Skill and not an MCP
&lt;/h2&gt;

&lt;p&gt;Quick aside in case you're considering writing your own. People sometimes ask: should this be a Skill or an MCP server?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MCP&lt;/strong&gt; ships new &lt;em&gt;tools&lt;/em&gt; to Claude. You'd build a &lt;code&gt;github_raw_fetch&lt;/code&gt; server, host it, version it, wire it into clients.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skill&lt;/strong&gt; ships &lt;em&gt;instructions&lt;/em&gt; that shape how Claude uses tools it already has — &lt;code&gt;WebFetch&lt;/code&gt;, &lt;code&gt;curl&lt;/code&gt; via &lt;code&gt;Bash&lt;/code&gt;, &lt;code&gt;gh&lt;/code&gt;, &lt;code&gt;Read&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is purely a discipline layered on existing tools. Skill. Anthropic's own &lt;a href="https://github.com/anthropics/skills/blob/main/skills/mcp-builder/SKILL.md" rel="noopener noreferrer"&gt;&lt;code&gt;mcp-builder&lt;/code&gt;&lt;/a&gt; is itself a Skill, which is a hint.&lt;/p&gt;

&lt;p&gt;Rule of thumb: if you can write your idea as a paragraph of instructions, it's a Skill. If you need to add a new verb to Claude's vocabulary, it's an MCP.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; ~/.claude/skills/surgical-github-extraction
curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/jeet-dhandha/jd-skills/main/skills/surgical-github-extraction/SKILL.md &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-o&lt;/span&gt; ~/.claude/skills/surgical-github-extraction/SKILL.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or project-scoped under &lt;code&gt;.claude/skills/&lt;/code&gt; in your repo.&lt;/p&gt;

&lt;p&gt;Repo: &lt;strong&gt;&lt;a href="https://github.com/jeet-dhandha/jd-skills" rel="noopener noreferrer"&gt;https://github.com/jeet-dhandha/jd-skills&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's part of &lt;a href="https://github.com/jeet-dhandha/jd-skills" rel="noopener noreferrer"&gt;&lt;code&gt;jd-skills&lt;/code&gt;&lt;/a&gt;, a small collection of Claude Code skills I'm building. The sibling skill, &lt;code&gt;code-graft&lt;/code&gt;, handles the case where a one-off snippet isn't enough but a runtime dep is too much — vendor only the slice of a library you actually use into your project, trim the rest, re-sync selectively from upstream. Useful for things like "I want one tokenizer out of HuggingFace transformers without the 2GB."&lt;/p&gt;

&lt;p&gt;Issues, prompts that misfired, and "this should also handle X" reports very welcome — skills only get sharper with concrete failure cases.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you write Claude Code skills, I'd love to see them. Drop them in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claude</category>
      <category>github</category>
      <category>productivity</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
