git-update-in-agent
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "git-update-in-agent":https://skillpi.com/zh/skills/deepskill-ae5751a36b9ab58de8f39f6c21eff2223d79cc8450ef304b895ee2391ceaf978。安装前核对上游来源和版本:https://skillhub.cn/skills/user_11f3afce/gitagent。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
skillhub.cn
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
git-update-in-agent:在项目达到里程碑或完成任务后自动检查并更新 Git、GitHub、AGENTS.md 和交接状态的工具。检测项目是否为 Git 仓库、是否配置 GitHub 远程仓库,以及是否存在 AGENTS.md 与 docs/HANDOFF.md 或其他交接文件;根据需要初始化或更新这些文件、提交检查点,并准备 GitHub 上传或版本分支。适用于用户表示阶段完成、要求同步或保存进度、希望改进版本管理或需要跨设备/多智能体连续性的场景。
介绍来源: third_party · user_11f3afce · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: git-update-in-agent
description: Automatically check and update a project's Git, GitHub, AGENTS.md, and handoff state after a milestone or completed task. Use when the user says a phase is done, asks to sync or checkpoint work, wants better version management, wants cross-device or multi-agent continuity, or explicitly asks for "git update in agent". The skill detects whether the current project is a Git repo, whether it has a GitHub remote, and whether AGENTS.md and docs/HANDOFF.md or an existing handoff file are present; it initializes or updates them as needed, commits the checkpoint, and prepares GitHub upload or version branches.Git Update In Agent
Overview
Use this skill as a milestone checkpoint for Codex-managed projects. It keeps code versioned, pushes durable project context into repo files, and makes it easier for the user to continue work across devices, agents, and future sessions.
Workflow
1. Inspect the project
Run these checks from the user's current project root:
pwd
git rev-parse --show-toplevel
git status --short --branch
git remote -v
find .. -maxdepth 2 \( -iname AGENTS.md -o -iname HANDOFF.md \) -print
If git rev-parse --show-toplevel fails, treat the current directory as the intended project root unless the files clearly indicate a nested app directory. Do not initialize Git in the user's home directory or another broad parent by accident.
2. Initialize Git if missing
If there is no Git repository:
- Inspect the directory before initializing.
- Create or update
.gitignorebeforegit init; exclude generated output, dependency folders, caches, logs, editor state, environment files, build artifacts, and local database/runtime files appropriate to the stack. - Run
git init. - Ensure the primary branch is
main:
git branch -M main
If a repository already exists, do not reinitialize it. Work inside the existing top-level repo.
3. Maintain AGENTS.md
Use AGENTS.md at the repository root for stable project rules, constraints, and operating conventions.
If AGENTS.md is missing, create a concise file with:
- project purpose, if known
- build, run, and test commands discovered from the repo
- important directories and ownership boundaries
- coding, deployment, or data-safety rules learned during the session
- a note that
docs/HANDOFF.mdcarries current session state
If AGENTS.md exists, append or revise only durable project rules. Do not put temporary progress notes there.
4. Maintain the handoff file
Prefer docs/HANDOFF.md. If the repo already has HANDOFF.md, handoff.md, or another obvious handoff file, use the existing file unless the user asks to move it.
If no handoff file exists, create docs/HANDOFF.md with these sections:
# Handoff
## Current Status
## Confirmed Decisions
## Open Questions
## Recommended Next Steps
When updating an existing handoff, add a dated checkpoint instead of overwriting useful prior context. Include:
- Current status: where the project is now and what was just completed.
- Confirmed decisions: choices that should not be re-litigated without reason.
- Open questions: unresolved issues, blockers, risks, or assumptions.
- Recommended next steps: the next concrete actions for the user or next agent.
Also include important implementation details from this milestone: changed files, commands run, verification results, deployment URLs, credentials caveats, and known failure modes. Keep it concise enough that the next agent can read it quickly.
5. Commit the checkpoint
Review the diff before committing:
git status --short
git diff --stat
git diff -- AGENTS.md docs/HANDOFF.md HANDOFF.md handoff.md
Stage the relevant project changes for this milestone. Do not discard unrelated user changes. If there are unrelated changes that should not be part of the checkpoint, leave them unstaged and explain that choice.
Use a clear commit message, for example:
git add <relevant-files>
git commit -m "Checkpoint project handoff"
If there is nothing to commit after updating docs, say so and continue to the GitHub check.
6. Check GitHub remote
Inspect remotes:
git remote -v
gh auth status
If there is no GitHub remote:
- Use
gh repo createwhen GitHub CLI is authenticated. - Default to a private repo unless the user explicitly requested public.
- Use the local directory name as the repo name unless a better project name is obvious.
- Push
mainand set upstream:
gh repo create <repo-name> --private --source . --remote origin --push
git push -u origin main
If gh is unavailable or unauthenticated, stop after the local commit and tell the user the exact next command or authentication step needed.
7. Handle existing GitHub projects and version branches
If the repo already has a GitHub remote:
- Fetch remote branches.
- If on
mainand this checkpoint represents a new version or variant, create a version branch instead of overwriting the main working line. - Use a readable branch name such as
checkpoint/YYYY-MM-DD-summaryorversion/YYYY-MM-DD-summary. - Push the branch and set upstream.
Example:
git fetch --all --prune
git switch -c checkpoint/2026-05-26-handoff-update
git push -u origin HEAD
If the user explicitly wants to update main, push main after confirming the local branch is current with the remote.
Reporting
End with a short status report:
- Git repo: already existed or initialized
- Documentation:
AGENTS.mdand handoff created or updated - Commit: hash and message, or why no commit was made
- GitHub: remote created, branch pushed, or blocker
- Next step: the single most useful follow-up action
Keep the report concrete and include exact file paths and branch names.
当前收录版本
1.0.0
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 为多智能体项目提供完整的版本控制与上下文持久化解决方案
- 解决跨设备/会话连续性的核心痛点,实用价值高
亮点
- 触发场景描述全面,覆盖用户多种自然表达方式
- 边界清晰,不易误触或漏触
待提升项
-
缺少独立 When to Use 章节 原报告严重程度:轻微
文档结构完整但未设置显式“When to Use”章节
改进建议:建议在 Overview 后添加独立“When to Use”章节以增强可读性
亮点
- 异常处理覆盖全面,包括 Git 初始化、GitHub 认证、分支策略等关键路径
- 不可逆操作有明确确认机制,安全可靠
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
账号、密钥或授权
使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。
主文档提及 · 第 82 行
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。