Files
gitea/skills/wiki/SKILL.md
T
jiantw83andClaude Fable 5 1f17f1779a feat(wiki): wiki 技能新增圖表優先內容規則並更新 README 說明
What(改了什麼)
- skills/wiki/SKILL.md 新增兩條規則:頁面內容以圖表優先(mermaid 流程圖、時序圖、甘特圖、圓餅圖與 markdown 表格),純文字為最後手段且保持精簡;tools/gitea.sh 已內建認證退回機制,兩條路徑都失敗才回報認證錯誤。
- SKILL.md frontmatter description 補上 chart-first 說明,讓技能挑選時就能看到此規則。
- README.md:「Skills 目錄」的 wiki 條目補上圖表優先說明;環境變數表的 GITEA_TOKEN 一列補上 401/403 自動退回 tea CLI token 的行為。

Why(為什麼改)
- 使用者規則:wiki 輸出盡量用 mermaid 與表格呈現,不要只有純文字。
- 認證退回已在 tools/gitea.sh 實作,技能文件與 README 需同步,避免技能誤判認證失敗或文件與行為不一致。

How(怎麼改)
- 在 SKILL.md 規則清單追加第 4、5 條,並同步改寫 frontmatter description。
- README 對應兩處文字更新,與 gitea.sh 的實際行為一致。

Who(影響哪個功能/使用者)
- 使用 jsc-gitea:wiki 的所有呼叫方(jsc-ask、jsc-sdlc、jsc-log):之後寫出的 wiki 頁會以圖表為主;閱讀 README 的使用者能得知 token 退回行為。

備註:README.md 的 GITEA_TOKEN 環境變數表一列在語意上屬於前一個 commit(tea token 退回),但為避免以 hunk 拆分 README,整檔併入本 commit。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 08:23:27 +00:00

2.3 KiB

name, description
name description
wiki 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. Page content is chart-first - prefer mermaid diagrams and markdown tables over plain prose. Used by jsc-ask, jsc-sdlc, and jsc-log for all wiki pages; not for repo code files.

wiki — read and write Gitea wiki pages

Every wiki operation in the jsc skill set goes through this skill. One entry point, one permission path.

Resolve the wiki location

Different page types can live in different {owner}/{repo} repos, classified by page-name prefix: QUESTION, PLAN, ANALYZE, MAINTAIN, REPO, LOG.

  1. Run tools/gitea.sh wiki-repo {TYPE} (TYPE = the page-name prefix). Resolution order: JSC_WIKI_REPO_{TYPE} > JSC_WIKI_REPO. When either is set, use it and skip the question.
  2. On exit 3 (neither is set), ask the user for that page type's {owner}/{repo} per the jsc-ask:ask rules, and suggest setting JSC_WIKI_REPO_{TYPE} (can differ per type) or JSC_WIKI_REPO (shared default).

Operations

Action Command
list pages tools/gitea.sh wiki-list {owner}/{repo}
read page tools/gitea.sh wiki-get {owner}/{repo} {page} (exit 4 when missing)
write page write the content to a temp file first, then tools/gitea.sh wiki-put {owner}/{repo} {page} {file} (creates or updates automatically)

Rules

  1. Page names must follow the wiki naming table in the skill guidelines (see jsc-meta/references/guidelines.md).
  2. To update a contents page (*_CONTENTS): wiki-get it first, apply the template to append or modify, then wiki-put the whole page back. Never overwrite entries owned by others.
  3. Write all wiki content in UTF-8 Traditional Chinese, per the STE100 output rule.
  4. Prefer visual forms for page content: use mermaid diagrams (flowchart, sequence, gantt, pie) and markdown tables wherever the information allows. Plain running text is the last resort, kept short.
  5. Authentication fallback is built into tools/gitea.sh: on a missing GITEA_TOKEN or a 401/403 response it retries with the tea CLI login token automatically, so only report an auth failure when both paths fail.