llm-integration

Integrate LLMs into applications - APIs, prompting, fine-tuning, and context management

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "llm-integration" with this command: npx skills add pluginagentmarketplace/custom-plugin-ai-agents/pluginagentmarketplace-custom-plugin-ai-agents-llm-integration

LLM Integration

Integrate Large Language Models with production-grade reliability.

When to Use This Skill

Invoke this skill when:

  • Connecting to Claude, OpenAI, or other LLM APIs
  • Designing effective prompts and system messages
  • Optimizing token usage and costs
  • Implementing streaming responses

Parameter Schema

ParameterTypeRequiredDescriptionDefault
providerenumYesanthropic, openai, google, local-
taskstringYesIntegration goal-
streamingboolNoEnable streamingtrue
max_tokensintNoResponse token limit4096

Quick Start

# Anthropic Claude
from anthropic import Anthropic

client = Anthropic()
response = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello!"}]
)

# OpenAI
from openai import OpenAI

client = OpenAI()
response = client.chat.completions.create(
    model="gpt-4-turbo",
    messages=[{"role": "user", "content": "Hello!"}]
)

Prompt Templates

System Prompt

SYSTEM = """You are {role}, an expert in {domain}.
Your task: {task}
Constraints: {constraints}
Output format: {format}"""

Chain-of-Thought

COT = """Think step by step:
1. Understand the problem
2. Break it down
3. Solve each part
4. Combine results"""

Cost Optimization

ModelInput $/1MOutput $/1MBest For
Claude Haiku$0.25$1.25High volume
Claude Sonnet$3$15Complex tasks
Claude Opus$15$75Most demanding

Troubleshooting

IssueSolution
429 Rate LimitedExponential backoff
Context overflowTruncate/summarize
Poor output qualityAdd examples, lower temp
High costsUse cheaper model, cache

Best Practices

  • Always implement retry with backoff
  • Use streaming for better UX
  • Cache repeated queries
  • Monitor token usage

Related Skills

  • ai-agent-basics - Agent architecture
  • rag-systems - Retrieval augmentation
  • tool-calling - Function calling

References

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

agent-memory

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

multi-agent

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

rag-systems

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

agent-safety

No summary provided by upstream source.

Repository SourceNeeds Review