Files
llm_wiki/raw/Gitea助手开发.md
hehaiguang1123 a6f05ab2d5 Phase 0-2: Schema cleanup, typed relations, event-driven automation
- Phase 0: AGENTS.md cleanup (dedup quotes, renumber sections, merge qmd)
- Phase 1: typed relations (manage-relations.py, graph-search.py, check-staleness.py, detect-conflicts.py)
- Phase 2: frontmatter validator, weekly lint, knowledge promotion, git hooks
- Fix .gitignore to track tools/ and .githooks/
- Fix git remote URL (remove plaintext token)
- New wiki pages: 504 pages, 34 raw sources
2026-07-01 08:05:43 +08:00

117 lines
2.2 KiB
Markdown
Raw Permalink 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.
---
title: Gitea 助手开发
tags:
- openclaw
- skill
- 开发
- git
- gitea
- 探索
created: 2026-04-03
---
# Gitea 助手开发
## 核心问题
**如何开发一个可复用的自定义 Skill?(通过 Gitea 仓库助手实战)**
---
## 项目背景
你已经有一个 Gitea 仓库同步脚本(`sync-gitea.bat`),这个实战项目将开发一个 Skill 来管理和操作这个仓库。
**目标**:开发一个 Gitea 仓库助手 Skill,可以:
- 查看仓库状态
- 列出最近提交
- 搜索文件内容
---
## 推荐探索方向
### 方向1:设计 Skill 功能
**思考问题**
- 你希望这个 Skill 做什么?
- 用户会如何使用它?
- 哪些功能是核心的,哪些是次要的?
**实验思路**
- 列出你想要的功能列表
- 优先级排序
- 设计用户交互流程
### 方向2:编写 SKILL.md
**实验思路**
- 参考 [[Skill开发探索/Skill结构分析]] 的发现
- 编写 Gitea 助手的 SKILL.md
- 定义元数据、指令和工具
**可能需要**
- 描述 Skill 的用途
- 定义工具的参数和返回值
- 编写清晰的使用说明
### 方向3:实现工具逻辑
**实验思路**
- 实现工具的调用逻辑
- 使用 `git` 命令与仓库交互
- 添加错误处理
**技术考虑**
- 如何调用系统命令?
- 如何处理命令输出?
- 如何捕获和报告错误?
### 方向4:测试和迭代
**实验思路**
- 测试各种使用场景
- 修复 bug
- 优化提示词
- 编写使用文档
**测试场景**
- 查看仓库状态
- 列出最近提交
- 搜索文件内容
- 错误处理(无效路径等)
---
## 你的笔记记录
> 在这里记录你的设计、开发过程、测试结果和困惑...
---
## 我们的对话讨论
> 在这里记录我们的对话内容、讨论结果...
---
## 相关资源
- [Skills 文档](https://docs.openclaw.ai/skills)
- [GitHub Git 文档](https://git-scm.com/doc)
- 你的 Gitea 仓库
---
## 从这里开始
**你对开发 Gitea 助手有什么想法?**
例如:
- "我想这个 Skill 能帮我查看最近的提交"
- "怎么开始写 SKILL.md"
- "工具逻辑应该怎么实现?"
- "如何测试我的 Skill"
随时开始,随时提问。