Strands
strands-agents/harness-sdk
Build, extend, evaluate, or migrate applications with Strands Agents in Python or TypeScript.
A skill your agent uses when working with Anthropic Claude Agent SDK.
$ npx skills add sammcj/agentic-coding --skill claude-agent-sdk -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install sammcj/agentic-coding claude-agent-sdk --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/sammcj/agentic-coding.git skills-src && mkdir -p .claude/skills && cp -r skills-src/Skills_disabled/claude-agent-sdk .claude/skills/claude-agent-sdk && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "claude-agent-sdk" agent skill from https://github.com/sammcj/agentic-coding/tree/main/Skills_disabled/claude-agent-sdk into .claude/skills/claude-agent-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "claude-agent-sdk", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/sammcj/agentic-coding/tree/main/Skills_disabled/claude-agent-sdkType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add sammcj/agentic-coding --skill claude-agent-sdk -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install sammcj/agentic-coding claude-agent-sdk --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sammcj/agentic-coding.git skills-src && mkdir -p .agents/skills && cp -r skills-src/Skills_disabled/claude-agent-sdk .agents/skills/claude-agent-sdk && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "claude-agent-sdk" agent skill from https://github.com/sammcj/agentic-coding/tree/main/Skills_disabled/claude-agent-sdk into .agents/skills/claude-agent-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "claude-agent-sdk", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sammcj/agentic-coding --skill claude-agent-sdk -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install sammcj/agentic-coding claude-agent-sdk --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sammcj/agentic-coding.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/Skills_disabled/claude-agent-sdk .cursor/skills/claude-agent-sdk && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "claude-agent-sdk" agent skill from https://github.com/sammcj/agentic-coding/tree/main/Skills_disabled/claude-agent-sdk into .cursor/skills/claude-agent-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "claude-agent-sdk", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/sammcj/agentic-coding.git --path Skills_disabled/claude-agent-sdk--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add sammcj/agentic-coding --skill claude-agent-sdk -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install sammcj/agentic-coding claude-agent-sdk --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sammcj/agentic-coding.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/Skills_disabled/claude-agent-sdk .gemini/skills/claude-agent-sdk && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "claude-agent-sdk" agent skill from https://github.com/sammcj/agentic-coding/tree/main/Skills_disabled/claude-agent-sdk into .gemini/skills/claude-agent-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "claude-agent-sdk", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install sammcj/agentic-coding claude-agent-sdkInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add sammcj/agentic-coding --skill claude-agent-sdk -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/sammcj/agentic-coding.git skills-src && mkdir -p .github/skills && cp -r skills-src/Skills_disabled/claude-agent-sdk .github/skills/claude-agent-sdk && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "claude-agent-sdk" agent skill from https://github.com/sammcj/agentic-coding/tree/main/Skills_disabled/claude-agent-sdk into .github/skills/claude-agent-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "claude-agent-sdk", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sammcj/agentic-coding --skill claude-agent-sdk -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install sammcj/agentic-coding claude-agent-sdk --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sammcj/agentic-coding.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/Skills_disabled/claude-agent-sdk .opencode/skills/claude-agent-sdk && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "claude-agent-sdk" agent skill from https://github.com/sammcj/agentic-coding/tree/main/Skills_disabled/claude-agent-sdk into .opencode/skills/claude-agent-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "claude-agent-sdk", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
claude-agent-sdkA skill your agent uses when working with Anthropic Claude Agent SDK.
Claude Agent SDK is an agent skill from sammcj/agentic-coding. Use when working with Anthropic Claude Agent SDK. Provides architecture guidance, implementation patterns, best practices, and common pitfalls.
Its SKILL.md is about 3.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering. It works with Claude Agent SDK, Python, TypeScript and Model Context Protocol. The repository describes itself as: Agentic Coding Rules, Templates etc... The licence is Apache-2.0.
12 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 2f25ced. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pipnpmFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
platform.claude.comgithub.comanthropic.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
ANTHROPIC_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Claude Agent SDK loads about 3.8k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 1,054 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from sammcj/agentic-coding at commit 2f25ced, republished under its Apache-2.0 licence (© sammcj). 1,054 words, ~3,811 tokens.
.claude/skills/claude-agent-sdk/SKILL.md (or your agent's skills folder).The Claude Agent SDK enables building autonomous AI agents with Claude through a feedback loop architecture. Available for Python (3.10+) and TypeScript (Node 18+).
Repository:
Documentation: https://platform.claude.com/docs/en/agent-sdk/overview
# Python
pip install claude-agent-sdk
# TypeScript
npm install @anthropic-ai/agent-sdkEvery agent follows this cycle:
This pattern applies whether you're building a simple script or a complex multi-agent system.
Choose mechanisms based on task requirements:
Rule: Use tools for repeatable operations, bash for exploration, code generation when you need structured output that can be validated.
from claude_agent_sdk import query
result = await query(
model="claude-sonnet-4-5",
system_prompt="You are a helpful coding assistant.",
user_message="List files in current directory",
working_dir=".",
)
print(result.final_message)import { ClaudeSdkClient } from '@anthropic-ai/agent-sdk';
const client = new ClaudeSdkClient({ apiKey: process.env.ANTHROPIC_API_KEY });
const result = await client.query({
model: 'claude-sonnet-4-5',
systemPrompt: 'You are a helpful coding assistant.',
userMessage: 'List files in current directory',
workingDir: '.',
});
console.log(result.finalMessage);In-process tools with no subprocess overhead. Primary building block for agents.
Python:
from claude_agent_sdk.mcp import tool, create_sdk_mcp_server
@tool(
name="calculator",
description="Perform calculations",
input_schema={"expression": str}
)
async def calculator(args):
result = eval(args["expression"]) # Use safe eval in production
return {"content": [{"type": "text", "text": str(result)}]}
server = create_sdk_mcp_server(name="math", tools=[calculator])TypeScript:
import { createSdkMcpServer, tool } from '@anthropic-ai/agent-sdk';
import { z } from 'zod';
const calculator = tool({
name: 'calculator',
description: 'Perform calculations',
inputSchema: z.object({ expression: z.string() }),
async execute({ expression }) {
const result = eval(expression); // Use safe eval in production
return { content: [{ type: 'text', text: String(result) }] };
},
});
const server = createSdkMcpServer({ name: 'math', tools: [calculator] });Benefits over external MCP: Better performance, easier debugging, shared memory space, no IPC overhead.
Intercept and modify agent behaviour at specific points.
Available hooks:
PreToolUse → Validate/modify/deny tool calls before executionPostToolUse → Process/log/modify tool resultsStop → Handle completion eventsPython validation example:
async def validate_command(input_data, tool_use_id, context):
if "rm -rf" in input_data["tool_input"].get("command", ""):
return {
"hookSpecificOutput": {
"permissionDecision": "deny",
"permissionDecisionReason": "Dangerous command blocked"
}
}TypeScript logging example:
const loggingHook = {
matcher: (input) => input.toolName === 'bash',
async handler(input, toolUseId, context) {
console.log(`Executing: ${input.toolInput.command}`);
}
};Four modes with progressively less restriction:
default → Prompt for each tool useplan → Agent can read/explore freely, prompts for modificationsacceptEdits → Auto-approve file edits, prompt for bash/destructive opsbypassPermissions → Fully autonomous (use carefully)Dynamic control with canUseTool:
async def permission_callback(tool_name, tool_input, context):
if tool_name == "bash" and "git push" in tool_input.get("command", ""):
return False # Deny
return True # AllowIsolated agents with separate context windows and specialised capabilities.
When to use:
Python:
from claude_agent_sdk import ClaudeAgentOptions
options = ClaudeAgentOptions(
subagent_definitions={
"researcher": {
"tools": ["read", "grep", "glob"],
"model": "claude-haiku-4",
"description": "Fast research agent"
}
}
)TypeScript:
const options = {
subagentDefinitions: {
researcher: {
tools: ['read', 'grep', 'glob'],
model: 'claude-haiku-4',
description: 'Fast research agent'
}
}
};Agentic Search (Preferred): Use bash + filesystem navigation (grep, ls, tail) before reaching for semantic search. Simpler and more reliable.
Automatic Compaction: SDK automatically summarises messages when approaching token limits. Transparent and automatic.
Folder Structure as Context Engineering: Organise files intentionally—directory structure is visible to the agent and influences its understanding.
Explicit validation enables self-correction:
# In PostToolUse hook
if tool_name == "write":
# Run linter on generated file
lint_result = run_linter(tool_output)
if lint_result.has_errors:
return {"continue": True} # Let agent fix errorsFor UI tasks, screenshot and re-evaluate:
@tool(name="check_ui", description="Verify UI matches requirements")
async def check_ui(args):
screenshot = take_screenshot(args["url"])
# Return screenshot to agent for evaluation
return {"content": [{"type": "image", "source": screenshot}]}Only for fuzzy criteria where rules don't work (higher latency):
judge_result = await secondary_model.evaluate(
criteria="Does output match tone guidelines?",
output=agent_output
)Symptom: CLAUDE.md ignored, custom prompts not applied
Solution: Set setting_sources=["project"] or ["user", "project"]
# Python
options = ClaudeAgentOptions(setting_sources=["project"])
# TypeScript
const options = { settingSources: ['project'] };Symptom: "Tool not found" errors
Solution: Check MCP tool naming: mcp__{server_name}__{tool_name}
Symptom: Agent can't access directories Solution: Add directories explicitly:
options = ClaudeAgentOptions(add_dirs=["/path/to/data"])Symptom: Syntax errors with async or continue parameters
Solution: Use async_ and continue_ (SDK auto-converts)
# Use async_ not async
hook_result = {"async_": True, "continue_": False}Symptom: Token limit errors Solution: Use subagents for isolation or let automatic compaction handle it
Symptom: Tools fail silently or with unclear errors Solution: Return structured error messages in tool responses:
return {
"content": [{
"type": "text",
"text": "Error: Invalid input. Expected format: ...",
"isError": True
}]
}Symptom: stdio/SSE MCP servers timeout Solution: Verify server is executable and logs are accessible:
# Check server stderr in context.mcp_server_logs
async def debug_hook(input_data, tool_use_id, context):
print(context.mcp_server_logs.get("server_name"))| Aspect | Python | TypeScript |
|---|---|---|
| Runtime | anyio.run(main) | Native async/await |
| Min Version | Python 3.10+ | Node.js 18+ |
| Type Safety | Type hints optional | Strict types with Zod |
| Hook Fields | async_, continue_ | async, continue |
| CLI | Bundled (no install) | Separate install needed |
| Tool Validation | Dict-based schemas | Zod schemas |
✅ Use when:
❌ Don't use when:
Use Custom Tools when:
Use Bash when:
Use Code Generation when:
Use SDK MCP (in-process) when:
Use External MCP (stdio/SSE) when:
Python:
# First run
result1 = await query(user_message="Create a file", working_dir=".")
# Resume with new message
result2 = await query(
user_message="Now modify it",
working_dir=".",
session_id=result1.session_id
)TypeScript:
// First run
const result1 = await client.query({ userMessage: 'Create a file' });
// Resume
const result2 = await client.query({
userMessage: 'Now modify it',
sessionId: result1.sessionId
});Create alternative branches from a point:
# Fork for different approach
result_fork = await query(
user_message="Try different implementation",
session_id=original_result.session_id,
fork_session=True
)Set USD spending limits:
options = ClaudeAgentOptions(budget={"usd": 5.00})Agent stops when budget exceeded. Useful for cost control in production.
Python:
import pytest
from unittest.mock import AsyncMock
@pytest.fixture
def mock_tool():
return AsyncMock(return_value={
"content": [{"type": "text", "text": "mocked"}]
})
async def test_agent(mock_tool):
server = create_sdk_mcp_server(name="test", tools=[mock_tool])
# Test with mocked toolTypeScript:
import { jest } from '@jest/globals';
const mockTool = {
name: 'test',
execute: jest.fn().mockResolvedValue({
content: [{ type: 'text', text: 'mocked' }]
})
};Test with real tools in isolated environment:
import tempfile
import os
async def test_file_operations():
with tempfile.TemporaryDirectory() as tmpdir:
result = await query(
user_message="Create test.txt with content 'hello'",
working_dir=tmpdir,
permission_mode="bypassPermissions"
)
assert os.path.exists(f"{tmpdir}/test.txt")If migrating from the deprecated claude-code-sdk:
claude-code-sdk → claude-agent-sdksetting_sourcesClaudeCodeOptions → ClaudeAgentOptionssetting_sources=["project"]See migration guide: https://platform.claude.com/docs/en/agent-sdk/migration-guide
turn_limit parameter)add_dirs to limit scope© sammcj, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in Skills_disabled/claude-agent-sdk of sammcj/agentic-coding.
Open the folder on GitHubat commit 2f25ced
Claude Agent SDK next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Claude Agent SDK this skillsammcj/agentic-coding | 162 | — | ~3.8k | Automated safety check: Pass | Apache-2.0 | |
| Strandsstrands-agents/harness-sdk | 8.8k | — | ~1k | Automated safety check: Pass | Apache-2.0 | |
| Copilot SDKgithub/awesome-copilot | 40k | 4 repos | ~6.3k | Automated safety check: Pass | MIT | |
| Agent BuilderMathews-Tom/armory | 329 | — | ~1.7k | Automated safety check: Pass | MIT | |
| Ydc Openai Agent SDK IntegrationLeoYeAI/openclaw-master-skills | 2.2k | — | ~4.4k | Automated safety check: Notes | MIT | |
| Sponsio Agent Safety SetupSponsioLabs/Sponsio | 454 | — | ~12k | Automated safety check: Pass | Apache-2.0 |
strands-agents/harness-sdk
Build, extend, evaluate, or migrate applications with Strands Agents in Python or TypeScript.
github/awesome-copilot
Build agentic applications with GitHub Copilot SDK. An agent skill from github/awesome-copilot.
Mathews-Tom/armory
Build AI agents and automate Claude Code programmatically via the Claude Agent SDK and headless CLI mode.
LeoYeAI/openclaw-master-skills
Integrate OpenAI Agents SDK with You.com MCP server - Hosted and Streamable HTTP support for Python and TypeScript.
SponsioLabs/Sponsio
Installs, tunes and enforces Sponsio contracts that block unsafe tool calls in LLM agents, covering setup, auditing, observe mode and flipping to enforce.
comet-ml/opik-mcp
Reference for the Opik SDK — tracing, span types, framework integrations, threads, and the prompt library (Python, TypeScript, REST).
sammcj/agentic-coding
A skill your agent uses when generating songs with YuE2, covering a recording via SheetSage2 audio-to-ABC, editing a score or lyrics with melody preservation, or building a reproducible listening…
sammcj/agentic-coding
A skill your agent uses when creating or editing Bento (.bento.html) slide decks, including any request for a single-file HTML slide deck.
sammcj/agentic-coding
A skill your agent uses whenever the user wants you to manage, discuss or diagnose iDrive Backup configuration on macOS
sammcj/agentic-coding
Train custom TTS voices for Piper (ONNX format) using fine-tuning or from-scratch approaches.
sammcj/agentic-coding
Convert a PPTX slide deck into per-slide markdown that preserves both the verbatim text and the meaning of embedded screenshots, diagrams and charts in their original layout positions.
sammcj/agentic-coding
You MUST load this skill before the skill-creator skill AND before making ANY change to, or conducting a review of ANY Agent Skill.
Categories
A skill your agent uses when working with Anthropic Claude Agent SDK. Claude Agent SDK is an agent skill from sammcj/agentic-coding. Use when working with Anthropic Claude Agent SDK.
Claude Agent SDK fits situations like: working with Anthropic Claude Agent SDK.
Run `npx skills add sammcj/agentic-coding --skill claude-agent-sdk -a claude-code`. Or copy the skill folder (Skills_disabled/claude-agent-sdk in sammcj/agentic-coding) into .claude/skills/claude-agent-sdk in your project. Claude Code loads it when a task matches its description.
Run `npx skills add sammcj/agentic-coding --skill claude-agent-sdk -a codex`. Or copy the skill folder (Skills_disabled/claude-agent-sdk in sammcj/agentic-coding) into .agents/skills/claude-agent-sdk in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sammcj/agentic-coding --skill claude-agent-sdk -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/claude-agent-sdk, .gemini/skills/claude-agent-sdk, .github/skills/claude-agent-sdk and .opencode/skills/claude-agent-sdk in your project.
Going by SKILL.md and its folder, Claude Agent SDK needs the command-line tools its instructions call (pip and npm) and credentials named ANTHROPIC_API_KEY. Our summary lists: Python 3; Node.js; A credential in ANTHROPIC_API_KEY.
SKILL.md names 3 domains. As links in the text: platform.claude.com, github.com and anthropic.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Claude Agent SDK is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.8k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Claude Agent SDK: Strands (strands-agents/harness-sdk, 8.8k stars), Copilot SDK (github/awesome-copilot, 40k stars), Agent Builder (Mathews-Tom/armory, 329 stars) and Ydc Openai Agent SDK Integration (LeoYeAI/openclaw-master-skills, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
sammcj (a GitHub user) maintains it in sammcj/agentic-coding, which has 162 GitHub stars. The repository holds 64 skills in this directory. The repository was last updated on October 9, 2026.
Source: sammcj/agentic-coding on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.