From 44a193ec05274b9c27ceda86ba9939cabdd2343c Mon Sep 17 00:00:00 2001 From: "yashshrivastava1313@gmail.com" Date: Tue, 12 May 2026 12:42:26 +0530 Subject: [PATCH] fix(agent-skills): prevent invalid blog-writer script calls and add fallback --- python/agents/agent-skills-tutorial/app/agent.py | 8 ++++++-- .../agent-skills-tutorial/app/skills/blog-writer/SKILL.md | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/python/agents/agent-skills-tutorial/app/agent.py b/python/agents/agent-skills-tutorial/app/agent.py index 1fcb03b512..056f96604b 100644 --- a/python/agents/agent-skills-tutorial/app/agent.py +++ b/python/agents/agent-skills-tutorial/app/agent.py @@ -160,7 +160,7 @@ ) root_agent = Agent( - model="gemini-2.5-flash", + model="gemini-2.5-flash-lite", name="blog_skills_agent", description="A blog-writing agent powered by reusable skills.", instruction=( @@ -174,7 +174,11 @@ "1. Load the relevant skill(s) to get detailed instructions\n" "2. Use `load_skill_resource` to access reference materials\n" "3. Follow the skill's step-by-step instructions\n" - "4. Apply multiple skills together when appropriate\n\n" + "4. Apply multiple skills together when appropriate\n" + "5. Do not call `run_skill_script` unless the loaded skill explicitly " + "contains a `scripts/` resource for that file\n" + "6. If script execution returns `SCRIPT_NOT_FOUND`, do not retry script " + "execution; continue using available skill instructions and references\n\n" "When the user asks you to create a new skill:\n" "1. Load the skill-creator skill\n" "2. Read the specification and example references\n" diff --git a/python/agents/agent-skills-tutorial/app/skills/blog-writer/SKILL.md b/python/agents/agent-skills-tutorial/app/skills/blog-writer/SKILL.md index a0cf93dbbd..8deee26761 100644 --- a/python/agents/agent-skills-tutorial/app/skills/blog-writer/SKILL.md +++ b/python/agents/agent-skills-tutorial/app/skills/blog-writer/SKILL.md @@ -1,3 +1,4 @@ + --- name: blog-writer description: Blog post writing skill with structure templates and style guidelines. Guides the agent through writing well-structured, engaging technical blog posts with proper formatting, section flow, and reader engagement techniques. @@ -7,6 +8,11 @@ description: Blog post writing skill with structure templates and style guidelin When asked to write a blog post, follow these steps: +## Important Constraint +This skill does not provide a `scripts/` directory. +Do not call `run_skill_script` for this skill. +Use `load_skill_resource` for `references/style-guide.md`, then write content directly. + ## Step 1: Structure Use `load_skill_resource` to read `references/style-guide.md` for the writing style rules.