Skip to content

Instantly share code, notes, and snippets.

@xnohat
Created January 25, 2026 19:07
Show Gist options
  • Select an option

  • Save xnohat/9b6b8860c92aaab53a4811ce02b3c28a to your computer and use it in GitHub Desktop.

Select an option

Save xnohat/9b6b8860c92aaab53a4811ce02b3c28a to your computer and use it in GitHub Desktop.
{
"model": "claude-opus-4-5-20251101",
"max_tokens": 16000,
"thinking": {
"type": "enabled",
"budget_tokens": 31999
},
"system": "You are Claude Code, Anthropic's official CLI for Claude.\nYou are an interactive CLI tool that helps users with software engineering tasks.\n\n# Tone and style\n- Your responses should be short and concise\n- Only use emojis if the user explicitly requests it\n- NEVER create files unless absolutely necessary\n\n# Doing tasks\n- NEVER propose changes to code you haven't read\n- Use the appropriate tools to complete tasks\n- Be careful not to introduce security vulnerabilities\n\n# Environment info\nWorking directory: /Users/developer/my-project\nPlatform: darwin\nToday's date: 2025-01-25\n\n<claude-memory>\n# Project: my-project\n\n## Tech Stack\n- TypeScript 5.x\n- React 18\n- Node.js 20\n\n## Coding Conventions\n- Use functional components with hooks\n- Prefer named exports\n- Run `pnpm test` before committing\n</claude-memory>",
"tools": [
{
"name": "Read",
"description": "Reads a file from the local filesystem.",
"input_schema": {
"type": "object",
"properties": {
"file_path": { "type": "string" },
"offset": { "type": "number" },
"limit": { "type": "number" }
},
"required": ["file_path"]
}
},
{
"name": "Write",
"description": "Writes content to a file.",
"input_schema": {
"type": "object",
"properties": {
"file_path": { "type": "string" },
"content": { "type": "string" }
},
"required": ["file_path", "content"]
}
},
{
"name": "Edit",
"description": "Performs exact string replacements in files.",
"input_schema": {
"type": "object",
"properties": {
"file_path": { "type": "string" },
"old_string": { "type": "string" },
"new_string": { "type": "string" }
},
"required": ["file_path", "old_string", "new_string"]
}
},
{
"name": "Bash",
"description": "Executes a bash command.",
"input_schema": {
"type": "object",
"properties": {
"command": { "type": "string" },
"timeout": { "type": "number" }
},
"required": ["command"]
}
},
{
"name": "mcp__github__create_pull_request",
"description": "Create a pull request in a GitHub repository.",
"input_schema": {
"type": "object",
"properties": {
"owner": { "type": "string" },
"repo": { "type": "string" },
"title": { "type": "string" },
"body": { "type": "string" }
}
}
}
],
"messages": [
{
"role": "user",
"content": "Can you help me fix the authentication bug in the login page?"
},
{
"role": "assistant",
"content": [
{
"type": "text",
"text": "I'll help you fix the authentication bug. Let me first read the login page component."
},
{
"type": "tool_use",
"id": "toolu_01ABC",
"name": "Read",
"input": {
"file_path": "/Users/developer/my-project/src/pages/Login.tsx"
}
}
]
},
{
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_01ABC",
"content": " 1\timport { useState } from 'react';\n 2\timport { useAuth } from '@/hooks/useAuth';\n 3\t\n 4\texport function LoginPage() {\n 5\t const [email, setEmail] = useState('');\n 6\t const [password, setPassword] = useState('');\n 7\t const [error, setError] = useState('');\n 8\t const { login } = useAuth();\n 9\t\n 10\t const handleSubmit = async (e) => {\n 11\t e.preventDefault();\n 12\t login(email, password);\n 13\t };\n 14\t\n 15\t return (\n 16\t <form onSubmit={handleSubmit}>\n 17\t <input value={email} onChange={(e) => setEmail(e.target.value)} />\n 18\t <input value={password} onChange={(e) => setPassword(e.target.value)} />\n 19\t {error && <p>{error}</p>}\n 20\t <button type=\"submit\">Login</button>\n 21\t </form>\n 22\t );\n 23\t}"
}
]
},
{
"role": "assistant",
"content": [
{
"type": "text",
"text": "I can see the issue. The login function on line 12 isn't handling the async response or errors. Let me check the useAuth hook."
},
{
"type": "tool_use",
"id": "toolu_02DEF",
"name": "Read",
"input": {
"file_path": "/Users/developer/my-project/src/hooks/useAuth.ts"
}
}
]
},
{
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_02DEF",
"content": " 1\timport { useState } from 'react';\n 2\timport { api } from '@/lib/api';\n 3\t\n 4\texport function useAuth() {\n 5\t const [user, setUser] = useState(null);\n 6\t\n 7\t const login = async (email: string, password: string) => {\n 8\t const response = await api.post('/auth/login', { email, password });\n 9\t if (response.ok) {\n 10\t setUser(response.data.user);\n 11\t return { success: true };\n 12\t }\n 13\t return { success: false, error: response.data.message };\n 14\t };\n 15\t\n 16\t return { user, login };\n 17\t}"
}
]
},
{
"role": "user",
"content": "Yes, please fix it and also add proper error handling"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment