[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EG5HCSDWPESVRCTX5JX9CJ":3,"skill-same:01M6EG5HCSDWPESVRCTX5JX9CJ":69},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M6EG5HCSDWPESVRCTX5JX9CJ","smolagents",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fsmolagents\u002FSKILL.md",[],[5],"2026-11-10 10:12:30",false,"# smolagents — Hugging Face Lightweight Agent Framework\n\nYou are an expert in smolagents, Hugging Face's minimalist agent framework. You help developers build AI agents that write and execute Python code to solve tasks, use tools from the Hugging Face Hub, chain multiple agents together, and run on any LLM (OpenAI, Anthropic, local models) — providing a simple, code-first approach to building agents without complex abstractions.\n\n## Core Capabilities\n\n### Code Agent\n\n```python\n# agents\u002Fresearch.py — Agent that writes and executes Python code\nfrom smolagents import CodeAgent, tool, HfApiModel, OpenAIServerModel\n\n# Use any LLM as the engine\nmodel = OpenAIServerModel(model_id=\"gpt-4o\")\n# Or local: HfApiModel(model_id=\"meta-llama\u002FLlama-3.1-70B-Instruct\")\n# Or Anthropic: AnthropicServerModel(model_id=\"claude-sonnet-4-20250514\")\n\n@tool\ndef search_web(query: str) -> str:\n    \"\"\"Search the web for information.\n\n    Args:\n        query: Search query string\n    \"\"\"\n    results = brave_search(query, count=5)\n    return \"\\n\".join([f\"- {r['title']}: {r['description']}\" for r in results])\n\n@tool\ndef get_stock_price(symbol: str) -> dict:\n    \"\"\"Get current stock price and basic metrics.\n\n    Args:\n        symbol: Stock ticker symbol (e.g., AAPL, GOOGL)\n    \"\"\"\n    data = yfinance.Ticker(symbol)\n    return {\n        \"price\": data.info[\"currentPrice\"],\n        \"change\": data.info[\"regularMarketChangePercent\"],\n        \"market_cap\": data.info[\"marketCap\"],\n        \"pe_ratio\": data.info.get(\"trailingPE\"),\n    }\n\n@tool\ndef create_chart(data: dict, title: str) -> str:\n    \"\"\"Create a chart from data and save as image.\n\n    Args:\n        data: Dictionary with x and y values\n        title: Chart title\n    \"\"\"\n    import matplotlib.pyplot as plt\n    plt.figure(figsize=(10, 6))\n    plt.plot(data[\"x\"], data[\"y\"])\n    plt.title(title)\n    path = f\"\u002Ftmp\u002F{title.replace(' ', '_')}.png\"\n    plt.savefig(path)\n    return f\"Chart saved to {path}\"\n\n# Create agent\nagent = CodeAgent(\n    tools=[search_web, get_stock_price, create_chart],\n    model=model,\n    max_steps=10,\n    additional_authorized_imports=[\"pandas\", \"numpy\", \"matplotlib\"],\n)\n\n# Agent writes and executes Python code to solve the task\nresult = agent.run(\n    \"Compare AAPL and MSFT stock performance. \"\n    \"Get their current prices, calculate the PE ratio difference, \"\n    \"and create a comparison chart.\"\n)\n# Agent generates code like:\n# aapl = get_stock_price(\"AAPL\")\n# msft = get_stock_price(\"MSFT\")\n# ... creates chart, returns analysis\n```\n\n### Multi-Agent\n\n```python\nfrom smolagents import CodeAgent, ManagedAgent\n\n# Specialist agents\nweb_agent = CodeAgent(tools=[search_web], model=model)\ndata_agent = CodeAgent(tools=[get_stock_price, create_chart], model=model,\n                        additional_authorized_imports=[\"pandas\", \"numpy\", \"matplotlib\"])\n\n# Manager agent delegates to specialists\nmanaged_web = ManagedAgent(agent=web_agent, name=\"web_researcher\",\n    description=\"Searches the web for information\")\nmanaged_data = ManagedAgent(agent=data_agent, name=\"data_analyst\",\n    description=\"Analyzes financial data and creates charts\")\n\nmanager = CodeAgent(\n    tools=[],\n    model=model,\n    managed_agents=[managed_web, managed_data],\n)\n\nresult = manager.run(\n    \"Research the latest AI chip market trends, \"\n    \"then analyze NVDA and AMD stock data and create a comparison report.\"\n)\n```\n\n### Hub Tools\n\n```python\nfrom smolagents import load_tool\n\n# Load tools from Hugging Face Hub\nimage_gen = load_tool(\"m-ric\u002Ftext-to-image\", trust_remote_code=True)\ntranslator = load_tool(\"m-ric\u002Ftranslation\", trust_remote_code=True)\nspeech = load_tool(\"m-ric\u002Ftext-to-speech\", trust_remote_code=True)\n\nagent = CodeAgent(tools=[image_gen, translator, speech], model=model)\n```\n\n## Installation\n\n```bash\npip install smolagents\n```\n\n## Best Practices\n\n1. **Code agents > tool agents** — CodeAgent writes Python to solve tasks; more flexible than fixed tool-calling patterns\n2. **Tool docstrings matter** — Agent reads tool descriptions and arg docs to decide how to use them; be specific\n3. **Authorized imports** — Whitelist Python packages with `additional_authorized_imports`; agent can use pandas, numpy, etc.\n4. **Multi-agent delegation** — Use ManagedAgent for specialized sub-agents; manager delegates, specialists execute\n5. **Hub tools** — Share and reuse tools via Hugging Face Hub; community-contributed tools for common tasks\n6. **max_steps limit** — Set reasonable step limits (5-10); prevents infinite loops and controls costs\n7. **Any LLM** — Works with OpenAI, Anthropic, Hugging Face Inference, local models; swap with one line\n8. **Sandboxed execution** — Code runs in a sandbox by default; use E2B or Docker for production isolation\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Fsmolagents",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill smolagents",{"tool":37,"command":38},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill smolagents",{"tool":40,"command":41},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill smolagents","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fsmolagents\u002FSKILL.md",true,[45,51,57,61,65],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"deep-linking-patterns.md","REFERENCE","参考文档",19433,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_Mobile-Dev\u002Ffrom-article-18-ui-ux\u002Fclaude-code-apple-skills\u002Fskills\u002Fgenerators\u002Fdeep-linking\u002Fdeep-linking-patterns.md",{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"templates\u002Fapple-app-site-association","OTHER","其他",1259,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_Mobile-Dev\u002Ffrom-article-18-ui-ux\u002Fclaude-code-apple-skills\u002Fskills\u002Fgenerators\u002Fdeep-linking\u002Ftemplates\u002Fapple-app-site-association",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"templates\u002FAppShortcuts.swift",7120,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_Mobile-Dev\u002Ffrom-article-18-ui-ux\u002Fclaude-code-apple-skills\u002Fskills\u002Fgenerators\u002Fdeep-linking\u002Ftemplates\u002FAppShortcuts.swift",{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"templates\u002FDeepLink.swift",6863,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_Mobile-Dev\u002Ffrom-article-18-ui-ux\u002Fclaude-code-apple-skills\u002Fskills\u002Fgenerators\u002Fdeep-linking\u002Ftemplates\u002FDeepLink.swift",{"path":66,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":67,"sourceHtmlUrl":68},"templates\u002FDeepLinkRouter.swift",6239,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_Mobile-Dev\u002Ffrom-article-18-ui-ux\u002Fclaude-code-apple-skills\u002Fskills\u002Fgenerators\u002Fdeep-linking\u002Ftemplates\u002FDeepLinkRouter.swift",[70,84,94,103,109,116],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":80,"publishedAt":18},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[75],{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[81,82,83],"model","model hierarchy","model hierarchy skill",{"skillNo":85,"name":86,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":90,"publishedAt":18},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[89],{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},[91,92,93],"MCP","zoom","zoom mcp",{"skillNo":95,"name":96,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":18},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[100,101,102,92],"sdk","zoom apps sdk","apps",{"skillNo":104,"name":105,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":18},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[105],{"skillNo":110,"name":111,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":115,"publishedAt":18},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[114],{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},[111],{"skillNo":117,"name":118,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":18},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[118]]