### ZAI CLI Search Example Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/AGENTS.md Demonstrates how to use the ZAI CLI to search for information. This example searches for 'React 19 new features' and limits the results to 5. ```bash npx zai-cli search "React 19 new features" --count 5 ``` -------------------------------- ### ZAI CLI Vision Example Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/AGENTS.md Illustrates the use of the ZAI CLI's vision capabilities to analyze an image. This example analyzes a screenshot and asks a specific question about it. ```bash npx zai-cli vision analyze ./screenshot.png "What errors?" ``` -------------------------------- ### ZAI CLI Repository Search Example Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/AGENTS.md Demonstrates how to use the ZAI CLI to search within a GitHub repository. This example searches the 'facebook/react' repository for mentions of 'server components'. ```bash npx zai-cli repo search facebook/react "server components" ``` -------------------------------- ### Implement a Feature - Research, Plan, and Implement Orchestration Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/examples.md This example illustrates orchestrating feature implementation, starting with research to understand existing patterns, followed by planning and phased implementation. It uses a combination of 'Explore', 'Plan', and 'general-purpose' agents with 'haiku', 'opus', and 'sonnet' models to manage context gathering, design decisions, and step-by-step coding. ```python # Phase 1: Research (haiku for exploration) context = Task(subagent_type="Explore", description="Find styling patterns", prompt="Find existing theme/styling patterns, CSS architecture", model="haiku", run_in_background=True) # Phase 2: Plan (opus for design decisions) plan = Task(subagent_type="Plan", description="Design dark mode", prompt=f"Given: {context}. Design dark mode implementation.", model="opus", run_in_background=True) # Phase 3: Implement (sonnet for well-structured work - single message) Task(subagent_type="general-purpose", description="Add CSS variables", prompt="Add dark theme CSS variables...", model="sonnet", run_in_background=True) Task(subagent_type="general-purpose", description="Create toggle", prompt="Create theme toggle component...", model="sonnet", run_in_background=True) Task(subagent_type="general-purpose", description="Add persistence", prompt="Add localStorage persistence for theme preference...", model="sonnet", run_in_background=True) # Phase 4: Integration (sonnet for implementation) Task(subagent_type="general-purpose", description="Wire and test", prompt="Wire components together, test theme switching works", model="sonnet", run_in_background=True) ``` -------------------------------- ### Python Task Creation Example with Worker Prompt Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/SKILL.md An example demonstrating how to instantiate a Task in Python, incorporating the worker agent prompt template. This snippet shows the structure for defining a task, its description, the detailed prompt including the preamble, and whether it should run in the background. ```python Task( subagent_type="general-purpose", description="Implement auth routes", prompt="""CONTEXT: You are a WORKER agent, not an orchestrator. RULES: - Complete ONLY the task described below - Use tools directly (Read, Write, Edit, Bash, etc.) - Do NOT spawn sub-agents - Do NOT call TaskCreate or TaskUpdate - Report your results with absolute file paths TASK: Create src/routes/auth.ts with: - POST /login - verify credentials, return JWT - POST /signup - create user, hash password - Use bcrypt for hashing, jsonwebtoken for tokens - Follow existing patterns in src/routes/ """, run_in_background=True ) ``` -------------------------------- ### Spawn Background Agent for Database Setup Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/tools.md Spawns a background agent to perform the database setup. It specifies the agent type, a detailed description, the prompt for the agent, the model to use, and ensures it runs in the background. ```plaintext Task( subagent_type="general-purpose", description="Setup database", prompt="Create SQLite database with users table...", model="sonnet", run_in_background=True ) ``` -------------------------------- ### Manage claude-sneakpeek installations Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/README.md Provides commands to manage the installation of claude-sneakpeek. This includes installing, updating, and uninstalling specific instances, identified by a given name. ```bash npx @realmikekelly/claude-sneakpeek quick --name claudesp # Install npx @realmikekelly/claude-sneakpeek update claudesp # Update npx @realmikekelly/claude-sneakpeek remove claudesp # Uninstall ``` -------------------------------- ### Install claude-sneakpeek Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/README.md Installs a parallel build of Claude Code with feature-flagged capabilities. This command sets up an isolated instance of Claude Code, leaving your existing installation untouched. Ensure ~/.local/bin is in your PATH for the wrapper script to function. ```bash npx @realmikekelly/claude-sneakpeek quick --name claudesp ``` -------------------------------- ### ZAI CLI Read Example Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/AGENTS.md Shows how to use the ZAI CLI to read content from a given URL. This command is useful for extracting information from web pages. ```bash npx zai-cli read https://docs.example.com/api ``` -------------------------------- ### Python Task Creation Example with Model Selection Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/SKILL.md Illustrates how to specify the Claude model for a Task in Python, based on the model selection guidelines. This example shows spawning 'haiku' models for exploration tasks, highlighting the `model` parameter within the Task instantiation. ```python # Gather info - spawn haiku wildly Task(subagent_type="Explore", description="Find auth files", prompt="...", model="haiku", run_in_background=True) Task(subagent_type="Explore", description="Find user routes", prompt="...", model="haiku", run_in_background=True) Task(subagent_type="Explore", description="Find middleware", prompt="...", model="haiku", run_in_background=True) ``` -------------------------------- ### Python AskUserQuestion Example for Feature Scoping Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/SKILL.md Demonstrates how to use the AskUserQuestion function in Python to define a set of questions for gathering detailed feature requirements. It includes examples of scope, priority, and constraints with rich descriptions for each option. ```python AskUserQuestion(questions=[ { "question": "What's the scope you're envisioning?", "header": "Scope", "options": [ { "label": "Production-ready (Recommended)", "description": "Full implementation with comprehensive tests, proper error handling, input validation, logging, and documentation. Ready to ship to real users. This takes longer but you won't have to revisit it." }, { "label": "Functional MVP", "description": "Core feature working end-to-end with basic error handling. Good enough to demo or get user feedback. Expect to iterate and polish before production." }, { "label": "Prototype/spike", "description": "Quick exploration to prove feasibility or test an approach. Code quality doesn't matter - this is throwaway. Useful when you're not sure if something is even possible." }, { "label": "Just the design", "description": "Architecture, data models, API contracts, and implementation plan only. No code yet. Good when you want to think through the approach before committing, or need to align with others first." } ], "multiSelect": False }, { "question": "What matters most for this feature?", "header": "Priority", "options": [ { "label": "User experience", "description": "Smooth, intuitive, delightful to use. Loading states, animations, helpful error messages, accessibility. The kind of polish that makes users love your product." }, { "label": "Performance", "description": "Fast response times, efficient queries, minimal bundle size, smart caching. Important for high-traffic features or when dealing with large datasets." }, { "label": "Maintainability", "description": "Clean, well-organized code that's easy to understand and extend. Good abstractions, clear naming, comprehensive tests. Pays off when the feature evolves." }, { "label": "Ship speed", "description": "Get it working and deployed ASAP. Trade-offs are acceptable. Useful for time-sensitive features, experiments, or when you need to learn from real usage quickly." } ], "multiSelect": True }, { "question": "Any technical constraints I should know?", "header": "Constraints", "options": [ { "label": "Match existing patterns", "description": "Follow the conventions, libraries, and architectural patterns already established in this codebase. Consistency matters more than 'best practice' in isolation." }, { "label": "Specific tech required", "description": "You have specific libraries, frameworks, or approaches in mind that I should use. Tell me what they are and I'll build around them." }, { "label": "Backward compatibility", "description": "Existing code, APIs, or data formats must continue to work. No breaking changes. This may require migration strategies or compatibility layers." }, { "label": "No constraints", "description": "I'm free to choose the best tools and approaches for the job. I'll pick modern, well-supported options that fit the problem well." } ], "multiSelect": True }, { "question": "How should I handle edge cases?", ``` -------------------------------- ### Review a PR - Fan-Out and Map-Reduce Orchestration Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/examples.md This example demonstrates orchestrating a Pull Request review using a fan-out pattern for parallel analysis and a map-reduce pattern for aggregating findings. It utilizes different agent types ('Explore', 'general-purpose') and models ('haiku', 'opus') for specific tasks like gathering context, reviewing code quality, security, and performance. ```python # Phase 1: Gather context + parallel analysis (single message) Task(subagent_type="Explore", description="Get PR context", prompt="Fetch PR #123 details, understand what changed and why", model="haiku", run_in_background=True) Task(subagent_type="general-purpose", description="Review quality", prompt="Review code quality: readability, patterns, maintainability", model="opus", run_in_background=True) # Critical thinking for review Task(subagent_type="general-purpose", description="Review security", prompt="Review security: injection, auth, data exposure risks", model="opus", run_in_background=True) # Security needs judgment Task(subagent_type="general-purpose", description="Review performance", prompt="Review performance: complexity, queries, memory usage", model="opus", run_in_background=True) # Performance analysis ``` -------------------------------- ### Model Selection Guide Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/tools.md A guide to selecting the appropriate Claude model (haiku, sonnet, opus) based on the nature of the task, balancing factors like cost, speed, and required reasoning capabilities. ```APIDOC ## Model Selection ### Description Choosing the right model is crucial for efficiency and effectiveness. This table provides recommendations based on task types. | Task Type | Model | Rationale | | -------------------------------| -------- | ----------------------------------------------- | | Fetch files, grep, find things | `haiku` | Cost-effective for high-volume, parallel tasks. | | Gather info for synthesis | `haiku` | Efficient for data retrieval without judgment. | | Well-structured implementation | `sonnet` | Capable of following clear, structured directions. | | Research, reading docs | `sonnet` | Good for pattern recognition and instruction following. | | Security review | `opus` | Required for critical thinking and judgment. | | Architecture/design decisions | `opus` | Necessary for complex, creative problem-solving. | | Complex debugging | `opus` | Essential for deep reasoning across systems. | ``` -------------------------------- ### List and Get Tasks (Python) Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/tools.md These Python commands demonstrate how to retrieve information about existing tasks. TaskList() provides a summary of all tasks and their statuses, while TaskGet(taskId="1") retrieves the full details for a specific task identified by its ID. These are essential for monitoring and understanding the task landscape. ```python TaskList() # See all tasks with status TaskGet(taskId="1") # Get full details of one task ``` -------------------------------- ### Understand Codebase Structure and Patterns Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/examples.md This snippet outlines a breadth-first approach to understanding a new codebase. It involves parallel exploration of project structure, core patterns, and data flow using a 'haiku' model, followed by aggregation of findings. ```python # Phase 1: Parallel exploration (haiku swarm - single message) Task(subagent_type="Explore", description="Project structure", prompt="Analyze project structure, entry points, build system", model="haiku", run_in_background=True) Task(subagent_type="Explore", description="Core patterns", prompt="Identify core architectural patterns, frameworks used", model="haiku", run_in_background=True) Task(subagent_type="Explore", description="Data flow", prompt="Trace main data flows, API structure, state management", model="haiku", run_in_background=True) ``` -------------------------------- ### Quick Install Claude Code Variant (Bash) Source: https://context7.com/mikekelly/claude-sneakpeek/llms.txt Installs a default Claude Code variant using the 'mirror' provider. It creates an isolated instance with its own configuration and sessions. Ensure ~/.local/bin is added to your PATH to launch the variant. ```bash # Quick install with default provider (mirror - pure Claude) npx @realmikekelly/claude-sneakpeek quick --name claudesp # Add ~/.local/bin to PATH (macOS/Linux) echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc # Launch your variant claudesp ``` -------------------------------- ### Agent Prompt Structure (Five Elements) Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/tools.md Outlines the recommended structure for agent prompts, consisting of five key elements: Preamble, Context, Scope, Constraints, and Output, to guide the agent effectively. ```APIDOC ## Agent Prompt Structure: The Five Elements ### Description Beyond the mandatory preamble, prompts should incorporate five distinct elements to provide comprehensive guidance to the agent. ### Structure ``` ┌─────────────────────────────────────────────────────────────┐ │ 1. PREAMBLE → WORKER context and rules (required!) │ │ 2. CONTEXT → What's the bigger picture? │ │ 3. SCOPE → What exactly should this agent do? │ │ 4. CONSTRAINTS → What rules or patterns to follow? │ │ 5. OUTPUT → What should the agent return? │ └─────────────────────────────────────────────────────────────┘ ``` ### Element Details - **PREAMBLE**: The mandatory WORKER preamble. - **CONTEXT**: Provides background information on the overall goal or situation. - **SCOPE**: Clearly defines the specific actions the agent needs to perform. - **CONSTRAINTS**: Lists any limitations, rules, or formatting requirements. - **OUTPUT**: Specifies the desired format and content of the agent's final result. ``` -------------------------------- ### Bash Shell Wrapper Script Example Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/docs/architecture/overview.md A bash script demonstrating how a Claude Sneakpeek variant is made accessible as a command. It handles displaying splash art, setting the configuration directory, loading environment variables, and executing the main Claude Code CLI. ```bash #!/bin/bash # /zai # Show splash art (if TTY and enabled) if [ -t 1 ] && [ "${CLAUDE_SNEAKPEEK_SPLASH:-1}" != "0" ]; then # ASCII art here... fi # Set Claude Code config directory export CLAUDE_CONFIG_DIR="$HOME/.claude-sneakpeek/zai/config" # Load environment from settings.json # (API keys, base URLs, model mappings) # Run Claude Code exec "$HOME/.claude-sneakpeek/zai/npm/node_modules/.bin/claude" "$@" ``` -------------------------------- ### Reading Agent Results (Python) Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/tools.md Provides Python code examples for retrieving the output of completed agent tasks. It shows two methods: directly reading from the output file using a file path, and using the TaskOutput function with a task ID. ```python Read(file_path="/tmp/claude/.../tasks/abc123.output") TaskOutput(task_id="abc123") ``` -------------------------------- ### Sprint Planning and Task Sequencing Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/domains/project-management.md Provides a Python example for sprint planning, including creating tasks for planning, backlog review, story breakdown, dependency setting, and work assignment. It also shows how to update task dependencies to establish a planning sequence. ```python # Sprint planning example TaskCreate(subject="Sprint 14 Planning", description="Plan next sprint scope...") TaskCreate(subject="Review backlog", description="Prioritize stories...") TaskCreate(subject="Break down Story A", description="Create implementation tasks...") TaskCreate(subject="Break down Story B", description="Create implementation tasks...") TaskCreate(subject="Set dependencies", description="Wire task dependencies...") TaskCreate(subject="Assign work", description="Distribute to team...") # Planning sequence TaskUpdate(taskId="2", addBlockedBy=["1"]) TaskUpdate(taskId="3", addBlockedBy=["2"]) TaskUpdate(taskId="4", addBlockedBy=["2"]) TaskUpdate(taskId="5", addBlockedBy=["3", "4"]) TaskUpdate(taskId="6", addBlockedBy=["5"]) # Parallel breakdown (sonnet for structured planning work) Task(subagent_type="general-purpose", prompt="TaskId 3: Break down Story A...", model="sonnet", run_in_background=True) Task(subagent_type="general-purpose", prompt="TaskId 4: Break down Story B...", model="sonnet", run_in_background=True) ``` -------------------------------- ### Configuring Providers for Claude Sneakpeek CLI Source: https://context7.com/mikekelly/claude-sneakpeek/llms.txt This section explains how to configure different providers for the Claude Sneakpeek CLI, including their specific authentication methods and features. Examples are provided for Mirror, Z.ai, OpenRouter, and CCRouter, demonstrating how to set API keys, base URLs, and authentication tokens. ```bash # Mirror - Pure Claude (no API key needed at create time) npx @realmikekelly/claude-sneakpeek quick --provider mirror --name mclaude # Z.ai - Uses ANTHROPIC_API_KEY or Z_AI_API_KEY export Z_AI_API_KEY="your-key" npx @realmikekelly/claude-sneakpeek quick --provider zai --name zai # OpenRouter - Uses ANTHROPIC_AUTH_TOKEN npx @realmikekelly/claude-sneakpeek quick --provider openrouter \ --api-key "$OPENROUTER_API_KEY" --name openrouter # CCRouter - Local endpoint, no auth required npx @realmikekelly/claude-sneakpeek quick --provider ccrouter \ --base-url "http://127.0.0.1:3456" --name ccrouter ``` -------------------------------- ### View Wrapper Script Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/AGENTS.md Shows the content of the wrapper script, which is essential for running the Claude Sneakpeek application. The path to this script depends on the installation directory and variant. ```bash cat / ``` -------------------------------- ### Python AskUserQuestion Function Example Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/tools.md Demonstrates the usage of the AskUserQuestion function in Python, which is designed to gather detailed information from the user through a series of questions with predefined options. This function is crucial for understanding project scope, priorities, constraints, and edge case handling. ```python AskUserQuestion(questions=[ { "question": "What's the scope you're envisioning?", "header": "Scope", "options": [ {"label": "Production-ready (Recommended)", "description": "Full implementation with tests, error handling, docs"}, {"label": "Functional MVP", "description": "Core feature working, polish later"}, {"label": "Prototype/spike", "description": "Explore feasibility, throwaway code OK"}, {"label": "Just the design", "description": "Architecture and plan only, no code yet"} ], "multiSelect": False }, { "question": "What matters most for this feature?", "header": "Priority", "options": [ {"label": "User experience", "description": "Smooth, intuitive, delightful to use"}, {"label": "Performance", "description": "Fast, efficient, scales well"}, {"label": "Maintainability", "description": "Clean code, easy to extend later"}, {"label": "Ship speed", "description": "Get it working ASAP, refine later"} ], "multiSelect": True }, { "question": "Any technical constraints I should know?", "header": "Constraints", "options": [ {"label": "Must match existing patterns", "description": "Follow conventions already in codebase"}, {"label": "Specific tech/library required", "description": "You have preferences on tools to use"}, {"label": "Backward compatibility", "description": "Can't break existing functionality"}, {"label": "No constraints", "description": "Free to choose the best approach"} ], "multiSelect": True }, { "question": "How should I handle edge cases?", "header": "Edge Cases", "options": [ {"label": "Comprehensive (Recommended)", "description": "Handle all edge cases, defensive coding"}, {"label": "Happy path focus", "description": "Main flow solid, edge cases basic"}, {"label": "Fail fast", "description": "Throw errors early, let caller handle"}, {"label": "Graceful degradation", "description": "Always return something usable"} ], "multiSelect": False } ]) ``` -------------------------------- ### Invoke Skill with Arguments Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/team-pack/skill-tool-override.md This example demonstrates how to invoke a skill with specific arguments. It's crucial to provide the correct skill name and any necessary arguments for the skill to function as intended. This is a common pattern for passing parameters to specialized tools. ```tool_code skill: "commit", args: "-m 'Fix bug'" ``` -------------------------------- ### Configuring OpenRouter Provider for claude-sneakpeek Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/docs/providers.md This example demonstrates using the OpenRouter provider with claude-sneakpeek, which offers access to over 100 models. It requires an API key and allows specifying specific models like 'anthropic/claude-sonnet-4-20250514' for the Sonnet model. ```bash # OpenRouter (100+ models) npx @realmikekelly/claude-sneakpeek quick --provider openrouter --api-key "$OPENROUTER_API_KEY" \ --model-sonnet "anthropic/claude-sonnet-4-20250514" ``` -------------------------------- ### Run Tests and Fix Failures Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/examples.md This snippet describes the process for running a test suite and addressing any failures. It prioritizes running tests in the background, followed by parallel fixing of identified failures, and a final verification run. ```python # Phase 1: Run tests in background (sonnet for test execution) Task(subagent_type="general-purpose", description="Run tests", prompt="Run full test suite, report failures", model="sonnet", run_in_background=True) # Continue with other work or wait result = TaskOutput(task_id="...", block=True) # Phase 2: Fix failures (sonnet for fixes - single message) # If 3 failures found: Task(subagent_type="general-purpose", description="Fix test 1", prompt="Fix failing test in auth.test.ts...", model="sonnet", run_in_background=True) Task(subagent_type="general-purpose", description="Fix test 2", prompt="Fix failing test in api.test.ts...", model="sonnet", run_in_background=True) Task(subagent_type="general-purpose", description="Fix test 3", prompt="Fix failing test in utils.test.ts...", model="sonnet", run_in_background=True) # Phase 3: Verify (sonnet for test execution) Task(subagent_type="general-purpose", description="Re-run tests", prompt="Run test suite again to verify fixes", model="sonnet", run_in_background=True) ``` -------------------------------- ### Invoke Skill with Arguments (PR Review) Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/team-pack/skill-tool-override.md This example demonstrates invoking the 'review-pr' skill with a specific argument, likely a pull request number. This pattern is used for skills that require identifying a particular resource or context to operate on. Proper argument formatting is essential. ```tool_code skill: "review-pr", args: "123" ``` -------------------------------- ### Invoke Skill with Fully Qualified Name Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/team-pack/skill-tool-override.md This example illustrates invoking a skill using its fully qualified name, which includes the namespace. This is useful when there might be naming conflicts or when explicitly specifying the skill's origin. Always ensure the fully qualified name is correct. ```tool_code skill: "ms-office-suite:pdf" ``` -------------------------------- ### Task Creation with Background Agents (Python) Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/tools.md Demonstrates how to correctly instantiate tasks using the Task object, ensuring that background execution is enabled and specifying the model to be used. This is fundamental for asynchronous orchestration. ```python Task(subagent_type="Explore", prompt="...", model="haiku", run_in_background=True) Task(subagent_type="general-purpose", prompt="...", model="sonnet", run_in_background=True) ``` -------------------------------- ### ZAI CLI Help Command Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/AGENTS.md Displays the available commands and their usage for the ZAI CLI. This is the entry point for understanding the capabilities of the ZAI CLI. ```bash # Available commands npx zai-cli --help npx zai-cli vision --help npx zai-cli search --help npx zai-cli read --help npx zai-cli repo --help ``` -------------------------------- ### Get Task Details Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/team-pack/tasklist.md Retrieves the full details of a specific task using its ID. This includes the description, comments, and other relevant information. ```APIDOC ## GET /tasks/{taskId} ### Description Retrieves the complete details for a specific task, identified by its unique ID. This includes the task's description, comments, and all other associated information. ### Method GET ### Endpoint /tasks/{taskId} ### Parameters #### Path Parameters - **taskId** (string) - Required - The unique identifier of the task to retrieve. ### Request Example ```json { "example": "GET /tasks/task_123" } ``` ### Response #### Success Response (200) - **id** (string) - Unique identifier for the task. - **subject** (string) - A brief description of the task. - **description** (string) - A detailed description of the task. - **status** (string) - The current status of the task ('open' or 'resolved'). - **owner** (string) - The agent ID of the assigned owner, or an empty string if unassigned. - **blockedBy** (array) - A list of task IDs that must be resolved before this task can be started. - **comments** (array) - A list of comments associated with the task. #### Response Example ```json { "example": { "id": "task_123", "subject": "Implement user authentication", "description": "Develop and integrate the user authentication module, including login, registration, and password reset functionality.", "status": "open", "owner": "agent_abc", "blockedBy": [], "comments": [ {"author": "agent_abc", "text": "Initial implementation complete. Needs testing.", "timestamp": "2023-10-27T10:00:00Z"} ] } } ``` ``` -------------------------------- ### Configuring MiniMax Provider for claude-sneakpeek Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/docs/providers.md This command illustrates how to set up claude-sneakpeek with the MiniMax provider, using the MiniMax-M2.1 model. An API key is necessary for this configuration. ```bash # MiniMax (MiniMax-M2.1) npx @realmikekelly/claude-sneakpeek quick --provider minimax --api-key "$MINIMAX_API_KEY" ``` -------------------------------- ### List Available Tasks Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/tools.md Retrieves a list of tasks that are ready for execution. This is typically used after dependencies have been met. ```plaintext TaskList() ``` -------------------------------- ### Visual Dependency Graph Output Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/docs/features/team-mode.md Example of the text-based visual output for the 'graph' command, showing task status and hierarchical dependencies. ```text TASK DEPENDENCY GRAPH (mc / my-project) ════════════════════════════════════════════════════════════ Legend: [✓] resolved [○] open [●] blocked [✓] #1: Set up database schema └─ [○] #3: Implement user model └─ [●] #5: Add authentication └─ [●] #8: Implement protected routes [○] #2: Configure test framework Total: 8 | Open: 4 | Ready: 2 | Blocked: 2 ``` -------------------------------- ### Run Claude Sneakpeek Health Check Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/AGENTS.md Executes the `doctor` command provided by the Claude Sneakpeek CLI to perform a health check of the installation and its dependencies. This helps identify and resolve potential issues. ```bash npx claude-sneakpeek doctor ``` -------------------------------- ### Enriched JSON Task Data Structure Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/docs/features/team-mode.md Example of the enriched JSON output provided by the --json flag, including computed fields like 'blocked' and 'summary'. ```json { "variant": "mc", "team": "my-project", "tasks": [ { "id": "1", "subject": "Implement auth", "status": "open", "blocked": true, "blockedBy": [ { "id": "2", "status": "resolved" }, { "id": "3", "status": "open" } ], "openBlockers": ["3"], "blocks": ["4"], "references": [], "comments": [] } ], "summary": { "total": 6, "open": 4, "resolved": 2, "ready": 3, "blocked": 1 } } ``` -------------------------------- ### Best Practices Research Pattern Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/domains/research.md This pattern details how to research and compile best practices for a specific technical area. It involves gathering information from external sources, the codebase, and case studies, then synthesizing it into a guide. ```text User Request: "What are best practices for rate limiting?" Phase 1: FAN-OUT ├─ Agent (WebSearch): Industry rate limiting patterns ├─ Agent (WebSearch): Framework-specific implementations ├─ Explore agent: Current rate limiting in codebase └─ Agent (WebSearch): Case studies and failure modes Phase 2: REDUCE └─ General-purpose agent: Best practices guide with recommendations ``` -------------------------------- ### Create New Variant with ZAI Provider Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/AGENTS.md Initiates the development process for a new variant using the ZAI provider. This command requires specifying the provider, variant name, and API key. ```bash npm run dev -- create --provider zai --name test-zai --api-key ``` -------------------------------- ### Dependency Graph JSON Output Structure Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/docs/features/team-mode.md Example of the JSON output structure for the 'graph --json' command, including nodes, roots, leaves, orphans, and summary information. ```json { "nodes": [...], "roots": ["1"], "leaves": ["5"], "orphans": [], "summary": {...} } ``` -------------------------------- ### List and Remove Claude Code Variants (Bash) Source: https://context7.com/mikekelly/claude-sneakpeek/llms.txt Commands to manage installed Claude Code variants. 'list' displays all active variants, while 'remove' permanently deletes a specified variant and its associated configuration files. ```bash # List all variants npx @realmikekelly/claude-sneakpeek list # Output example: # claudesp # zai # minimax # Remove a variant npx @realmikekelly/claude-sneakpeek remove claudesp # Output: # Removed claudesp ``` -------------------------------- ### Run All Tests Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/AGENTS.md Executes all tests defined within the project. This is the standard command for running the complete test suite. ```bash npm test ``` -------------------------------- ### Applying Brand Themes with Claude Sneakpeek CLI Source: https://context7.com/mikekelly/claude-sneakpeek/llms.txt This section covers how to apply custom brand themes to Claude Sneakpeek CLI variants using the `tweakcc` command. It lists available brand presets and demonstrates how to set a specific brand during variant creation or skip theming entirely. ```bash # Set brand during create npx @realmikekelly/claude-sneakpeek quick --provider zai --brand zai --name zai # Skip theming entirely npx @realmikekelly/claude-sneakpeek quick --provider mirror --no-tweak --name plain ``` -------------------------------- ### Python Task Management for Testing Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/domains/testing.md Demonstrates how to create and manage testing tasks using Python. It includes creating tasks with subjects and descriptions, defining dependencies between tasks, and initiating background tasks for test generation. Assumes the existence of TaskCreate, TaskUpdate, and Task classes. ```python # Create testing tasks TaskCreate(subject="Identify testing scope", description="Analyze what needs testing...") TaskCreate(subject="Generate unit tests", description="Tests for module A...") TaskCreate(subject="Generate integration tests", description="Tests for API endpoints...") TaskCreate(subject="Run test suite", description="Execute all tests, capture results...") TaskCreate(subject="Fix failures", description="Address any failing tests...") TaskCreate(subject="Verify all pass", description="Final test run to confirm...") # Dependencies TaskUpdate(taskId="2", addBlockedBy=["1"]) TaskUpdate(taskId="3", addBlockedBy=["1"]) TaskUpdate(taskId="4", addBlockedBy=["2", "3"]) TaskUpdate(taskId="5", addBlockedBy=["4"]) TaskUpdate(taskId="6", addBlockedBy=["5"]) # Parallel test generation (sonnet for well-structured work) Task(subagent_type="general-purpose", prompt="TaskId 2: Generate unit tests...", model="sonnet", run_in_background=True) Task(subagent_type="general-purpose", prompt="TaskId 3: Generate integration tests...", model="sonnet", run_in_background=True) ``` -------------------------------- ### Background Agent Execution (Python) Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/SKILL.md Demonstrates how to configure tasks to run in the background using `run_in_background=True`. This prevents blocking the main orchestration thread, allowing for parallel processing and improved efficiency. Avoids using blocking agents. ```python # ✅ ALWAYS: run_in_background=True Task(subagent_type="Explore", prompt="...", run_in_background=True) Task(subagent_type="general-purpose", prompt="...", run_in_background=True) # ❌ NEVER: blocking agents (wastes orchestration time) Task(subagent_type="general-purpose", prompt="...") ``` -------------------------------- ### Invoke Skill Without Arguments Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/team-pack/skill-tool-override.md This example shows how to invoke a skill without any additional arguments. This is used when the skill's functionality does not require any specific parameters to be passed. Ensure the skill name is accurate for successful invocation. ```tool_code skill: "pdf" ``` -------------------------------- ### Fix Login Bug After Password Reset Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/examples.md This snippet details the process of diagnosing and fixing a bug where users cannot log in after resetting their password. It involves parallel investigation of logs, reset flow, and session handling, followed by a fix and regression test. ```python # Phase 1: Parallel diagnosis (haiku swarm - single message) Task(subagent_type="Explore", description="Check logs", prompt="Search for login errors, password reset issues in logs", model="haiku", run_in_background=True) Task(subagent_type="Explore", description="Find reset flow", prompt="Find password reset implementation, trace the flow", model="haiku", run_in_background=True) Task(subagent_type="Explore", description="Check session handling", prompt="How are sessions/tokens handled after password change?", model="haiku", run_in_background=True) # Phase 2: Synthesize (after results return) # Identify: Password reset invalidates session but doesn't clear cookie # Phase 3: Fix (sonnet for implementation) Task(subagent_type="general-purpose", description="Fix session bug", prompt="Clear session cookie after password reset...", model="sonnet", run_in_background=True) # Phase 4: Verify (test writing) Task(subagent_type="general-purpose", description="Add regression test", prompt="Add test for login after password reset...", model="sonnet", run_in_background=True) ``` -------------------------------- ### Task Management for Data Analysis (Python) Source: https://github.com/mikekelly/claude-sneakpeek/blob/main/src/skills/orchestration/references/domains/data-analysis.md Demonstrates how to structure data analysis tasks using a Pythonic approach, including creating tasks, updating dependencies, and spawning parallel analysis agents for exploration. It utilizes hypothetical `TaskCreate`, `TaskUpdate`, and `Task` functions. ```python import json # Placeholder for task creation function def TaskCreate(subject, description): print(f"TaskCreate(subject='{subject}', description='{description}')") # Placeholder for task update function def TaskUpdate(taskId, addBlockedBy): print(f"TaskUpdate(taskId='{taskId}', addBlockedBy={json.dumps(addBlockedBy)})") # Placeholder for task spawning function def Task(subagent_type, prompt, model, run_in_background): print(f"Task(subagent_type='{subagent_type}', prompt='{prompt}', model='{model}', run_in_background={run_in_background})") # Create analysis tasks TaskCreate(subject="Understand data sources", description="Schema, types, relationships...") TaskCreate(subject="Explore distributions", description="Statistical summaries, outliers...") TaskCreate(subject="Analyze missing data", description="Null patterns, imputation needs...") TaskCreate(subject="Check data quality", description="Validation, consistency...") TaskCreate(subject="Synthesize findings", description="Aggregate insights, recommendations...") TaskCreate(subject="Generate report", description="Visualizations, documentation...") # Parallel exploration after understanding TaskUpdate(taskId="2", addBlockedBy=["1"]) TaskUpdate(taskId="3", addBlockedBy=["1"]) TaskUpdate(taskId="4", addBlockedBy=["1"]) TaskUpdate(taskId="5", addBlockedBy=["2", "3", "4"]) TaskUpdate(taskId="6", addBlockedBy=["5"]) # Spawn parallel analysis agents (haiku for data exploration) Task(subagent_type="Explore", prompt="TaskId 2: Explore distributions...", model="haiku", run_in_background=True) Task(subagent_type="Explore", prompt="TaskId 3: Analyze missing data...", model="haiku", run_in_background=True) Task(subagent_type="Explore", prompt="TaskId 4: Check data quality...", model="haiku", run_in_background=True) ```