Skip to content
Back to skills

011 Main 99844de3

ASecurity

Best Practices für Google Gemini + Anthropic Claude Integration.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 11, 2026
ai-agentsgogitapi

Works with

  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 011-main_99844de3 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 011 Main 99844de3?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 011 Main 99844de3
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-011-main-99844de3/badge)](https://www.skillsdirectory.com/skills/tools-only-011-main-99844de3)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# AI-Integration Skill

Best Practices für Google Gemini + Anthropic Claude Integration.

## Hybrid AI-Ansatz (ManufacturingInsideAnalyzer)

```ts
// Gemini 2.0 Flash: Schnelle Analysen
import { GoogleGenerativeAI } from '@google/genai';

const genai = new GoogleGenerativeAI(apiKey);
const model = genai.getGenerativeModel({
  model: 'gemini-2.0-flash-exp',
  systemInstruction: 'Du bist ein Manufacturing-Experte...'
});

// Claude 3.5 Haiku: Chatbot
import Anthropic from '@anthropic-ai/sdk';

const anthropic = new Anthropic({ apiKey });
const message = await anthropic.messages.create({
  model: 'claude-3-5-haiku-20241022',
  max_tokens: 1024,
  messages: [{ role: 'user', content: prompt }]
});
```

## Structured Output (Gemini)

```ts
// ✅ JSON Schema für predictable Responses
const schema = {
  type: 'object',
  properties: {
    kpis: {
      type: 'array',
      items: {
        type: 'object',
        properties: {
          name: { type: 'string' },
          value: { type: 'number' }
        }
      }
    }
  },
  required: ['kpis']
};

const result = await model.generateContent({
  contents: [{ role: 'user', parts: [{ text: prompt }] }],
  generationConfig: {
    responseMimeType: 'application/json',
    responseSchema: schema
  }
});
```

## Timeout & Error Handling

```ts
// ✅ 10-Sekunden Vercel-Limit beachten
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 9000);

try {
  const response = await fetch(apiUrl, {
    signal: controller.signal,
    body: JSON.stringify(prompt)
  });
} catch (err) {
  if (err.name === 'AbortError') {
    return { error: 'Timeout', fallback: true };
  }
} finally {
  clearTimeout(timeout);
}
```

## Rate Limit Handling

```ts
// Exponential Backoff
async function callWithRetry(fn, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    try {
      return await fn();
    } catch (err) {
      if (err.status === 429 && i < maxRetries - 1) {
        await sleep(Math.pow(2, i) * 1000);
        continue;
      }
      throw err;
    }
  }
}
```

## Kosten-Monitoring

```ts
// Track Tokens für Budget-Kontrolle
const usage = result.usageMetadata;
await logUsage({
  model: 'gemini-2.0-flash',
  inputTokens: usage.promptTokenCount,
  outputTokens: usage.candidatesTokenCount,
  cost: calculateCost(usage)
});
```

## digitalTwin (Gemini 2.5 Flash Exp)

```ts
// Pose-Estimation via Gemini Vision
const imageParts = [{
  inlineData: {
    mimeType: 'image/jpeg',
    data: base64ImageData
  }
}];

const result = await model.generateContent({
  contents: [{
    role: 'user',
    parts: [
      { text: 'Analyze ergonomic posture and return REBA score' },
      ...imageParts
    ]
  }]
});
```

## Sicherheit

- ✅ API-Keys nur in `.env` (NIEMALS in Code)
- ✅ Input Validation (max length, format)
- ✅ Output Sanitization (HTML-escape)
- ✅ Medical Claims Filtering (ManufacturingInsideAnalyzer)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.