anthropics / anthropics/claude-agent-sdk-demos

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

Ouverte
#60 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
TypeScript
Étoiles
2.7k
Forks
427
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.