Developer Workflows¶
This guide contains productivity tips and workflows for developers working with Claude Code on the Nutri-E project.
Table of Contents¶
Claude Code Tool Limitations¶
Read Tool - Image Size Limit¶
CRITICAL: The Read tool has a maximum request size limit (~1-2MB) and CANNOT read large image files.
Problem:
- Reading images >1-2MB causes 413 Request Too Large API errors
- This breaks Claude Code's ability to continue working (requires restart)
- No built-in image compression before sending to API
Solutions:
Option 1: Resize images before reading (RECOMMENDED)
# Install ImageMagick
brew install imagemagick
# Resize all images in directory to max 800px width
for img in path/to/images/*.png; do
convert "$img" -resize 800x800\> -quality 85 "$img"
done
# Resize single image
convert large-image.png -resize 800x800\> -quality 85 large-image.png
Option 2: Organize files by metadata without reading image content
- Use ls -lh for file sizes and dates
- Parse filenames for descriptive information
- Avoid Read tool for large images entirely
Option 3: Use Bash to get image dimensions without loading full file
# Get image dimensions (fast, no full load)
sips -g pixelWidth -g pixelHeight image.png
# Check file size before reading
ls -lh image.png | awk '{print $5}'
When to use each option: - Marketing screenshots: Resize first (Option 1) - you need visual analysis - Log file organization: Skip image reading (Option 2) - filename patterns sufficient - Quick dimension checks: Use sips (Option 3) - faster than Read tool
Important:
- Always check file size with ls -lh before attempting Read on images
- Files >1MB should be resized or analyzed by metadata only
- This limitation applies to ALL image formats (PNG, JPG, HEIC, etc.)
Phone Screenshot Workflow¶
Use Case: Share screenshots with Claude Code when you're away from your computer.
Setup Steps¶
1. Create Google Drive folder (one-time setup):
- Open Google Drive app on your phone
- Navigate to: My Drive/Nutri-E/
- Create new folder: claude-screenshots
- Wait for sync to Mac (appears in ~/Library/CloudStorage/GoogleDrive-*/My Drive/Nutri-E/claude-screenshots)
2. Upload screenshot from phone:
- Take screenshot on iPhone/Android
- Share → Google Drive
- Upload to Nutri-E/claude-screenshots/
- Give it a descriptive name (e.g., gui-issue-today-tab.png)
3. Find screenshot on Mac:
# Search in Google Drive Screenshots folder
find "/Users/post/Library/CloudStorage/GoogleDrive-codiedev42@gmail.com/My Drive/Nutri-E Marketing/Screenshots" -type f -name "*.png" -o -name "*.jpg"
# Search for specific file
find "/Users/post/Library/CloudStorage/GoogleDrive-codiedev42@gmail.com/My Drive/Nutri-E Marketing/Screenshots" -type f -iname "*gui-issue*"
4. Share path with Claude: - Script displays full path for matched files - Copy path and provide to Claude Code - Claude can read the image directly using Read tool
Benefits¶
- ✅ Works from anywhere (phone, tablet, computer)
- ✅ No need to be at your Mac to share screenshots
- ✅ Persistent storage (doesn't clutter Downloads)
- ✅ Automatic sync via Google Drive
File Organization¶
Google Drive/Nutri-E/
├── marketing-screenshots/ (App Store/social media)
├── claude-screenshots/ (Bug reports/questions for Claude)
└── video-content/ (Marketing videos)
Project Email Management¶
Project Email Account¶
Email: codiedev42@gmail.com Purpose: Project communications, service subscriptions, social media accounts
Credentials Storage¶
Location: /Users/post/Library/CloudStorage/GoogleDrive-codiedev42@gmail.com/.nutrie-secrets
Why Google Drive? - ✅ Syncs across all development machines automatically - ✅ Encrypted at rest by Google - ✅ Not in git repository (outside project directory) - ✅ Backed up automatically
This file stores sensitive credentials for project automation and should NEVER be committed to git.
File Permissions: chmod 600 (owner read/write only)
Format:
# Nutri-E Automation Credentials
# NEVER commit this file to git!
# File permissions: 600 (owner read/write only)
# ChatGPT account for automated image generation
CHATGPT_EMAIL=codiedev42@gmail.com
CHATGPT_PASSWORD=<actual_password>
# GitHub account for Claude Code commits
GITHUB_USERNAME=codiedev42-stack
GITHUB_EMAIL=codiedev42@gmail.com
GITHUB_AUTH=Google OAuth (uses same password as CHATGPT_PASSWORD)
# KlingAI account (uses Google OAuth with ChatGPT credentials)
KLINGAI_AUTH=Google OAuth (codiedev42@gmail.com)
# Add other secrets here as needed
# OPENAI_API_KEY=sk-...
# GROK_API_KEY=...
# X_TWITTER_PASSWORD=...
Usage in Bash Scripts:
# Source credentials
source "/Users/post/Library/CloudStorage/GoogleDrive-codiedev42@gmail.com/.nutrie-secrets"
# Access variables
echo "Email: $CHATGPT_EMAIL"
Usage in Node.js/Playwright:
const fs = require('fs');
const path = require('path');
// Read secrets file
const secretsPath = '/Users/post/Library/CloudStorage/GoogleDrive-codiedev42@gmail.com/.nutrie-secrets';
const secretsRaw = fs.readFileSync(secretsPath, 'utf8');
// Parse into object
const secrets = {};
secretsRaw.split('\n').forEach(line => {
// Ignore comments and blank lines
if (!line || line.trim().startsWith('#')) return;
const match = line.match(/^([A-Za-z_][A-Za-z0-9_]*)=(.*)$/);
if (match) {
// Remove surrounding quotes if present
let value = match[2].trim().replace(/^['"]|['"]$/g, '');
secrets[match[1]] = value;
}
});
// Access credentials
console.log('Email:', secrets.CHATGPT_EMAIL);
// Use for Playwright login automation
await page.fill('input[type="email"]', secrets.CHATGPT_EMAIL);
await page.fill('input[type="password"]', secrets.CHATGPT_PASSWORD);
Security Best Practices:
- ✅ File permissions: chmod 600 (owner read/write only)
- ✅ Never commit to git (stored outside repo in Google Drive)
- ✅ Used for automation scripts (ChatGPT, Gmail, KlingAI, GitHub)
- ✅ Shared passwords use Google OAuth where possible (ChatGPT, KlingAI, GitHub)
- ✅ Synced across machines via Google Drive (no manual copying)
Credentials Inventory:
| Service | Auth Method | Email/Username | Password Location |
|---|---|---|---|
| ChatGPT | Email + Password | codiedev42@gmail.com | .nutrie-secrets |
| Gmail | Google OAuth | codiedev42@gmail.com | Same as ChatGPT |
| KlingAI | Google OAuth | codiedev42@gmail.com | Same as ChatGPT |
| GitHub | Google OAuth | codiedev42-stack | Same as ChatGPT |
| X (Twitter) | Email + Password | codiedev42@gmail.com | .nutrie-secrets |
| TikTok | Email + Password | codiedev42@gmail.com | .nutrie-secrets |
| App Store Connect | Apple ID | codiedev42@gmail.com | Separate (not in secrets) |
Gmail Organization Strategy¶
Label System: - 🚀 Development - GitHub notifications, CI/CD, deployment alerts - 💳 Subscriptions - ChatGPT Plus, app services, recurring charges - 🔐 Security - Login notifications, 2FA, security alerts - 🍎 App Store - App Store Connect, TestFlight, review notifications - 💬 Social - X/Twitter, social media accounts - 📧 Marketing - Newsletter signups, promotional emails - 📊 Analytics - Usage reports, performance metrics - ✅ Action Required - Needs immediate attention - 📚 Archive - Completed/resolved items
Inbox Zero Workflow: 1. Triage (5 min): Mark as read, apply labels 2. Action (15 min): Respond to urgent items 3. Archive (2 min): Move processed emails out of inbox
Automatic Triage Rules (Claude Code):
When checking email via Playwright headless, apply these decision rules automatically:
Archive immediately: - ✅ App Store rejections that are already resolved (check CLAUDE.md for current version/build) - ✅ Social media notifications (YouTube features enabled, verification links) - ✅ Informational messages with no action required - ✅ Copyright/content notices that aren't strikes - ✅ Success confirmations (TestFlight uploads, CI/CD completions)
Keep for manual review: - 🔐 Security alerts (password changes, recovery email changes, login from new device) - ⚠️ Unresolved App Store rejections - 💰 Subscription billing issues or payment failures - 📧 Messages requiring user decisions or responses - 🚨 Anything marked "urgent" or "action required" that isn't already resolved
Decision-making principle: Do not ask the user - make the safe choice automatically. When in doubt between archiving and keeping, err on the side of keeping for review.
Gmail Filter Rules: - GitHub → Development (auto-label) - OpenAI → Subscriptions (auto-label) - Apple → App Store (auto-label) - Google Security → Security (auto-label) - Twitter/X → Social (auto-label)
Current Subscriptions: - ChatGPT Plus: €18.40/month (auto-renewal) - X/Twitter account: @e_codi63034 (see X_TWITTER_MARKETING_SETUP.md for complete setup)