Is @anthropic-ai/claude-agent-sdk safe?
What @anthropic-ai/claude-agent-sdk does
The Claude Agent SDK lets developers build AI agents programmatically with Claude Code's capabilities: agents that understand codebases, edit files, run commands and execute workflows. The npm author field lists Anthropic, with source in anthropics/claude-agent-sdk-typescript; it requires Node.js 18 or later. Agents built with it can edit files and run commands on the machine where they run. The README says use is governed by Anthropic's Commercial Terms of Service and describes the feedback and usage data it collects. Before installing, review those terms and data-collection notes, and pin the version.
- Node.js filesystem read
- Node.js filesystem write/delete
- Node.js network egress
What to do: Nothing here argues against installing it. Grant the capabilities it lists only if you expect the tool to need them.
@anthropic-ai/claude-agent-sdk is an npm package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators. It can: delegated authentication, filesystem read, filesystem write, mcp tools detected and network egress — capabilities are what the code can do, not a verdict on intent. Risk score 0/100 (low).
@anthropic-ai/ claude-agent-sdk 0.3.325
Get notified when this component changes
Change alerts aren't live yet. Leave your email and we'll let you know when they launch. We use it only for this and delete it on request.
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of @anthropic-ai/claude-agent-sdk's authors. Report a false positive.
Behavioral traits
How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.
Findings (5)
The component reads files from disk.
`).some((o)=>{let s=o.replace(/#.*$/,"").trim().split(/\s+/);return s.length>=2&&s[0].toLowerCase()==="/home"})}catch(o){if(!Mt(o))throw o}n=r||e.homeIsOwnMount()}catch{return!0}if(t)Dg.value=n;return n}function Ug(e,t,n){let r=[],o=[];if(! …${e.via}`}var oL=256;function ro(e){return e??""}class Km{#e=new Set;#t=0;#n=!1;#o;#r;#i=!1;#s=new Set;#c=!1;#d;#f=new Set;#l=new Map;#u=new Map;#p=new Map;#a=!1;#v=!1;#m=new Set;#h;#y=[];#S=new Set;#g=0;record(e){let t=!1;for(let r of e){i …`).some((o)=>{let s=o.replace(/#.*$/,"").trim().split(/\s+/);return s.length>=2&&s[0].toLowerCase()==="/home"})}catch(o){if(!lt(o))throw o}n=r||e.homeIsOwnMount()}catch{return!0}if(t)sC.value=n;return n}function uC(e,t,n){let r=[],o=[];if(! …Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.
Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.
The component writes or deletes files on disk.
`).some((o)=>{let s=o.replace(/#.*$/,"").trim().split(/\s+/);return s.length>=2&&s[0].toLowerCase()==="/home"})}catch(o){if(!Mt(o))throw o}n=r||e.homeIsOwnMount()}catch{return!0}if(t)Dg.value=n;return n}function Ug(e,t,n){let r=[],o=[];if(! …${e.via}`}var oL=256;function ro(e){return e??""}class Km{#e=new Set;#t=0;#n=!1;#o;#r;#i=!1;#s=new Set;#c=!1;#d;#f=new Set;#l=new Map;#u=new Map;#p=new Map;#a=!1;#v=!1;#m=new Set;#h;#y=[];#S=new Set;#g=0;record(e){let t=!1;for(let r of e){i …`).some((o)=>{let s=o.replace(/#.*$/,"").trim().split(/\s+/);return s.length>=2&&s[0].toLowerCase()==="/home"})}catch(o){if(!lt(o))throw o}n=r||e.homeIsOwnMount()}catch{return!0}if(t)sC.value=n;return n}function uC(e,t,n){let r=[],o=[];if(! …Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.
Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.
The component makes outbound network requests.
`}groupLines(e){let t=e[0];if(t===void 0)return[];let n=this.filePath??this.deps.env.CLAUDE_CODE_DEBUG_LOGS_DIR??null,r=this.isSessionDiskless();if(r&&(this.storageV5===void 0||n!==null))return[];if(this.storageV5===void 0)return[{decision: …`);let{connect:c,buffered:l}=await a;if(e.emit("proxyConnect",c),this.emit("proxyConnect",c,e),c.statusCode===200){if(e.once("socket",SBe),t.secureEndpoint)return hc("Upgrading socket connection to TLS"),w3.connect({...D3(k3(t),"host","path …`,lz=Ia.encode(Do),dz=2;class Gx{constructor(e,t){let{escapeName:n}=this.constructor,r=x.isString(t),o=`Content-Disposition: form-data; name="${n(e)}"${!r&&t.name?`; filename="${n(t.name)}"`:""}${Do}`;if(r)t=Ia.encode(String(t).replace(/\r? …Fix or unset ${e} and restart Claude Code.`}var B3=ne(new Set,(e)=>e.clear());function TBe(e=process.env){let t=j3(e);if(!t)return;if(!ABe(t.value)){let n=`${t.source}=${t.value}`;if(!B3.has(n))B3.add(n),console.error(CBe(t.source,t.value)) …`+i:i;break}}return t.data||n?t:null}class bC{decoder=new TextDecoder;pending=[];pendingLength=0;dispatched=0;get pendingChars(){return this.pendingLength}get framesDispatched(){return this.dispatched}push(e){let t=typeof e==="string"?e:thi …`+s:s;break}}return t.data||r?t:null}class $b{decoder=new TextDecoder;pending=[];pendingLength=0;dispatched=0;get pendingChars(){return this.pendingLength}get framesDispatched(){return this.dispatched}push(e){let t=typeof e==="string"?e:thi …`),l=a.pop()??"";if(l)this.partialChunks.push(l);for(let c of a){if(!c)continue;let d;try{d=je(c)}catch(p){Rn(`DirectConnect: dropped malformed JSON line (${c.length} bytes): ${p}`);continue}this.messages.enqueue(d)}}),n.addEventListener("e …`+"\t".repeat(t))}};var R4;(function(e){e.DEFAULT={allowTrailingComma:!1}})(R4||(R4={}));var O4;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e. …`)}`,o=this.byPresentKeys.get(r);if(o)return this.byPresentKeys.delete(r),this.byPresentKeys.set(r,o),o;let s=this.shapeOf(n),i=t==="strip"?Ue((a,l)=>{for(let c of this.wrongDocumentIssues(a,s))l.addIssue(c);return a},R(s)):R(s).passthrough …Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.
Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.
An OAuth 2.0 / OpenID Connect delegated-authentication flow was detected (authorization-code / refresh-token / token-exchange grant, an OIDC authorize/discovery endpoint or id_token, or a delegation library). Tools authenticate with the end user's delegated, scoped credentials rather than a long-lived embedded service credential.
`,d))i.push(c.slice(d,p)),yield oU(i.join("")),i=[],d=p+1;if(d<c.length)i.push(c.slice(d))}let a=i.join("")+r.end();if(a.length>0)yield oU(a);return s}function oU(e){return e.endsWith("\r")?e.slice(0,-1):e}import{readFile as xLe}from"fs/pro …Fix: Delegated auth is a lower-blast-radius execution context than an embedded static credential. Confirm the requested scopes are minimal and that tokens are never logged or forwarded off-host.
An MCP tool surface (manifest or tool definitions) was found.
]`;continue}if(n+=o[u],o[u]==="\\")i=!0;else if(s&&o[u]==="]")s=!1;else if(!s&&o[u]==="[")s=!0}try{new RegExp(n)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling ba …`).catch((p)=>a.abort(p));else e.streamInput(s).catch((p)=>a.abort(p))}var ci=new Set(["EBUSY","EMFILE","ENFILE","ENOTEMPTY","EPERM"]);async function Ot(e){for(let s=0;;s++)try{return await cs(e,{recursive:!0,force:!0})}catch(a){if(s>=4||!c …]`;continue}if(o+=r[l],r[l]==="\\")s=!0;else if(i&&r[l]==="]")i=!1;else if(!i&&r[l]==="[")i=!0}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling ba …Why it matters: Just context — review which tools it offers and their permissions.
Fix: Review the declared MCP tools and their permissions.
Maintain @anthropic-ai/claude-agent-sdk?
The free Claude Code plugin scans each npm, PyPI or MCP package with this report's open-source engine before the install command runs. It runs on your machine and needs no account.
Check your own component
Run the same evidence-backed scan on any MCP server, agent skill, or package.
Scan your own componentHow we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →