brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
yeetUse only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).
Independent GitHub snapshot · Automated classification · Original documentation governs
gh).'
zh_description: "按用户要求暂存、提交、推送改动并创建 GitHub PR。"
version: "1.0.1"
author: "seaworld008"
source: "in-house"
source_url: ""
tags: '["automation", "workflow", "yeet"]'
created_at: "2026-03-04"
updated_at: "2026-09-06"
quality: 2
complexity: "intermediate""Yeet" 是一种极致效率的开发哲学:当一项修改已经完成并通过验证,无需反复确认,直接执行“暂存 -> 提交 -> 推送 -> 创建 PR”的一键流水线。本技能通过 gh CLI 和原生 git 命令,帮助开发者在秒级完成从本地代码到 GitHub 评审页面的流转。
# 确保已安装 GitHub CLI
gh --version
# 验证登录状态与权限 (repo, workflow)
gh auth status
gh 缺失,Agent 应主动提示用户安装。gh auth login。main/master,自动创建 codex/{feature-description}。feat: add auth 或 fix: resolve race condition)。[codex] {description},需简明扼要概括全量 Diff。git status -sb 检查当前状态是否干净。main 或 master)。description 生成合规的分支名并切出:git checkout -b "codex/$(echo $DESC | slugify)"。git add -A 或针对特定目录 git add src/。git diff --cached --stat 预览待提交的内容,防止误传大文件。.env),Agent 应自动发出警报并中止 Yeet。npm run lint 或 go test ./...)。prettier --write)并重新运行。git push -u origin $(git branch --show-current)。git pull --rebase 并重新推送。--force-with-lease,但必须在 PR 描述中注明。gh pr create --draft --fill 创建 PR。Draft (草稿) 状态,给用户最后一次人工复核的机会。### 🚀 Yeet 开始执行
1. **[Branch]**: 从 `main` 切换到 `codex/fix-login-typo`。
2. **[Stage]**: 暂存 `src/auth.py` 的改动。
3. **[Commit]**: `fix: correct typo in login error message`。
4. **[Pre-Check]**: 运行 `pytest` ... **PASSED**.
5. **[Push]**: 推送至 `origin/codex/fix-login-typo`。
6. **[PR]**: 创建 PR #456 并生成描述。
### 📄 自动生成的 PR Body 预览
> **Title**: [codex] fix login typo
> **Description**: This PR addresses a UI issue where the error message showed 'Invalid credentails'.
> **Root Cause**: Spelling error in string literal.
> **Fix**: Updated L45 in `auth.py`.
> **Tests**: Ran unit tests and verified manually.
# 生成临时 Body 文件并创建 PR
echo "## Summary\n$(git log -1 --pretty=%B)" > /tmp/pr-body.md
gh pr create --title "[codex] feature-x" --body-file /tmp/pr-body.md --draft
gh-fix-ci 技能发现错误并修复后,自动衔接 yeet 技能,将修复代码推回 PR。cron 技能,每周五下午自动将本地所有的 WIP (Work In Progress) 分支执行一次 Yeet 到远程备份。gh 和 git 的本地配置。如果环境不安全,严禁在包含明文密钥的项目中使用。rebase 过程中如果遇到复杂冲突,Yeet 流程必须停止,交给人类解决。Push 权限(如 Fork 的原始库),此时应提醒用户进行 Fork 或推送到自己的仓库。pre-push 检查非常耗时(如编译 C++ 项目),Yeet 会显著变慢。git add 后,Agent 必须打印出变更文件的列表。/tmp/pr-body.md 等中间文件。