dev/agent-skills/upgrade-examples/SKILL.md
Upgrade the cocoindex version in all example pyproject.toml files.
/upgrade-examples <version>
Example: /upgrade-examples 1.0.0a5
To upgrade all example dependencies (replace VERSION with the actual version, e.g., 1.0.0a10):
git checkout -b ex-dep-VERSION
Important: Use the literal version string directly in the sed command. Do not use shell variables as quoting issues can cause the version to be omitted.
find examples -name "pyproject.toml" -not -path "*/.venv/*" -exec grep -l "cocoindex" {} \; | xargs sed -i '' 's/cocoindex\([^>]*\)>=[0-9][0-9a-zA-Z.]*/cocoindex\1>=VERSION/g'
grep -r "cocoindex.*>=" examples --include="pyproject.toml" | grep -v ".venv"
git add examples/*/pyproject.toml
git commit -m "chore: upgrade examples deps to cocoindex-VERSION"
git push -u origin ex-dep-VERSION
gh CLI and capture the PR URL from its output:gh pr create --base v1 --title "chore: upgrade examples deps to cocoindex-VERSION" --body ""
git checkout v1
git branch -d ex-dep-VERSION
gh pr create output to the user.