[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75EW8MF699EMGSZHZAMDE10":3,"skill-same:01M75EW8MF699EMGSZHZAMDE10":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M75EW8MF699EMGSZHZAMDE10","function-calling",null,"Registering custom Python tools, handling parallel function calls, and executing callback routines.","Lord1Egypt\u002Fai-skillforge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M7597M9CBBVAPX1CYE1KFTSM",2,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fskills\u002Fgemini\u002Ffunction-calling\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: function-calling\ndescription: Registering custom Python tools, handling parallel function calls, and executing callback routines.\nallowed-tools: Read Write Edit Bash\nlicense: MIT license\nmetadata:\n    skill-author: Lord1Egypt\n---\n\n# Gemini Function Calling & Tool Integration Skill\n\n## Overview\nThis skill describes how to connect Gemini models to external tool APIs. By declaring Python functions as tools, the model returns structured tool call instructions when it needs to retrieve live data, execute calculations, or write data. The calling application executes the actual code and returns the output to Gemini to compile a final answer.\n\n---\n\n## When to Use This Skill\n- Fetching live info from databases, web endpoints, or hardware sensors.\n- Performing strict computations (e.g. currency conversion, SQL executions).\n- Connecting agent workflows to system commands or external systems (like sending slack alerts or Telegram updates).\n\n---\n\n## Quick Start (with runnable code examples)\n\n```python\nimport json\nfrom google import genai\n\n# Initialize the Gemini GenAI Client\nclient = genai.Client()\n\n# 1. Define the actual tool functions in Python\ndef fetch_weather(location: str) -> str:\n    \"\"\"Retrieve the current weather status for a given city location.\n    \n    Args:\n        location: The name of the city (e.g., Cairo, London, Tokyo)\n    \"\"\"\n    # Simulate a database check or API call\n    db = {\n        \"cairo\": \"Sunny and hot, 38°C\",\n        \"london\": \"Overcast and rainy, 14°C\",\n        \"tokyo\": \"Mild and humid, 22°C\"\n    }\n    loc = location.strip().lower()\n    return db.get(loc, f\"Moderate and clear, 20°C in {location}\")\n\ndef calculate_tax(amount: float, rate: float = 0.14) -> float:\n    \"\"\"Calculate the tax amount for a transaction.\n    \n    Args:\n        amount: The base transaction money amount\n        rate: The tax rate percentage decimal (default is 0.14 for 14%)\n    \"\"\"\n    return round(amount * rate, 2)\n\n# 2. Run the tool loop\ndef run_tool_use_agent(user_query: str):\n    print(f\"User Request: '{user_query}'\")\n    \n    # Send functions to model as tools (Gemini reads the docstrings\u002Ftypes)\n    response = client.models.generate_content(\n        model='gemini-2.5-flash',\n        contents=user_query,\n        config=dict(\n            tools=[fetch_weather, calculate_tax]\n        )\n    )\n    \n    # Check if the model wants to execute a function call\n    function_calls = response.function_calls\n    if function_calls:\n        print(\"\\n--- Gemini Requested Function Calls ---\")\n        history = [response.candidates[0].content]\n        \n        # Process each requested function call\n        for call in function_calls:\n            name = call.name\n            args = call.args\n            print(f\"Executing local function '{name}' with arguments: {args}\")\n            \n            # Route and execute locally\n            if name == \"fetch_weather\":\n                result = fetch_weather(**args)\n            elif name == \"calculate_tax\":\n                result = calculate_tax(**args)\n            else:\n                result = \"Error: Tool not found\"\n                \n            print(f\"Result: {result}\")\n            \n            # Append the function call result back as a tool response\n            history.append({\n                \"role\": \"tool\",\n                \"parts\": [{\n                    \"function_response\": {\n                        \"name\": name,\n                        \"response\": {\"result\": result}\n                    }\n                }]\n            })\n            \n        # Send the execution history back to Gemini to generate the final text reply\n        final_response = client.models.generate_content(\n            model='gemini-2.5-flash',\n            contents=history,\n            config=dict(\n                tools=[fetch_weather, calculate_tax]\n            )\n        )\n        print(\"\\n--- Final Grounded Output ---\")\n        print(final_response.text)\n    else:\n        print(\"\\nGemini did not require any function calls.\")\n        print(response.text)\n\nif __name__ == \"__main__\":\n    run_tool_use_agent(\"I need the weather in Cairo, and please calculate the 14% tax on a $250 invoice.\")\n```\n\n---\n\n## Advanced Usage\n\n### Forcing Specific Modes (Function Calling Constraints)\nYou can force Gemini to call a specific function, or run purely in text mode without using tools:\n\n```python\n# Force the model to choose from tools and output a function call\nresponse = client.models.generate_content(\n    model='gemini-2.5-flash',\n    contents=\"Analyze cairo\",\n    config=dict(\n        tools=[fetch_weather],\n        tool_config={\n            \"function_calling_config\": {\n                \"mode\": \"ANY\" # Options: AUTO, ANY, NONE\n            }\n        }\n    )\n)\n```\n\n---\n\n## Key References\n- [Google GenAI Function Calling API docs](https:\u002F\u002Fgithub.com\u002Fgoogleapis\u002Fpython-genai)\n- Gemini Function Calling Guide\n\n---\n\n## Dependencies\n- `google-genai>=0.1.1`\n","# Gemini Function Calling & Tool Integration Skill\n\n## Overview\nThis skill describes how to connect Gemini models to external tool APIs. By declaring Python functions as tools, the model returns structured tool call instructions when it needs to retrieve live data, execute calculations, or write data. The calling application executes the actual code and returns the output to Gemini to compile a final answer.\n\n---\n\n## When to Use This Skill\n- Fetching live info from databases, web endpoints, or hardware sensors.\n- Performing strict computations (e.g. currency conversion, SQL executions).\n- Connecting agent workflows to system commands or external systems (like sending slack alerts or Telegram updates).\n\n---\n\n## Quick Start (with runnable code examples)\n\n```python\nimport json\nfrom google import genai\n\n# Initialize the Gemini GenAI Client\nclient = genai.Client()\n\n# 1. Define the actual tool functions in Python\ndef fetch_weather(location: str) -> str:\n    \"\"\"Retrieve the current weather status for a given city location.\n    \n    Args:\n        location: The name of the city (e.g., Cairo, London, Tokyo)\n    \"\"\"\n    # Simulate a database check or API call\n    db = {\n        \"cairo\": \"Sunny and hot, 38°C\",\n        \"london\": \"Overcast and rainy, 14°C\",\n        \"tokyo\": \"Mild and humid, 22°C\"\n    }\n    loc = location.strip().lower()\n    return db.get(loc, f\"Moderate and clear, 20°C in {location}\")\n\ndef calculate_tax(amount: float, rate: float = 0.14) -> float:\n    \"\"\"Calculate the tax amount for a transaction.\n    \n    Args:\n        amount: The base transaction money amount\n        rate: The tax rate percentage decimal (default is 0.14 for 14%)\n    \"\"\"\n    return round(amount * rate, 2)\n\n# 2. Run the tool loop\ndef run_tool_use_agent(user_query: str):\n    print(f\"User Request: '{user_query}'\")\n    \n    # Send functions to model as tools (Gemini reads the docstrings\u002Ftypes)\n    response = client.models.generate_content(\n        model='gemini-2.5-flash',\n        contents=user_query,\n        config=dict(\n            tools=[fetch_weather, calculate_tax]\n        )\n    )\n    \n    # Check if the model wants to execute a function call\n    function_calls = response.function_calls\n    if function_calls:\n        print(\"\\n--- Gemini Requested Function Calls ---\")\n        history = [response.candidates[0].content]\n        \n        # Process each requested function call\n        for call in function_calls:\n            name = call.name\n            args = call.args\n            print(f\"Executing local function '{name}' with arguments: {args}\")\n            \n            # Route and execute locally\n            if name == \"fetch_weather\":\n                result = fetch_weather(**args)\n            elif name == \"calculate_tax\":\n                result = calculate_tax(**args)\n            else:\n                result = \"Error: Tool not found\"\n                \n            print(f\"Result: {result}\")\n            \n            # Append the function call result back as a tool response\n            history.append({\n                \"role\": \"tool\",\n                \"parts\": [{\n                    \"function_response\": {\n                        \"name\": name,\n                        \"response\": {\"result\": result}\n                    }\n                }]\n            })\n            \n        # Send the execution history back to Gemini to generate the final text reply\n        final_response = client.models.generate_content(\n            model='gemini-2.5-flash',\n            contents=history,\n            config=dict(\n                tools=[fetch_weather, calculate_tax]\n            )\n        )\n        print(\"\\n--- Final Grounded Output ---\")\n        print(final_response.text)\n    else:\n        print(\"\\nGemini did not require any function calls.\")\n        print(response.text)\n\nif __name__ == \"__main__\":\n    run_tool_use_agent(\"I need the weather in Cairo, and please calculate the 14% tax on a $250 invoice.\")\n```\n\n---\n\n## Advanced Usage\n\n### Forcing Specific Modes (Function Calling Constraints)\nYou can force Gemini to call a specific function, or run purely in text mode without using tools:\n\n```python\n# Force the model to choose from tools and output a function call\nresponse = client.models.generate_content(\n    model='gemini-2.5-flash',\n    contents=\"Analyze cairo\",\n    config=dict(\n        tools=[fetch_weather],\n        tool_config={\n            \"function_calling_config\": {\n                \"mode\": \"ANY\" # Options: AUTO, ANY, NONE\n            }\n        }\n    )\n)\n```\n\n---\n\n## Key References\n- [Google GenAI Function Calling API docs](https:\u002F\u002Fgithub.com\u002Fgoogleapis\u002Fpython-genai)\n- Gemini Function Calling Guide\n\n---\n\n## Dependencies\n- `google-genai>=0.1.1`\n",{"name":5,"license":24,"metadata":25,"description":7,"allowed-tools":26},"MIT license",{"skill-author":9},"Read Write Edit Bash","main","3f88e1b76af67701a6405069a542e21a997d2868","skills\u002Fgemini\u002Ffunction-calling",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-05 10:16:24",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add Lord1Egypt\u002Fai-skillforge --skill function-calling",{"tool":41,"command":42},"bunx","bunx skills add Lord1Egypt\u002Fai-skillforge --skill function-calling",{"tool":44,"command":45},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fai-skillforge --skill function-calling","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fskills\u002Fgemini\u002Ffunction-calling\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M75GWTHWA52GYQKS347FF6CD","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fskills\u002Fscientific\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M75GW9FBP9NAFBSNVJ23RHSX","what-if-oracle","Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like \"what if...\", \"what would happen if...\", \"what are the possibilities\", \"explore scenarios\", \"scenario analysis\", \"possibility space\", \"what could go wrong\", \"best case \u002F worst case\", \"risk analysis\", \"contingency planning\", \"strategic options\", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fskills\u002Fscientific\u002Fwhat-if-oracle\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M75GW351MZZQ1V7207PDCX5D","venue-templates","Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fskills\u002Fscientific\u002Fvenue-templates\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M75GVYGMAZDV2NHWSV6PP6TK","vaex","Use this skill for processing and analyzing large tabular datasets (billions of rows) that exceed available RAM. Vaex excels at out-of-core DataFrame operations, lazy evaluation, fast aggregations, efficient visualization of big data, and machine learning on large datasets. Apply when users need to work with large CSV\u002FHDF5\u002FArrow\u002FParquet files, perform fast statistics on massive datasets, create visualizations of big data, or build ML pipelines that do not fit in memory.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fskills\u002Fscientific\u002Fvaex\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M75GVS0ADH3DZ3QB564EVYC9","usfiscaldata","Query the U.S. Treasury Fiscal Data API for federal financial data including national debt, government spending, revenue, interest rates, exchange rates, and savings bonds. Access 54 datasets and 182 data tables with no API key required. Use when working with U.S. federal fiscal data, national debt tracking (Debt to the Penny), Daily Treasury Statements, Monthly Treasury Statements, Treasury securities auctions, interest rates on Treasury securities, foreign exchange rates, savings bonds, or any U.S. government financial statistics.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fskills\u002Fscientific\u002Fusfiscaldata\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M75GVDTBSXRQ4Q11RVJQC56M","treatment-plans","Generate concise (3-4 page), focused medical treatment plans in LaTeX\u002FPDF format for all clinical specialties. Supports general medical treatment, rehabilitation therapy, mental health care, chronic disease management, perioperative care, and pain management. Includes SMART goal frameworks, evidence-based interventions with minimal text citations, regulatory compliance (HIPAA), and professional formatting. Prioritizes brevity and clinical actionability.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fskills\u002Fscientific\u002Ftreatment-plans\u002FSKILL.md",[],[]]