Skip to content

Conversation

@breath57
Copy link

Description

This PR adds the skills delete command and improves the help information for the skills management CLI.

Changes

1. New skills delete command

Added a new subcommand to delete skills:

# Delete a user-level skill
deepagents skills delete my-skill

# Delete skill for a specific agent
deepagents skills delete my-skill --agent mybot

# Delete a project-level skill
deepagents skills delete my-skill --project

# Force delete (skip confirmation)
deepagents skills delete my-skill --force

Features:

  • Shows file count before deletion
  • Interactive confirmation prompt (can be skipped with --force)
  • Supports --agent and --project options

2. Improved help information

Enhanced the deepagents skills help output to include:

  • All available commands (including the new delete command)
  • Common options section explaining --agent and --project
  • More comprehensive examples
  • Skill locations section showing storage paths

Before:

Available commands:
  list              List all available skills
  create <name>     Create a new skill
  info <name>       Show detailed information about a skill

After:

Available commands:
  list              List all available skills
  create <name>     Create a new skill
  info <name>       Show detailed information about a skill
  delete <name>     Delete a skill

Common options:
  --agent <name>    Specify agent identifier (default: agent)
  --project         Use project-level skills instead of user-level

Skill locations:
  User skills:      ~/.deepagents/<agent>/skills/
  Project skills:   <project>/.deepagents/skills/

Testing

Added 11 new test cases in tests/unit_tests/skills/test_commands.py:

  • test_delete_existing_skill_with_force
  • test_delete_nonexistent_skill
  • test_delete_with_confirmation_yes
  • test_delete_with_confirmation_no
  • test_delete_with_confirmation_empty_input
  • test_delete_with_keyboard_interrupt
  • test_delete_invalid_skill_name
  • test_delete_project_skill
  • test_delete_project_skill_not_in_project
  • test_delete_skill_with_supporting_files
  • test_delete_skill_for_specific_agent

All tests pass

Checklist

  • Unit tests added
  • Code follows existing patterns
  • Security validations included (name validation, path traversal prevention)
  • Backwards compatible (no breaking changes)

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