Repository navigation
Conversation
|
Thanks for digging into this — the duplicate entries in Codex are a real problem. After checking Codex's docs and source, I think the cause is on our side rather than something to clean up after the fact:
So I've changed the built-in If you're hitting this today, the fix is to drop the skillshare target remove codex --dry-run # preview
skillshare target remove codex
skillshare sync
Because of that I'd rather not add a Codex-specific dedup command: it depends on Codex's app-server, so it can't cover other tools with overlapping paths, and it treats the symptom while the default config keeps producing it. I'll leave this PR open for reference until the path change is released, then close it. Thanks again for the detailed write-up. |
Type
Problem and resulting behavior
Codex can discover the same skill through multiple synced roots and nested reference copies, even when each Skillshare target is healthy. Add an explicit repair command that operates on Codex's actual catalog without changing ordinary sync behavior:
The command starts the installed
codex app-serverand uses catalog/config methods only; it does not start a model thread or turn. It compares complete same-name user skill folders, including supporting files, invocation metadata, empty directories, and executable bits. It prefers the shared source, then the shallower path, then lexical order. An entire group is left for manual review if variants differ or include plugin/repository/system entries, internal symlinks/special files, or parent-relative Markdown references.On apply, it rechecks the preview, saves a private config backup, writes per-path disables through Codex's native API, and verifies expected enabled states, including unaffected entries. Repeating a successful repair is a no-op. Skill files and Skillshare sync settings are preserved. JSON errors include acknowledged writes and verification state; partial failures do not blindly restore an entire config over concurrent edits.
Linked issue and scope
Refs #135; reproduction and design discussion.
This is runnable reference code for maintainer discussion, not a request to silently enable deduplication during sync. It does not implement adopt, resolve conflicting variants, manage plugin catalogs, or guarantee that the remaining description catalog fits Codex's context budget. Overrides are path-specific; installations that introduce new paths require a fresh preview. Existing Codex sessions may need a restart.
Validation
make checkpassed on macOS, plus focused checks after the final folder-fingerprint adjustment:go test -race ./internal/codexskillsSKILLSHARE_TEST_BINARY=.../bin/skillshare go test -race ./tests/integration -run '^TestDedup' -count=1--apply, observed one acknowledged disable and successful native catalog verification, then confirmed a repeated apply wrote nothing. The original 83 disabled paths were restored and unrelated settings were unchanged. Codex's native API normalizes default-enabled overrides, so config array order can change.git diff --checkpassed.Diff accounting: production +520/-1; tests +549/-0; docs +93/-0. No new dependencies.
Checklist