Skip to content

Conversation

@xl-openai
Copy link
Collaborator

  1. Adds SkillScope::Public end-to-end (core + protocol) and loads skills from the public cache directory
  2. Improves repo skill discovery by searching upward for the nearest .codex/skills within a git repo
  3. Deduplicates skills by name with deterministic ordering to avoid duplicates across sources
  4. Fixes garbled “Skill errors” overlay rendering by preventing pending history lines from being injected during the modal
  5. Updates the project docs “Skills” intro wording to avoid hardcoded paths

Ok(())
}

fn clone_repo_blocking(repo_url: &str, checkout_dir: &Path) -> anyhow::Result<()> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We try not to use anyhow inside core and use specific enums for error types.

.map(|entry| (entry.skills.clone(), entry.errors.clone()))
.unwrap_or_default();

assert!(
Copy link
Collaborator

@pakrym-oai pakrym-oai Dec 16, 2025

Choose a reason for hiding this comment

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

Can we add tests for the new public skills feature?

}

let staged_skills = tmp_dir.join(SKILLS_DIR_NAME);
copy_dir_recursive(&src_skills, &staged_skills)?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are we making an intermediate copy and not moving the directory from the temp checkout directly to the target location?

});
} else {
let (sender, receiver) = mpsc::channel();
std::thread::spawn(move || {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are we spawning if we will block on it anyways? how about converting skills_for_cwd to async and just awaiting?

Copy link
Collaborator Author

@xl-openai xl-openai Dec 17, 2025

Choose a reason for hiding this comment

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

Now I make refresh_public_skills_blocking unblocking and rely on event to re-sync later.

@xl-openai xl-openai force-pushed the xl/skills branch 2 times, most recently from 22047ff to 895bce6 Compare December 17, 2025 03:42
@xl-openai
Copy link
Collaborator Author

@codex review again

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 10 to 11
// TODO: Temporary test repo. Revert to `https://github.com/openai/skills.git`.
const PUBLIC_SKILLS_REPO_URL: &str = "https://github.com/xl-openai/test.git";
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 Point public skills refresh at production repo

The public skills refresher is hardcoded to clone a temporary test repo, so in normal runs users will fetch the wrong skill set (or nothing if that repo disappears). This means public skill discovery will silently diverge from the intended production source until the constant is corrected or made configurable.

Useful? React with 👍 / 👎.

Comment on lines 62 to 66
if outcome.updated()
&& let Ok(mut listeners) = skills_update_listeners.lock()
{
listeners.retain(|tx| {
tx.try_send(Event {
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 Avoid missing public-skill refresh updates

The refresh thread only notifies listeners present at the moment it finishes, and attempted_public_refresh prevents any retry. If the refresh completes before any listener registers (e.g., early startup), the cache remains populated with pre-refresh skills and later ListSkills calls will keep returning stale results unless a manual force_reload is sent. Consider recording a pending update or invalidating the cache when refresh completes so late listeners can trigger a reload.

Useful? React with 👍 / 👎.

@xl-openai xl-openai force-pushed the xl/skills branch 2 times, most recently from bfb03a7 to 4bd7739 Compare December 17, 2025 04:21
let skill_dir = home
.join("skills")
.join(".public")
.join("skills")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why skills twice? Namespacing public skills inside a .public folder makes sense. We can just put the skills inside that.

codex_home,
cache_by_cwd: RwLock::new(HashMap::new()),
attempted_public_refresh: AtomicBool::new(false),
skills_update_listeners: Arc::new(Mutex::new(Vec::new())),
Copy link
Collaborator

Choose a reason for hiding this comment

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

This vector of listeners feels complicated. We would also lost the operation id. Cannot we have the tokio spawn in core and use send_event?

@pakrym-oai what do you think?

@xl-openai xl-openai merged commit 4897efc into main Dec 17, 2025
26 checks passed
@xl-openai xl-openai deleted the xl/skills branch December 17, 2025 09:35
@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 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.

5 participants