anthropics / anthropics/claude-agent-sdk-demos

agent-sdk use skills fail, but I can directly use the skill to return the data.

Abierto
#60 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
2.7k
Forks
427
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I used this script to call the skill and found that it couldn't retrieve the data, but I can directly use the skill to return the data. They both use the same model, what's the difference

`import asyncio
import os
from claude_agent_sdk import query, ClaudeAgentOptions
from dotenv import load_dotenv

load_dotenv()

async def main():
options = ClaudeAgentOptions(
cwd=os.path.dirname(os.path.abspath(__file__)),
setting_sources=["user", "project"],
allowed_tools=["Skill", "Read", "Write", "Bash", "WebSearch", "WebFetch"]
)
async for message in query(
prompt="The current time March 26, 2026. Use regional industry searcher skills to help me retrieve the bidding information in the industrial Internet in the last 30 days. Please format and output the markdown file",
options=options
):
print(message)
asyncio.run(main())
`
this is my skill

[SKILL.md](https://github.com/user-attachments/files/26267116/SKILL.md)

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.