跳到正文
cccskills
免费在 GitHub 公开

git

Guide Git operations with explicit authorization for history changes and destructive actions. It defines recovery snapshots before discarding work, careful handling of locks and index corruption, and checks that keep unexplained changes out of commits.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Source-control safety for Git. Two rules apply whether or not you read the body. First, never commit, amend, push, tag, rebase, cherry-pick, revert, or reset --hard unless the user asked for that exact write in this session. An explicit request to create a new commit counts anywhere in the user's own task text, but it is not a request to amend, push, or tag. Finishing a task without that request is not authorization, so leave your work uncommitted for review. Second, when a Git lock file or corrupt index blocks you, never kill the holding process or bulldoze through with deletions - wait, retry, use the holder's own stop mechanism, or stop and report. Load the body only before writing Git history or recovering Git state.

查看安装方法

适用场景

  • Keeping completed changes available for review before committing
  • Saving a recovery snapshot before an authorized discard
  • Handling Git locks or a corrupted index
  • Restoring workspace files from a saved snapshot

包含的文件(2)

  • SKILL.md4.0 KB
  • scripts/workspace-recovery.sh7.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Git source-control safety

The working tree belongs to the user. Make the change, leave it visible, and let them decide what becomes history.

Never without an explicit ask

The user must have asked for that exact write in this session, in their own words. An explicit request to create a new commit counts anywhere in the user's own task text, but it is not a request to amend, push, or tag. Finishing a task without that request does not authorize a history write.

  • commit, commit --amend, push, tag, rebase, cherry-pick, revert, merge, branch deletion, reset --hard, path restore, and clean -f all require an explicit ask.
  • Never publish merely because publication would be useful.

Before an authorized discard

Recovery is insurance, not authorization. A save never expands what the user allowed you to delete or overwrite.

When the user explicitly authorized an operation that may discard or broadly overwrite workspace changes, and the workspace is an ordinary Git checkout:

  1. After read_skill gives the physical Git skill package path, run:

    bash <git-skill-dir>/scripts/workspace-recovery.sh save before-discard
    
  2. Keep the printed refs/tbh/recovery/... value in your handoff, then perform only the exact authorized operation.

  3. If the save fails or the workspace is unsupported, stop before destruction and ask the user.

To recover that saved tree later, run:

bash <git-skill-dir>/scripts/workspace-recovery.sh restore <recovery-ref>

Restore first saves the current workspace, leaves HEAD, branch, and the real index in place, and restores the selected snapshot into the worktree. The ref also retains distinct staged bytes when the same path had later worktree edits. Read those staged bytes with git show '<recovery-ref>^2:<path>'; the recovery commit's second parent is the saved index tree. Ignored files are not saved; restore refuses an ignored-path collision rather than overwrite data it could not save. Use only the exact printed ref, not a revision expression.

Always fine

Read-only inspection such as status, log, show, diff, blame, branch -v, show-ref, rev-parse, for-each-ref, and merge-base is fine. Staging named files to inspect diff --cached, and a temporary stash around a tool that requires a clean tree, are also fine when the original state is put back afterward.

The rest

  • Do not use a broad add in a tree you did not clean; name the files you changed.
  • Do not initialize a repository inside vendored, build, data, or existing source-control trees.
  • Do not hand-edit generated files; change their source of truth.
  • Scratch repositories under a temporary directory are yours to experiment in.

Locks and corrupt state

A Git lock usually means another process is writing. Never kill the holder on your own initiative. Wait, inspect the holder read-only, use that tool's normal stop mechanism, or report the block. Never delete a lock without proving no live process owns it, and never respond to index corruption by deleting state and committing anyway.

Never commit or push while status reports changes you did not make and cannot explain.

If you already made an unwanted write

Say so plainly and stop. Do not attempt more history surgery without direction.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

3d-object

免费

Create a 3D object with three.js, inspect it from every angle in an interactive viewer, and download it as OBJ + MTL or GLB for use in other 3D applications.

中文简介正在准备中。当前显示英语简介。

  • Create a 3D object and inspect it from every angle
  • Export a model for further editing in Blender
  • Review an object's silhouette and materials
asgeirtj/system_prompts_leaks7万2026年10月16日 更新

Maintain a private task list with deadlines, next steps, waiting parties, and blockers. Update progress and dependencies, merge duplicate items, and archive closed tasks so ongoing commitments stay clear and easy to follow.

中文简介正在准备中。当前显示英语简介。

  • Record tasks and commitments with deadlines
  • Track pending replies and reasons work cannot proceed
  • Update task dependencies when prerequisites are completed
asgeirtj/system_prompts_leaks7万2026年10月16日 更新

agents

免费

Coordinate a task from a verifiable goal through completion. Handle work directly or split independent tasks across separate agent sessions, track progress, verify results, and arrange pull request merging when included in the goal.

中文简介正在准备中。当前显示英语简介。

  • Split independent tasks across agents
  • Check progress across ongoing tasks
  • Resume a previously started project
asgeirtj/system_prompts_leaks7万2026年10月16日 更新

Create animated HTML pages with smooth scene transitions and playback controls. An editable timeline lets users adjust scene lengths and speeds, with fixed landscape or portrait layouts prepared for video export.

中文简介正在准备中。当前显示英语简介。

  • Create an animated product walkthrough
  • Explain a message through moving text and graphics
  • Build a portrait animation for video export
asgeirtj/system_prompts_leaks7万2026年10月16日 更新

Review synced Apple Health records, including steps, heart rate, sleep, and workouts. Retrieve daily summaries or detailed samples for a chosen period, and check sync status and missing data before interpreting the results.

中文简介正在准备中。当前显示英语简介。

  • Review daily steps and heart rate over time
  • Check sleep stages, duration, and awakenings
  • Review workout duration, distance, and calories
asgeirtj/system_prompts_leaks7万2026年10月16日 更新

Create and edit Word documents and templates, reorganize text, replace images, and work with tracked changes or comments. Apply proper headings and lists, then render every page to check its appearance before delivery.

中文简介正在准备中。当前显示英语简介。

  • Create a structured Word document
  • Reorganize content in an existing document
  • Replace images or text in a document
asgeirtj/system_prompts_leaks7万2026年10月16日 更新

查看 asgeirtj 的全部技能

报告此技能的问题