From d966775885ed25c12dad030e6519f7256cef4865 Mon Sep 17 00:00:00 2001 From: alex-clawd Date: Tue, 19 May 2026 15:46:03 -0700 Subject: [PATCH] refactor: add _print_current_organization to SkillCommand (matches ToolCommand pattern) --- lib/cli/src/crewai_cli/skills/main.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/cli/src/crewai_cli/skills/main.py b/lib/cli/src/crewai_cli/skills/main.py index 4130ba102..dace5ad8e 100644 --- a/lib/cli/src/crewai_cli/skills/main.py +++ b/lib/cli/src/crewai_cli/skills/main.py @@ -105,6 +105,7 @@ class SkillCommand(BaseCommand, PlusAPIMixin): ) raise SystemExit(1) + self._print_current_organization() console.print(f"[bold blue]Downloading skill {ref}...[/bold blue]") get_response = self.plus_api_client.get_skill(org, name) @@ -196,6 +197,7 @@ class SkillCommand(BaseCommand, PlusAPIMixin): ) raise SystemExit(1) + self._print_current_organization() console.print( f"[bold blue]Publishing skill [bold]{name}[/bold] v{version} to {effective_org}...[/bold blue]" ) @@ -277,6 +279,20 @@ class SkillCommand(BaseCommand, PlusAPIMixin): # internal helpers # ------------------------------------------------------------------ + def _print_current_organization(self) -> None: + settings = Settings() + if settings.org_uuid: + console.print( + f"Current organization: {settings.org_name} ({settings.org_uuid})", + style="bold blue", + ) + else: + console.print( + "No organization currently set. We recommend setting one before using: " + "`crewai org switch ` command.", + style="yellow", + ) + def _unpack_archive(self, archive_bytes: bytes, dest: Path) -> None: """Unpack a .tar.gz or .zip archive into dest.""" # Try tar first, then zip