Files
Git-Skill/README.md
T
2026-08-20 23:42:02 +08:00

40 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# git-skills
Cursor 完整 Git Skill,默认对接 **Gitea**:初始化、每次中文签名提交、每次远程推送,以及克隆、拉取、分支、合并、标签、暂存。作者档案与加密 Token 在本机,不进对话、不进仓库。
## 文档
- [使用文档](docs/使用文档.md) — 安装、Gitea Token、在 Cursor 里怎么说
- [架构与流程图](docs/架构.md) — 组件、信任边界、流程图
- [Gitea 说明](.cursor/skills/git-init/gitea.md) — URL / Token / SSH·GPG **添加与验证**(对齐官方文档)
- 官方:[GPG/SSH Commit Signatures](https://docs.gitea.com/administration/signing/)
- [相关文档.md](相关文档.md) — 原始任务说明
## 快速开始
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1
```
本机写入档案与 Gitea 令牌(不要在聊天里贴 Token):
```powershell
$scripts = "$env:USERPROFILE\.cursor\skills\git-init\scripts"
powershell -NoProfile -ExecutionPolicy Bypass -File "$scripts\store-profile.ps1"
powershell -NoProfile -ExecutionPolicy Bypass -File "$scripts\store-token.ps1"
```
在项目里对 Cursor 说:
```text
用 git-init 初始化,远程是 git@git.example.com:owner/repo.git
```
## 安全
- Token`%USERPROFILE%\.git-skills\token.dpapi`DPAPI,当前用户)
- 不 force push、不改已有 `origin`、不改全局 `user.name` / `user.email`
- 不要安装到 `~\.cursor\skills-cursor\`
修改 Skill 后重新运行 `install.ps1`