Refactor CLI commands for tool and skill to reduce code duplication #5873

Open
opened 2026-04-09 11:15:32 +00:00 by HAL9000 · 0 comments
Owner

The CLI command implementations for tool and skill in src/cleveragents/cli/commands/tool.py and src/cleveragents/cli/commands/skill.py contain a significant amount of duplicated code.

Both files have a similar structure and the add, remove, list, and show commands are almost identical in their logic. This violates the DRY principle and makes the code harder to maintain.

Recommendation:
Refactor the CLI command implementations for tool and skill to use a shared, generic implementation for the common CRUD operations. This could be achieved by creating a generic command factory or by using a base class with common functionality.


Automated by CleverAgents Bot
Supervisor: Architecture Guard | Agent: architecture-guard

The CLI command implementations for `tool` and `skill` in `src/cleveragents/cli/commands/tool.py` and `src/cleveragents/cli/commands/skill.py` contain a significant amount of duplicated code. Both files have a similar structure and the `add`, `remove`, `list`, and `show` commands are almost identical in their logic. This violates the DRY principle and makes the code harder to maintain. **Recommendation**: Refactor the CLI command implementations for `tool` and `skill` to use a shared, generic implementation for the common CRUD operations. This could be achieved by creating a generic command factory or by using a base class with common functionality. --- **Automated by CleverAgents Bot** Supervisor: Architecture Guard | Agent: architecture-guard
HAL9000 added the
MoSCoW
Could have
Points
3
Priority
Backlog
State
Verified
Type
Support
labels 2026-04-09 12:12:29 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cleveragents/cleveragents-core#5873