Repository navigation
codex
Each Chen edited this page Jun 25, 2026
·
1 revision
這頁教你把 nchu-dorm-rules 當成 Codex skill 使用。
Codex 原生支援 skills。Skill 是一個含 SKILL.md 的資料夾,裡面可以放 references、scripts、tests。這個 repo 本身就是一個 skill。
- 你會用終端機。
- 你使用 Codex CLI、Codex app 或 Codex IDE extension。
- 你想讓 Codex 在本機查中興宿舍法規。
適合你想在任何 repo 都能使用這個 skill。
mkdir -p "$HOME/.agents/skills"
git clone https://github.com/iach526526/nchu-dorm-rules.git "$HOME/.agents/skills/nchu-dorm-rules"重新開啟 Codex 後,問:
$nchu-dorm-rules 中興大學女生宿舍可以帶非住宿生進入嗎?如果不行,做了會怎樣?
如果你的 Codex 介面支援 skill 選單,也可以輸入 $ 或使用 /skills 找到 nchu-dorm-rules。
適合你只想在某個專案裡使用。
在該專案根目錄執行:
mkdir -p .agents/skills
git clone https://github.com/iach526526/nchu-dorm-rules.git .agents/skills/nchu-dorm-rules然後在該專案目錄啟動 Codex:
codex測試:
$nchu-dorm-rules 女宿可以帶非住宿生進去嗎?
如果你只是要測這包 skill 本身:
git clone https://github.com/iach526526/nchu-dorm-rules.git
cd nchu-dorm-rules
codex然後問:
請根據這個 repo 的 SKILL.md 和 references/ 回答:中興宿舍可以養寵物嗎?
這種方式不是正式安裝,但適合測試資料是否完整。
如果是個人 skill:
cd "$HOME/.agents/skills/nchu-dorm-rules"
git pull
python3 scripts/validate_skill.py如果是 repo 專用 skill:
cd .agents/skills/nchu-dorm-rules
git pull
python3 scripts/validate_skill.pycd "$HOME/.agents/skills/nchu-dorm-rules"
git archive --format zip --output nchu-dorm-rules.zip HEAD成功使用時,Codex 應該會:
- 讀
SKILL.md的回答規則。 - 查
references/index.md和references/faq_map.md。 - 回答時引用官方 PDF URL。
- 遇到文件沒有明確答案時直接說不清楚,不亂補。
請確認資料夾位置:
$HOME/.agents/skills/nchu-dorm-rules/SKILL.md
或:
你的專案/.agents/skills/nchu-dorm-rules/SKILL.md
如果位置正確但仍沒有出現,重啟 Codex。
這份教學使用 Codex 官方 skill 掃描位置:$HOME/.agents/skills 與 repo 內 .agents/skills。如果你的環境有額外自訂設定,請以你的 Codex 設定為準。
可以。Codex 可能會依問題內容自動觸發 skill。不過第一次測試建議明確寫 $nchu-dorm-rules,比較容易確認真的有啟用。