A powerful workbench for testing and refining Claude-powered workflows, agents, and prompts.
⚠️ SECURITY WARNING: This tool is designed for local development only. Do NOT expose it to your network or the internet without adding proper authentication. It has no built-in access controls and anyone who can reach the server can use your API credentials and access your conversations.
Claude Projects lets you create custom AI assistants with specific instructions and knowledge bases. But testing those workflows requires switching between the Claude.ai interface, copying prompts, and manually iterating.
This workbench solves that by giving you:
⚠️ Note: This tool uses cookie-based authentication to access Claude.ai directly because the Claude Projects API is currently in beta and not publicly available. Once Anthropic releases the official Projects API, this tool can be updated to use proper API authentication instead of browser cookies. Until then, this is a practical workaround for teams who need to test their Projects programmatically.
- Direct access to your Claude Projects - Test your agents with their full knowledge bases
- Reusable prompt templates - Build, save, and iterate on prompts with variables
- Tool execution - Claude can fetch web pages and search the web during analysis
- Progress visibility - See what Claude is doing in real-time
| Mode | Best For |
|---|---|
| Projects | Testing customer-facing agents, workflows with knowledge bases, complex multi-step prompts |
| API | Simple prompt templating, quick iterations, no knowledge base needed |
- Dual Connection Modes - Use official API or direct Claude.ai web access
- Mode Selector - Switch between API and Projects mode in Settings (when both configured)
- Claude Projects Support - Access your Claude Projects with their knowledge bases
- Project Selector - Switch between multiple Claude Projects on the fly
- Configuration-driven - Works with any Claude Project by editing YAML config
- 20+ Built-in Templates - Analysis, research, content creation, and more
- Web Fetch - Claude can fetch and analyze web pages automatically
- Web Search - DuckDuckGo (default) or Google Custom Search integration
- Progress Tracking - Visual progress bar with tool execution stats
- Real-time Feedback - See fetches and searches as they happen
- File upload support - PDF, DOCX, TXT, MD (configurable)
- Drag & drop uploads - Easy file handling
- URL content fetching - Optionally fetch and analyze web content
- Template System - Dynamic prompt builder with variable inputs
- Conversation history - Maintains context within sessions
- New Chat button - Start fresh conversations within projects
- Settings modal - Manage projects, templates, and connection settings
- Progress indicators - Animated progress bar during processing
- Responsive design - Works on desktop and mobile
Connect directly to Claude.ai using your browser session cookie. This is the primary use case for testing customer workflows and agents.
Why use Projects mode:
- Test agents with their full knowledge bases and custom instructions
- Validate complex workflows before deploying
- Iterate on project configurations with real feedback
- Access project-specific conversations and context
Header displays: Prompt Engineering Workbench | Claude Projects
Use the standard Anthropic API for direct Claude access. Best for users who just need prompt templating without project features.
Why use API mode:
- Simple prompt engineering and iteration
- No knowledge base or custom instructions needed
- Direct API access for testing raw prompts
- Lower friction for quick experiments
Header displays: Prompt Engineering Workbench | Claude AI
If you have both an API key and a Claude.ai cookie configured, you can switch between modes:
- Click the Settings (gear icon) in the header
- In the Connection section, you'll see mode toggle buttons
- Click Projects or API to switch modes
- The UI will update automatically (header title, project selector visibility)
git clone https://github.com/SEMalytics/claude_project_chat.git
cd claude_project_chatThe easiest way to get started:
./setup.shThis script will:
- Check Python version (requires 3.9+)
- Create a fresh virtual environment
- Install all dependencies
- Create
.envfrom.env.exampleif needed
If you prefer to set up manually:
# Remove any existing venv (if reinstalling)
rm -rf venv
# Create fresh virtual environment
python3 -m venv venv
# Install dependencies using venv's pip directly
./venv/bin/pip install --upgrade pip
./venv/bin/pip install -r requirements.txtImportant: Always use
./venv/bin/pipand./venv/bin/pythonto ensure you're using the virtual environment's Python, not your system Python.
# Copy example env file
cp .env.example .env
# Edit .env with your credentials
nano .env # or: code .env, vim .env, etc.# Get this from your browser's DevTools (see instructions below)
CLAUDE_COOKIE=sessionKey=sk-ant-sid01-xxx...
# Optional: Start in a specific conversation
CLAUDE_CONVERSATION_ID=your-conversation-uuidGetting Your Claude Cookie:
- Open claude.ai and log in
- Open DevTools (F12 or Cmd+Option+I)
- Go to Network tab
- Click any request to claude.ai
- Find the
Cookieheader in Request Headers - Copy the entire cookie string (starts with
sessionKey=)
ANTHROPIC_API_KEY=sk-ant-api03-your-key-here
CLAUDE_PROJECT_ID=your-project-uuid-hereBy default, web search uses DuckDuckGo (no API key needed). For Google Custom Search:
# Get API key from: https://console.cloud.google.com/apis/credentials
GOOGLE_SEARCH_API_KEY=your-google-api-key
# Create search engine at: https://programmablesearchengine.google.com/
GOOGLE_SEARCH_CX=your-search-engine-id# Using venv python directly (recommended)
./venv/bin/python app.py
# OR activate venv first, then run
source venv/bin/activate # macOS/Linux
python app.pyYou should see:
==================================================
Prompt Engineering Workbench | Claude Projects
==================================================
Server starting at http://127.0.0.1:5001
Press Ctrl+C to stop
Navigate to: http://127.0.0.1:5001
- Click the Settings (gear icon) in the header
- In "Active Projects", check the projects you want to use
- Click Save Changes
- Use the project dropdown in the header to switch projects
Edit this file to customize the interface:
# Project Identity
project:
name: "My Project"
description: "Description here"
# UI Customization
ui:
title: "Chat Title"
subtitle: "Subtitle text"
primary_color: "#3b82f6"
# Features
features:
file_upload: true
url_fetching: true
multi_file: true
# File Settings
files:
allowed_extensions: [pdf, docx, txt, md]
max_size_mb: 10
max_files: 5
# Custom Prompts (for Simple Input mode)
prompts:
- id: "general_chat"
label: "General Chat"
template: "{user_input}"
requires_files: false
placeholder: "Ask anything..."Create your own templates that persist across updates:
templates:
- id: my_custom_template
name: "My Custom Analysis"
description: "Describe what this does"
category: analysis
template: |
Analyze the following for [focus_area]:
[content]
variables:
- name: focus_area
label: "Focus Area"
type: text
required: true
- name: content
label: "Content to Analyze"
type: textarea
required: trueclaude_project_chat/
├── app.py # Flask server with API routes
├── config.py # Configuration loader
├── project_config.yaml # Project-specific settings
├── custom_prompts.yaml # Your custom templates (gitignored)
├── requirements.txt # Python dependencies
├── .env # API keys/cookies (gitignored)
├── .env.example # Example environment file
├── static/
│ ├── css/styles.css # Custom styles
│ ├── js/
│ │ ├── app.js # Main frontend JavaScript
│ │ └── prompt-builder.js # Template UI + Project Manager
│ └── uploads/ # Temporary file storage
├── templates/
│ └── index.html # Chat interface template
└── utils/
├── __init__.py
├── claude_client.py # Official Anthropic API wrapper
├── claude_web_client.py # Claude.ai web client (cookie auth)
├── tool_handler.py # Tool execution handler
├── file_processor.py # File handling
├── url_fetcher.py # URL content fetching
├── prompt_templates.py # 20+ built-in templates
└── prompt_compiler.py # Template compilation
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Main chat interface |
/api/chat |
POST | Send message to Claude |
/api/upload |
POST | Upload file |
/api/fetch-url |
POST | Fetch URL content |
/api/templates |
GET | Get all templates |
/api/prompts |
GET | Get legacy prompts |
/api/session/{id} |
GET | Get session history |
/api/session/{id} |
DELETE | Clear session |
/api/config |
GET | Get project config |
/api/client-status |
GET | Check connection mode and available options |
/api/switch-mode |
POST | Switch between API and Web modes |
/api/update-cookie |
POST | Update Claude.ai cookie |
/api/projects |
GET | List available projects |
/api/projects/set-active |
POST | Switch active project |
/api/conversations |
GET | List conversations |
/api/conversations/new |
POST | Start new conversation |
- Analysis - SWOT, competitive, gap analysis
- Research - Literature review, market research, trend analysis
- Content - Blog posts, social media, email campaigns
- Technical - Code review, documentation, architecture
- Business - Business plans, proposals, reports
- Creative - Brainstorming, storytelling, naming
"Access denied (403)"
- Your cookie has expired. Get a fresh one from claude.ai DevTools
- Update via Settings modal or edit
.envdirectly
Projects not showing
- Click Settings (gear icon)
- Click "Refresh Projects"
- Enable the projects you want
- Save Changes
"ANTHROPIC_API_KEY is required"
- Check that
.envfile exists and contains your API key - Ensure the key starts with
sk-ant-
- Check file extension is in
allowed_extensions - Verify file size is under
max_size_mb - Ensure
static/uploads/directory exists
# Activate virtual environment
source venv/bin/activate
# Reinstall dependencies
pip install -r requirements.txtIf pip installs to wrong location:
# Use venv binaries directly
./venv/bin/pip install -r requirements.txt
./venv/bin/python app.pypip install black flake8
black .
flake8 .pip install pytest
pytest- API keys and cookies are stored in
.env(not committed to git) - Runs locally on 127.0.0.1 by default
- Uploaded files are stored temporarily in
static/uploads/ - Cookie-based auth uses your Claude.ai session - keep it secure
- Consider adding authentication for production use
This project uses and was inspired by several open-source projects:
- Flask - Web framework
- Anthropic Python SDK - Official Claude API
- curl_cffi - HTTP client with browser impersonation
- duckduckgo-search - Web search without API key
- BeautifulSoup4 - HTML parsing
- PyPDF2 - PDF text extraction
- python-docx - Word document processing
- Tailwind CSS - Utility-first CSS framework
- Claude-API by KoushikNavuluri - Inspired the approach for direct Claude.ai web access using cookie authentication
- Claude Code - AI-assisted development
MIT License - Use freely for your projects.
Note: This is an unofficial tool and is not affiliated with Anthropic. Use responsibly and in accordance with Anthropic's terms of service.
This tool is built by SEMalytics—making AI development workflows practical.
Related Projects:
- Forge — AI code generation with 12-agent review system
- KnowledgeForge — Multi-agent orchestration methodology
- Concept Clarity — Message clarity measurement system
Built by SEMalytics · AI tools that ship.