Skip to content

Conversation

@xl-openai
Copy link
Collaborator

  1. Remove PUBLIC skills and introduce SYSTEM skills embedded in the binary and installed into $CODEX_HOME/skills/.system at startup.
  2. Skills are now always enabled (feature flag removed).
  3. Update skills/list to accept forceReload and plumb it through (not used by clients yet).

fs::create_dir_all(&skill_dir).unwrap();
fs::write(skill_dir.join("SKILL.md"), "not yaml").unwrap();
});
let mut builder = test_codex().with_pre_build_hook(|home| {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make a helper and have an integration test for system skills? Maybe we can also test the priorities (system, user, repo)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a list_skills_includes_system_cache_entries one :)

use std::path::Path;
use std::path::PathBuf;
use std::time::SystemTime;
use std::time::UNIX_EPOCH;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use AbsolutePathBuf

Ok(())
}

fn write_embedded_dir(dir: &Dir<'_>, dest: &Path) -> Result<(), SystemSkillsError> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's have docstrings for the helper functions here. a bit hard to digest

}

write_embedded_dir(&SYSTEM_SKILLS_DIR, &staged_system)?;
atomic_swap_dir(&staged_system, &dest_system, &skills_root_dir)?;
Copy link
Collaborator

@aibrahim-oai aibrahim-oai Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need that for writing few .md files?

impl SkillsManager {
pub fn new(codex_home: PathBuf) -> Self {
let (skills_update_tx, _skills_update_rx) = broadcast::channel(1);
if let Err(err) = install_system_skills(&codex_home) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not blocking: we can leave a marker of the cli version or skills hash so we don't repeat this on startup every time. but I think it's not needed now it's few files.

@@ -0,0 +1,95 @@
#!/usr/bin/env python3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file and the above file both have the same name but the content is different though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@xl-openai xl-openai force-pushed the xl/skills branch 2 times, most recently from 081956f to 16b6725 Compare December 18, 2025 02:26
@xl-openai
Copy link
Collaborator Author

@codex review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +88 to +92
let mut items: Vec<(String, Option<u64>)> = SYSTEM_SKILLS_DIR
.entries()
.iter()
.map(|entry| match entry {
include_dir::DirEntry::Dir(dir) => (dir.path().to_string_lossy().to_string(), None),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include nested system skill contents in fingerprint

The fingerprint used to decide whether to reinstall embedded system skills only iterates SYSTEM_SKILLS_DIR.entries() and hashes directory entries as (path, None). The embedded skills live under subdirectories (e.g., plan/ and skill-creator/), so changes to their SKILL.md contents won’t affect the fingerprint. That means an upgraded binary with updated system skill content will keep the stale on-disk cache because the marker still matches, and install_system_skills will early-return. Consider hashing files recursively (e.g., using Dir::files() or recursing like write_embedded_dir) so any content changes update the marker and trigger a refresh.

Useful? React with 👍 / 👎.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is OK for now.

@xl-openai xl-openai merged commit da3869e into main Dec 18, 2025
26 checks passed
@xl-openai xl-openai deleted the xl/skills branch December 18, 2025 02:48
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants