Files
gitea/skills/wiki/SKILL.md
T
2026-08-21 13:08:43 +08:00

30 lines
1.6 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.
---
name: wiki
description: Read or write a Gitea wiki page through tools/gitea.sh with GITEA_TOKEN. Resolve the wiki repo per page type (QUESTION/PLAN/ANALYZE/MAINTAIN/REPO/LOG) via gitea.sh wiki-repo, falling back to JSC_WIKI_REPO or a decision-tree question. Used by jsc-ask, jsc-sdlc, and jsc-log for all wiki pages; not for repo code files.
---
# wiki — Gitea Wiki 頁讀寫
所有 jsc 技能的 wiki 操作都必須經由本技能,統一入口與權限。
## 決定 wiki 位置
不同類型的 wiki 頁可以放在不同的 `{owner}/{repo}`,以頁名前綴分類:`QUESTION`、`PLAN`、`ANALYZE`、`MAINTAIN`、`REPO`、`LOG`。
1. 執行 `tools/gitea.sh wiki-repo {TYPE}`(TYPE = 頁名前綴)。解析順序:`JSC_WIKI_REPO_{TYPE}` > `JSC_WIKI_REPO`;已設定就直接使用,不再詢問。
2. exit 3(都未設定)時依 `jsc-ask:ask` 規則詢問使用者該類型頁面所在的 `{owner}/{repo}`,並建議使用者設定 `JSC_WIKI_REPO_{TYPE}`(各類型可不同)或 `JSC_WIKI_REPO`(共用預設)。
## 操作
| 動作 | 指令 |
| --- | --- |
| 列頁 | `tools/gitea.sh wiki-list {owner}/{repo}` |
| 讀頁 | `tools/gitea.sh wiki-get {owner}/{repo} {page}`(不存在 exit 4) |
| 寫頁 | 內容先寫入暫存檔,再 `tools/gitea.sh wiki-put {owner}/{repo} {page} {file}`(自動判斷新建或更新) |
## 規則
1. 頁面命名必須符合技能準則的「Wiki 頁命名總表」(見 `jsc-meta/references/guidelines.md`)。
2. 更新目錄頁(`*_CONTENTS`)時先 `wiki-get` 取回、套用範本附加或修改後整頁 `wiki-put`,不可覆蓋他人條目。
3. 內容一律 UTF-8 繁體中文。