Repository navigation
Conversation
Each LLM call with claude_cli starts a separate `claude -p` session. A user scanning 15 skills (five scans in parallel) started 434 sessions in about 6 minutes and used 98% of their 5-hour plan window, at roughly 34k tokens of startup context per session. - claude argv: add `--tools ""` so built-in tool schemas are not sent (`--allowed-tools ""` only denies use), replace the default agent system prompt with a short fixed one, and pass `--no-session-persistence` so calls stop leaving one ~/.claude/projects folder each. - Default LLM fan-out to 2 for CLI providers when SKILLSPECTOR_MAX_LLM_CONCURRENCY is unset (HTTP providers keep 10). - Warn once per process when a CLI provider is available that every LLM call is a separate session on the user's plan, and point to --no-llm. - skill-inspector: keep --no-llm unless the user asks, never pick a provider on the agent's own, and don't run CLI-provider scans in parallel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A user on r/ClaudeAI (thread) asked Claude Code to scan their 15 skills with SkillSpector. The agent picked
claude_clion its own and ran five scans in parallel. Because every LLM call starts a separateclaude -psession, that came to 434 sessions in about 6 minutes, 22.4M tokens (about 34k of startup context per session, on Opus), and 98% of their 5-hour plan window. It also left 1,144 folders in~/.claude/projects.#298 (for #295) already keeps MCP servers, hooks, and settings out of the child. Three costs were still left: the built-in tool schemas, Claude Code's default agent system prompt, and a persisted transcript for every call.
Changes
--tools "", so the built-in tool definitions are no longer sent.--allowed-tools ""only blocks tool use (CLI reference). Also replace the default system prompt with a short fixed one via--system-prompt; the analyzer instructions still arrive on stdin.--no-session-persistence. Each call runs in a fresh temp cwd, so before this change every call left its own project folder.SKILLSPECTOR_MAX_LLM_CONCURRENCYis unset and the active provider is a CLI provider, the default is now 2 instead of 10. Once per process, when a CLI provider is available, SkillSpector warns that every LLM call is a separate session on the user's plan and points to--no-llm.--no-llmunless the user asks for LLM analysis. Never choose or changeSKILLSPECTOR_PROVIDERwithout asking. Don't run CLI-provider scans in parallel.Not in this PR
Testing
uv run python -m pytest tests/unit/test_agent_cli.py tests/unit/test_providers.py tests/nodes/test_llm_analyzer_base.py: 539 passed, 10 skipped. New tests cover the argv flags, the CLI concurrency default (and that an explicit value still wins), and the warn-once behaviour.ruff checkandruff format --checkare clean.claudebinary. Before merge, a maintainer withclaudeinstalled should run oneSKILLSPECTOR_PROVIDER=claude_cliscan to confirm that auth still works and the output parses. Olderclaudebuilds that lack--toolsor--no-session-persistencewill fail closed with a non-zero exit.🤖 Generated with Claude Code