Skip to content

Conversation

@5angar1us
Copy link

@5angar1us 5angar1us commented Jan 9, 2026

Summary: Enhanced existing remove and manage commands with safer deletion behavior using system trash/recycle bin as default instead of permanent deletion.

What: Added safe deletion support to remove and manage commands using system trash/recycle bin as default, with --force flag for permanent deletion.

Why:

  • I deleted my local skills and the only thing that saved me was that I had backups. This change adds a safety layer to prevent accidental loss of skills.

Implementation:

  • Added safeDelete() function in src/utils/trash.ts using trash package for cross-platform support
  • Added --force flag to both manage and remove commands for permanent deletion
  • Extended DeleteOptions interface with permanent?: boolean field
  • Updated CLI interface to handle the --force option
  • Uses the trash package to move to the trash by default
  • Updated README.md to reflect new functionality and usage

Testing:

  • All existing tests pass (11/11)
  • Added 5 comprehensive tests for safeDelete function
  • Total: 16/16 tests passing
  • Cross-platform testing with platform-aware test paths
  • Tests verify logic, not platform-specific behavior

An important note from the author of trash:

  • The Linux implementation is not very good and not maintained. Help welcome. If no one steps up to help maintain it, I will eventually remove Linux support.
    From the project's Readme

Usage:

# Interactive management (uses trash by default)
openskills manage

# Interactive management with permanent deletion
openskills manage --force

# Non-interactive removal (uses trash by default)
openskills remove my-skill

# Non-interactive permanent deletion
openskills remove my-skill --force

@5angar1us 5angar1us changed the title Safe Deletion with Trash/Recycle Bin Support feat: implement safe deletion with trash/recycle bin suppor Jan 9, 2026
@5angar1us 5angar1us force-pushed the safer-deletion-behavior branch from 191e9a4 to 87c4e5d Compare January 22, 2026 14:41
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.

1 participant