print("GEMINI_API_KEY not found", file=sys.stderr)
sys.exit(1)
ifnotos.path.exists(diff_file):
print(f"Diff file {diff_file} not found.", file=sys.stderr)
sys.exit(1)
ifnotos.path.exists(skill_file):
print(f"Skill file {skill_file} not found.", file=sys.stderr)
sys.exit(1)
withopen(diff_file, "r") asf:
diff_content=f.read()
withopen(skill_file, "r") asf:
skill_content=f.read()
prompt=f"""
You are an expert technical writer and Android developer.
Your task is to update the Gemini CLI skill instructions for an SDK based on the latest release changes.
Here is the current `SKILL.md` file:
```markdown
{skill_content}
```
Here is the git diff representing the changes introduced in this release:
```diff
{diff_content}
```
Please analyze the diff to identify any new APIs, deprecated functions, structural changes, or changes in implementation best practices.
Update the `SKILL.md` content to incorporate these new concepts or deprecations.
CRITICAL REQUIREMENTS:
- Preserve the overall markdown structure and formatting of the existing `SKILL.md`.
- Ensure you keep the YAML frontmatter intact at the top of the file (between `---`).
- Do NOT remove the `// x-release-please-version` comments in the Gradle dependencies, as they are required by our release process.
- Return ONLY the raw updated markdown content. Do NOT wrap it in ```markdown...``` code blocks, just return the exact file content so it can be directly saved.
"""
print("Requesting update from Gemini...", file=sys.stderr)