agentic-development
Build AI agents with Pydantic AI (Python) and Claude SDK (Node.js)
What this skill does
# Agentic Development Skill
For building autonomous AI agents that perform multi-step tasks with tools.
**Sources:** [Claude Agent SDK](https://docs.anthropic.com/en/docs/agents-and-tools/claude-agent-sdk) | [Anthropic Claude Code Best Practices](https://www.anthropic.com/engineering/claude-code-best-practices) | [Pydantic AI](https://ai.pydantic.dev/) | [Google Gemini Agent Development](https://developers.googleblog.com/en/building-agents-google-gemini-open-source-frameworks/) | [OpenAI Building Agents](https://developers.openai.com/tracks/building-agents/)
---
## Framework Selection by Language
| Language/Framework | Default | Why |
|-------------------|---------|-----|
| **Python** | **Pydantic AI** | Type-safe, Pydantic validation, multi-model, production-ready |
| **Node.js / Next.js** | **Claude Agent SDK** | Official Anthropic SDK, tools, multi-agent, native streaming |
### Python: Pydantic AI (Default)
```python
from pydantic_ai import Agent
from pydantic import BaseModel
class SearchResult(BaseModel):
title: str
url: str
summary: str
agent = Agent(
'claude-sonnet-4-20250514',
result_type=list[SearchResult],
system_prompt='You are a research assistant.',
)
# Type-safe result
result = await agent.run('Find articles about AI agents')
for item in result.data:
print(f"{item.title}: {item.url}")
```
### Node.js / Next.js: Claude Agent SDK (Default)
```typescript
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
// Define tools
const tools: Anthropic.Tool[] = [
{
name: "web_search",
description: "Search the web for information",
input_schema: {
type: "object",
properties: {
query: { type: "string", description: "Search query" },
},
required: ["query"],
},
},
];
// Agentic loop
async function runAgent(prompt: string) {
const messages: Anthropic.MessageParam[] = [
{ role: "user", content: prompt },
];
while (true) {
const response = await client.messages.create({
model: "claude-sonnet-4-20250514",
max_tokens: 4096,
tools,
messages,
});
// Check for tool use
if (response.stop_reason === "tool_use") {
const toolUse = response.content.find((b) => b.type === "tool_use");
if (toolUse) {
const result = await executeTool(toolUse.name, toolUse.input);
messages.push({ role: "assistant", content: response.content });
messages.push({
role: "user",
content: [{ type: "tool_result", tool_use_id: toolUse.id, content: result }],
});
continue;
}
}
// Done - return final response
return response.content.find((b) => b.type === "text")?.text;
}
}
```
---
## Core Principle
**Plan first, act incrementally, verify always.**
Agents that research and plan before executing consistently outperform those that jump straight to action. Break complex tasks into verifiable steps, use tools judiciously, and maintain clear state throughout execution.
---
## Agent Architecture
### Three Components (OpenAI)
```
┌─────────────────────────────────────────────────┐
│ AGENT │
├─────────────────────────────────────────────────┤
│ Model (Brain) │ LLM for reasoning & │
│ │ decision-making │
├─────────────────────┼───────────────────────────┤
│ Tools (Arms/Legs) │ APIs, functions, external │
│ │ systems for action │
├─────────────────────┼───────────────────────────┤
│ Instructions │ System prompts defining │
│ (Rules) │ behavior & boundaries │
└─────────────────────┴───────────────────────────┘
```
### Project Structure
```
project/
├── src/
│ ├── agents/
│ │ ├── orchestrator.ts # Main agent coordinator
│ │ ├── specialized/ # Task-specific agents
│ │ │ ├── researcher.ts
│ │ │ ├── coder.ts
│ │ │ └── reviewer.ts
│ │ └── base.ts # Shared agent interface
│ ├── tools/
│ │ ├── definitions/ # Tool schemas
│ │ ├── implementations/ # Tool logic
│ │ └── registry.ts # Tool discovery
│ ├── prompts/
│ │ ├── system/ # Agent instructions
│ │ └── templates/ # Task templates
│ └── memory/
│ ├── conversation.ts # Short-term context
│ └── persistent.ts # Long-term storage
├── tests/
│ ├── agents/ # Agent behavior tests
│ ├── tools/ # Tool unit tests
│ └── evals/ # End-to-end evaluations
└── skills/ # Agent skills (Anthropic pattern)
├── skill-name/
│ ├── instructions.md
│ ├── scripts/
│ └── resources/
```
---
## Workflow Pattern: Explore-Plan-Execute-Verify
### 1. Explore Phase
```typescript
// Gather context before acting
async function explore(task: Task): Promise<Context> {
const relevantFiles = await agent.searchCodebase(task.query);
const existingPatterns = await agent.analyzePatterns(relevantFiles);
const dependencies = await agent.identifyDependencies(task);
return { relevantFiles, existingPatterns, dependencies };
}
```
### 2. Plan Phase (Critical)
```typescript
// Plan explicitly before execution
async function plan(task: Task, context: Context): Promise<Plan> {
const prompt = `
Task: ${task.description}
Context: ${JSON.stringify(context)}
Create a step-by-step plan. For each step:
1. What action to take
2. What tools to use
3. How to verify success
4. What could go wrong
Output JSON with steps array.
`;
return await llmCall({ prompt, schema: PlanSchema });
}
```
### 3. Execute Phase
```typescript
// Execute with verification at each step
async function execute(plan: Plan): Promise<Result[]> {
const results: Result[] = [];
for (const step of plan.steps) {
// Execute single step
const result = await executeStep(step);
// Verify before continuing
if (!await verify(step, result)) {
// Self-correct or escalate
const corrected = await selfCorrect(step, result);
if (!corrected.success) {
return handleFailure(step, results);
}
}
results.push(result);
}
return results;
}
```
### 4. Verify Phase
```typescript
// Independent verification prevents overfitting
async function verify(step: Step, result: Result): Promise<boolean> {
// Run tests if available
if (step.testCommand) {
const testResult = await runCommand(step.testCommand);
if (!testResult.success) return false;
}
// Use LLM to verify against criteria
const verification = await llmCall({
prompt: `
Step: ${step.description}
Expected: ${step.successCriteria}
Actual: ${JSON.stringify(result)}
Does the result satisfy the success criteria?
Respond with { "passes": boolean, "reasoning": string }
`,
schema: VerificationSchema
});
return verification.passes;
}
```
---
## Tool Design
### Tool Definition Pattern
```typescript
// tools/definitions/file-operations.ts
import { z } from 'zod';
export const ReadFileTool = {
name: 'read_file',
description: 'Read contents of a file. Use before modifying any file.',
parameters: z.object({
path: z.string().describe('Absolute path to the file'),
startLine: z.number().optional().describe('Start line (1-indexed)'),
endLine: z.number().optional().describe('End line (1-indexed)'),
}),
// Risk level for guardrails (OpenAI pattern)
riskLevel: 'low' as const,
};
export const WriteFileTool = {
name: 'write_file',
description: 'Write content to a file. Always read first to understand context.',
parameters: z.object({
path: z.string().describe('Absolute path to the file'),
content: z.string().describe('Complete file content'),
}),
riskLevel: 'medium' as const,
// Require confirmation for high-risk operations
requiresConfirmation: true,
};
```
### Tool Implementation
```tRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.