gemini-consult
Consult Gemini for assistance when Claude needs help, additional context, or is stuck on a problem.
Instructions
Consult with Gemini when Claude needs help, additional context, or is stuck on a problem
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| question | Yes | ||
| currentContext | No |
Implementation Reference
- src/gemini.ts:72-75 (handler)The GeminiClient.consult() method that executes the tool logic for gemini-consult. It builds a prompt using the CONSULT template and runs the gemini CLI command with the gemini-2.5-flash model.
async consult(question: string, currentContext?: string): Promise<string> { const prompt = PROMPTS.CONSULT.template(question, currentContext); return this.executeCommand('gemini-2.5-flash', prompt); } - src/tools.ts:58-85 (schema)The ToolConfig schema definition for gemini-consult, defining its name, description, model (gemini-2.5-flash), parameters (question required, currentContext optional), and Claude command configuration.
'gemini-consult': { name: 'gemini-consult', description: 'Consult with Gemini when Claude needs help, additional context, or is stuck on a problem', promptKey: 'CONSULT', model: 'gemini-2.5-flash', parameters: { question: { schema: z.string(), description: 'The question, problem, or situation where Claude needs help or additional context', required: true, }, currentContext: { schema: z.string().optional(), description: 'Current context about what Claude is working on, error messages, or relevant code', required: false, }, }, command: { name: 'consult', description: 'Get quick development guidance and advice from Gemini. Use this when you need architectural advice, best practices, or are stuck on a problem. Gemini will provide high-level guidance without code snippets.', usage: '/consult <question or problem>', example: '/consult What\'s the best way to handle form validation in React with TypeScript?', parameterMapping: { question: '{{arg1}}', currentContext: '{{@.}}', }, }, }, - src/server.ts:35-40 (registration)The routing case in server.ts that registers the gemini-consult tool handler. When the tool name matches 'gemini-consult', it routes to geminiClient.consult() with question and currentContext params.
case 'gemini-consult': response = await geminiClient.consult( params.question as string, params.currentContext as string | undefined ); break; - src/prompts.ts:186-220 (helper)The CONSULT prompt template used by gemini-consult. It instructs Gemini to provide development guidance (no code), structured with Understanding, Guidance, Approach Options, and Next Steps sections.
CONSULT: { systemContext: GEMINI_ROLE, template: (question: string, currentContext?: string) => `Provide development guidance for this question: **Question**: ${question} ${currentContext ? `**Current Context**: ${currentContext}\n` : ''} IMPORTANT CONSTRAINTS: - DO NOT provide code snippets or implementations - DO NOT suggest specific code changes - ONLY provide conceptual guidance and best practices OUTPUT FORMAT - Structure your response with: ## Understanding - Clarify the core challenge - Identify key considerations ## Guidance - Best practices for this scenario - Common patterns to consider - Pitfalls to avoid ## Approach Options - Different ways to tackle this - Trade-offs for each approach ## Next Steps - How to proceed (conceptually) - What to research or validate - Key decisions to make Keep advice practical but high-level. NO CODE.`, },