Example Input
extensionName: "ClaudeAssist Pro", primaryFeatures: "Text summarization, writing assistance, code review on any webpage", targetPlatforms: "macOS Safari, iOS Safari", apiIntegrationLevel: "Full API access with conversation memory"
Example Output
**Architecture Analysis:**
ClaudeAssist Pro will integrate Claude's capabilities directly into Safari through a comprehensive extension supporting text summarization, writing assistance, and code review. The architecture uses Safari's native Web Extension APIs with secure Claude API integration.
**manifest.json:**
```json
{
"manifest_version": 3,
"name": "ClaudeAssist Pro",
"version": "1.0.0",
"description": "Native Claude AI integration for Safari",
"permissions": ["activeTab", "storage", "scripting"],
"host_permissions": ["https://api.anthropic.com/*"],
"background": {
"scripts": ["background.js"],
"persistent": false
},
"content_scripts": [{
"matches": ["<all_urls>"],
"js": ["content.js"]
}],
"action": {
"default_popup": "popup.html",
"default_title": "ClaudeAssist Pro"
}
}
```
**background.js (excerpt):**
```javascript
class ClaudeAPIManager {
constructor() {
this.baseURL = 'https://api.anthropic.com/v1/messages';
this.conversationMemory = new Map();
}
async sendRequest(prompt, context = {}) {
const apiKey = await this.getSecureAPIKey();
const response = await fetch(this.baseURL, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': apiKey,
'anthropic-version': '2023-06-01'
},
body: JSON.stringify({
model: 'claude-3-opus-20240229',
max_tokens: 4000,
messages: this.buildMessageHistory(prompt, context)
})
});
return await response.json();
}
}
```
The extension provides seamless Claude integration with native Safari security, conversation memory, and Apple-styled UI components optimized for both macOS and iOS platforms.