Skip to main content

Claude Agent

Claude is Anthropic's AI assistant, known for safety, nuanced understanding, and detailed work.

Overview

The Claude agent provides:

  • Safety-first approach - Conservative, careful changes
  • Detailed explanations - Thorough documentation
  • Strong reasoning - Complex problem solving
  • Helpful nature - Clear communication

When to Use Claude

Ideal For

  • ✅ Security-sensitive code
  • ✅ Complex business logic
  • ✅ Code that needs thorough review
  • ✅ Detailed documentation
  • ✅ Learning/educational contexts

Less Ideal For

  • ⚠️ Quick prototypes (use Gemini)
  • ⚠️ Simple repetitive tasks
  • ⚠️ Cost-sensitive projects

Setup

API Key

export ANTHROPIC_API_KEY="your-anthropic-api-key"

Get your key at console.anthropic.com.

Configuration

{
"agents": {
"claude": {
"enabled": true,
"model": "claude-sonnet-4-20250514",
"autonomy": "workspace-write"
}
}
}

Model Options

ModelSpeedQualityCost
claude-sonnet-4-20250514FastHigh$$
claude-opus-4-20250514SlowerHighest$$$$

Usage

From UI

  1. Open task
  2. Click "Run Agent"
  3. Select "Claude"
  4. Start

From CLI

friday-dev run --task 123 --agent claude

Comparison with Friday Agent

FeatureFriday AgentClaude
Base ModelClaudeClaude
Custom Tools✅ Yes❌ No
AutonomyHigherLower
SafetyHighHighest
PR Creation✅ AutoManual

Use Friday Agent for autonomous execution. Use Claude for careful, supervised work.

Best Practices

Task Descriptions

Claude responds well to detailed tasks:

## Task
Implement input validation for user registration

## Requirements
- Validate email format
- Password: min 8 chars, 1 uppercase, 1 number
- Username: alphanumeric, 3-20 chars
- Return clear error messages

## Constraints
- Use Zod for validation
- Follow existing patterns in src/validation/
- Add unit tests for each rule

Asking for Explanations

Claude excels at explaining:

Please explain your changes:
- Why you chose this approach
- What alternatives you considered
- Any potential issues to watch for

Safety Features

Claude is designed to:

  1. Avoid harmful code - Won't write malicious code
  2. Flag security issues - Points out vulnerabilities
  3. Request clarification - Asks when uncertain
  4. Explain concerns - Communicates risks

Example Output

Code with Explanations

/**
* Validates user registration input.
*
* Implementation notes:
* - Using Zod for type-safe validation
* - Email regex follows RFC 5322 (simplified)
* - Password requirements balance security and usability
*
* Security considerations:
* - Passwords are never logged or stored in plain text
* - Error messages don't reveal which field failed (prevents enumeration)
*/
export const registrationSchema = z.object({
email: z.string()
.email('Invalid email format')
.max(255, 'Email too long'),

password: z.string()
.min(8, 'Password must be at least 8 characters')
.regex(/[A-Z]/, 'Password must contain an uppercase letter')
.regex(/[0-9]/, 'Password must contain a number'),

username: z.string()
.min(3, 'Username must be at least 3 characters')
.max(20, 'Username must be at most 20 characters')
.regex(/^[a-zA-Z0-9]+$/, 'Username must be alphanumeric'),
});

Thoughtful Responses

Claude will often include:

Before implementing, I want to clarify:

1. Should password validation include special characters?
- Current requirement: 8+ chars, 1 uppercase, 1 number
- More secure option: add 1 special character requirement

2. How should we handle existing users with weak passwords?
- Force reset on next login?
- Grandfather existing passwords?

Please let me know your preferences.

Pricing

Troubleshooting

Slow Responses

  • Claude prioritizes quality over speed
  • For faster responses, try Gemini
  • Use claude-3-5-sonnet instead of Opus

Over-cautious

If Claude is being too careful:

  • Be explicit about what's allowed
  • Confirm you understand the risks
  • Use Friday Agent for more autonomy

API Errors

  • Check API key validity
  • Verify account has credits
  • Check rate limits

Next Steps