feat(codex-skills): surface built-in .system skills as read-only

Scan ~/.codex/skills/.system so Codex CLI's bundled skills (imagegen,
skill-creator, etc.) appear in the $ autocomplete and Skills settings.
Mark them read_only on the API; the save/delete handlers refuse writes
to that path, and the UI shows a system badge with a tooltip and
disables edit/delete/save for those entries.
This commit is contained in:
xintaofei
2026-04-24 14:18:36 +08:00
parent e9c3076197
commit 0e09711e56
14 changed files with 101 additions and 5 deletions

View File

@@ -302,6 +302,10 @@ pub struct AgentSkillItem {
pub scope: AgentSkillScope,
pub layout: AgentSkillLayout,
pub path: String,
/// True for skills bundled by the agent CLI itself (e.g. Codex's
/// `~/.codex/skills/.system/*`). Surfaced so the UI can show them but
/// refuse to edit or delete; the backend also refuses such writes.
pub read_only: bool,
}
#[derive(Debug, Clone, Serialize)]