You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maxPages global variable in cli/src/internal/cmd/root.go is never registered as a Cobra persistent flag (--max-pages), so Config.MaxPages is always 0 (Go zero value) instead of the intended default of 100 defined in config.Defaults(). With --paginate enabled, this means the page cap is silently 0, potentially allowing unbounded page traversal depending on how the underlying httpclient handles a zero MaxPages value. Fix: add rootCmd.PersistentFlags().IntVar(&maxPages, "max-pages", 100, "Maximum pages to fetch when paginating") in NewRootCmd().
service.Execute() in cli/src/internal/service/service.go (line 152) creates a new HTTP client (s.httpClientFactory(...)) on every invocation, bypassing connection pool reuse across calls. The MCP path correctly caches the HTTP client via getOrCreateHTTPClient(). For the CLI path, consider caching or reusing the client (e.g. store it on RequestService) to benefit from keep-alive connections when multiple requests are issued in scripts/pipelines.
skills.InstallSkill() is called unconditionally on every command invocation via PersistentPreRunE in cli/src/internal/cmd/root.go. If the underlying install writes a file on each call, this adds unnecessary disk I/O overhead. Fix: add a version-gated check inside InstallSkill() (or before calling it) to skip the write when the installed version already matches the current version.
performance check
maxPagesglobal variable incli/src/internal/cmd/root.gois never registered as a Cobra persistent flag (--max-pages), soConfig.MaxPagesis always 0 (Go zero value) instead of the intended default of 100 defined inconfig.Defaults(). With--paginateenabled, this means the page cap is silently 0, potentially allowing unbounded page traversal depending on how the underlying httpclient handles a zero MaxPages value. Fix: addrootCmd.PersistentFlags().IntVar(&maxPages, "max-pages", 100, "Maximum pages to fetch when paginating")inNewRootCmd().service.Execute()incli/src/internal/service/service.go(line 152) creates a new HTTP client (s.httpClientFactory(...)) on every invocation, bypassing connection pool reuse across calls. The MCP path correctly caches the HTTP client viagetOrCreateHTTPClient(). For the CLI path, consider caching or reusing the client (e.g. store it onRequestService) to benefit from keep-alive connections when multiple requests are issued in scripts/pipelines.skills.InstallSkill()is called unconditionally on every command invocation viaPersistentPreRunEincli/src/internal/cmd/root.go. If the underlying install writes a file on each call, this adds unnecessary disk I/O overhead. Fix: add a version-gated check insideInstallSkill()(or before calling it) to skip the write when the installed version already matches the current version.Automated analysis - 3 finding(s)