Skip to content

Install Codex skills only to .agents/skills; stop duplicating them in ~/.codex/skills - #98

Merged
datacas merged 1 commit into
mainfrom
issue-78-codex-agents-skills-only
Sep 25, 2026
Merged

datacas merged 1 commit into
mainfrom
issue-78-codex-agents-skills-only

Conversation

@datacas

@datacas datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Closes #78

Work item: #78

What changed

  • Installers (install.sh, install.ps1): a Codex install writes the skills to .agents/skills only, in both scopes. The .codex/skills copy is gone.
  • Cleanup of earlier versions (global Codex install): for each of this toolkit's skill names found in ~/.codex/skills:
    • without --force/-Force: a warning names the duplicates and gives the removal command; nothing is removed;
    • with --force/-Force (always passed by get.sh/get.ps1): they are removed.
      Other directories are never touched. Links are refused, not followed: a linked ~/.codex, ~/.codex/skills (e.g. pointing to ~/.agents/skills, which would otherwise delete the fresh copy) or linked skill entry is left alone with a warning. The refusal is a warning rather than a failure because the installation itself is already complete.
  • Docs: docs/getting-started.md destination table (Codex → ~/.agents/skills/) plus an installer-behaviour note; a short note in the README install section.
  • Changelog: [Unreleased] entry telling existing users to remove ~/.codex/skills/cc-* or rerun with --force.

Tests

  • New tests/test_install_codex.py (Bash installer, HOME redirected): installs to .agents and not .codex; with --force cc-verify is removed from .codex/skills, other-skill is kept and cc-verify exists in .agents/skills; without --force a warning is printed and nothing is removed; linked legacy directory and linked skill entry are left alone.
  • validate.yml: new steps for Bash and PowerShell that pre-create ~/.codex/skills/cc-verify and other-skill, check the warning without force, then assert every expected skill is in ~/.agents/skills and not in ~/.codex/skills, and that other-skill survives.

Local verification:

  • python3 scripts/validate-package.py → VALID
  • python3 -m unittest discover -s tests → 710 tests OK
  • bash -n scripts/install.sh, sh -n scripts/get.sh → OK

Not run locally: shellcheck and PowerShell (pwsh not installed); both run in CI.

Current Codex reads both ~/.agents/skills and ~/.codex/skills, so the
global install listed every cc-* skill twice. The installers now write to
.agents/skills alone and, on a global Codex install, handle this
toolkit's earlier copies in ~/.codex/skills: without --force they are
named with the command to remove them; with --force (always passed by
get.sh/get.ps1) they are removed. Other skills and links are left alone.

Closes #78
@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20260925-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

Review summary

The change matches issue #78: global Codex installs now use .agents/skills, and legacy cleanup, documentation, and coverage were added for Bash and PowerShell. The accumulated diff from d30a6ef3a774dd9521b0af2d82769a4b887a656d to 84e28393be336d40b8a2e55154a8f3e676ed24a2 covers seven files: both installers, the installer tests, the validation workflow, the README, getting-started documentation, and the changelog.

Findings

[REV-001] · low · open · - · blocks:no — Forced cleanup can delete customized same-name skills

Path: scripts/install.sh, line 153 (also scripts/install.ps1, line 89)

When --force is used, the installers identify legacy entries as toolkit-owned by directory name alone, then recursively remove them. If a user has a customized or independently created skill with the same name as a bundled toolkit skill, the forced cleanup can delete it. The get.sh and get.ps1 wrappers pass force automatically. Consider verifying installed contents or provenance before deletion, or warn and require a separate cleanup choice when a matching entry differs from the expected copy.

Security triage

No security_review.always_when rule is configured and the PR has no labels. Reviewer judgment triggered the security audit because the change adds recursive filesystem cleanup and symlink/reparse-point handling. The audit found no confirmed vulnerability; the potential data-loss risk above remains.

Verification

  • python3 -m unittest tests.test_install_codex -v — 5 tests passed.
  • python3 scripts/validate-package.py — VALID: 14 skills, shared sections synchronized, manifests aligned.
  • python3 -m unittest discover -s tests — 710 tests passed.
  • bash -n scripts/install.sh and sh -n scripts/get.sh — passed.
  • Local ShellCheck and PowerShell execution were unavailable (shellcheck and pwsh are not installed).
  • No application runtime, database, service, port, or migration preflight applies to this installer-only change.

CI

All reported checks passed on the reviewed PR head: Skills, manifests, and Bash installer (2 runs) and PowerShell installer (2 runs). No pending, failed, cancelled, or skipped checks were reported.

Residual risk

ShellCheck and PowerShell were not run locally; CI passed the Bash installer job (including ShellCheck) and both PowerShell installer runs. The review and security audit found no other actionable issues.

Verdict

APPROVED — the only open finding is low severity and does not block approval.

@datacas
datacas merged commit 18bcc86 into main Sep 25, 2026
4 checks passed
@datacas
datacas deleted the issue-78-codex-agents-skills-only branch October 6, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install Codex skills only to .agents/skills; stop duplicating them in ~/.codex/skills

1 participant