Skip to content

Feature: --exclude-codex flag or exclusive --root mode for OpenCode-first users #17

Description

@its-How

Thanks for skill-cleaner — it's a well-designed read-only diagnostic for Codex skill inventories, and the budget calculation (mirroring core-skills/src/render.rs 2% rule) is genuinely useful.

I'd like to request a feature that would extend its usefulness to OpenCode-first users.

Context

I maintain a multi-runtime setup where OpenCode is the primary runtime and Codex is secondary. My OpenCode skills live in ~/.agents/skills/ and my Codex skills in ~/.codex/skills/. I wanted to use skill-cleaner to audit ONLY my OpenCode skills, but discovered that --root is additive, not replacement.

Evidence

Looking at skills/skill-cleaner/scripts/skill-cleaner.ts, the discoverRoots() function (line 507) always appends the default Codex paths in addition to any --root arguments:

  • path.join(home, ".codex/skills") (line 510)
  • path.join(home, ".codex/plugins/cache") (line 511)
  • path.join(home, "Projects/agent-scripts/skills") (line 512)
  • ...extraRoots.map(expandHome) (line 513, the --root args)

There's no flag to disable the default ~/.codex/ scan. --root ADDS paths but does not REPLACE them.

I tested this with --root <temp-opencode-root> --no-live --no-logs. The report enumerated 59 skills: 4 from my temp OpenCode root + 55 from my real ~/.codex/skills/ and ~/.codex/plugins/cache/. For an OpenCode-first user, the 55 Codex skills are noise that can't be filtered out.

Proposed fix

Either of these would resolve it:

  1. --exclude-codex flag: skips the default ~/.codex/skills/ and ~/.codex/plugins/cache/ scans, using only --root paths.
  2. Exclusive --root mode: when --root is specified, it replaces default paths instead of appending. (Possibly behind a --root-only flag to preserve current behavior for existing users.)

Option 1 is probably safer for backward compatibility.

Use case

OpenCode-first users (and users who want to audit an isolated skill set without their full Codex installation mixed in) would benefit. Currently the tool is Codex-only in practice, despite --root suggesting otherwise.

What I'm not asking for

  • Not asking for OpenCode-specific path awareness (the tool can stay runtime-neutral for --root paths)
  • Not asking for OpenCode budget calculation (Codex's 2% rule is Codex-specific; OpenCode users just want the inventory/duplicate/unused features)

Happy to draft a PR if this feature request is welcome. Thanks for considering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions