360 Secure SkillHub
360 安全技能中心

Preserve Human Code Edits - load human changes into context before editing

面向代码文件编辑的 Git 工作流技能:编辑前用 git check-ignore 判断文件是否被忽略,对已跟踪文件用 git diff 识别并保留人类改动,每轮编辑结束后以简洁信息提交。仅在用户要求时启用,不涉及远程推送、冲突解决或回滚。

分类:开发
tobiaswestholm
tobiaswestholm
热度 13.58
最近更新 2026-08-04 21:15:36

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add tobiaswestholm/respect-human-edits
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
respect-human-edits
description
Detect and preserve human code edits
version
1.0.1

Safe Git Editing & Committing Workflow

Use this skill only when requested by the user to ensure human code edits are preserved and changes are tracked.

Workflow Steps

  1. Check if gitignored: Before editing a file, use the terminal command git check-ignore -v <filepath> to see if a file is ignored by git.

  2. Check Human Edits: If ignored: Load the file into context before editing. If tracked: Check if the user modified it with the terminal command git diff -U1 <filepath>. Any diff is a human edit and must be preserved unless instructed otherwise.

  3. Always commit: After finishing each series of edits, finish by committing to git with a very concise message.