Token导航 LogoToken导航

Agent Skill · 研究检索

llmintegration(llmintegration 搜索)

llmintegration 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

llmintegration 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 44,563。

总安装 906周安装 37GitHub Stars 11下载 293核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:llmintegration(llmintegration 搜索)
来源仓库:https://github.com/lobbi-docs/claude
仓库路径:skills/llmintegration
安装命令:
npx skills add https://github.com/lobbi-docs/claude --skill llmintegration
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/lobbi-docs/claude --skill llmintegration

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找和筛选 LLM 集成相关的解决方案。适合在开发过程中快速定位集成模式或最佳实践。通过 GitHub 安装,需结合项目文档验证功能细节。建议评估其对现有系统的兼容性影响。llmintegration 属于研究检索类 Skill,可作为该场景下的辅助能力补充。注意权限控制,防止意外修改关键配置。

来源仓库内路径:skills/llmintegration

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/lobbi-docs/claude --skill llmintegration;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

llmintegration 怎么安装?

在终端执行 npx skills add https://github.com/lobbi-docs/claude --skill llmintegration。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

llmintegration 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

llmintegration 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

llmintegration 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

llmintegration 用的人多吗?

公开数据是累计安装 906 次,近一周安装 37 次,下载 293 次,GitHub 11 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

llmintegration 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
llmintegration

llmintegration 搜索 · 本页

90611需要联网MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

LLM Integration Skill

Provides comprehensive LLM integration capabilities for the Golden Armada AI Agent Fleet Platform, including advanced features like extended thinking, sophisticated prompt engineering, and intelligent token budget management.

When to Use This Skill

Activate this skill when working with:

  • Claude/Anthropic API integration
  • OpenAI GPT integration
  • Google Gemini integration
  • Ollama local models
  • Multi-model orchestration
  • Prompt engineering

Anthropic Claude Integration


client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])

# Basic completion

message = client.messages.create(model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{"role": "user", "content": "Hello, Claude!"}]) print(message.content[0].text)

# With system prompt

message = client.messages.create(model="claude-sonnet-4-20250514", max_tokens=1024, system="You are a helpful coding assistant.", messages=[{"role": "user", "content": "Write a Python function to sort a list."}])

# Streaming

with client.messages.stream(model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{"role": "user", "content": "Tell me a story."}]) as stream: for text in stream.text_stream: print(text, end="", flush=True)

# Tool use

tools = [{"name": "get_weather", "description": "Get the current weather in a location", "input_schema": {"type": "object", "properties": {"location": {"type": "string", "description": "The city and state"}}, "required": ["location"]}}]

message = client.messages.create(model="claude-sonnet-4-20250514", max_tokens=1024, tools=tools, messages=[{"role": "user", "content": "What's the weather in San Francisco?"}]) ```

## OpenAI GPT Integration

client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])

Basic completion

response = client.chat.completions.create(model="gpt-4", messages=[{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello!"}]) print(response.choices[0].message.content)

Streaming

stream = client.chat.completions.create(model="gpt-4", messages=[{"role": "user", "content": "Write a poem."}], stream=True) for chunk in stream: if chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="")

Function calling

functions = [{"name": "get_weather", "description": "Get the current weather", "parameters": {"type": "object", "properties": {"location": {"type": "string"}}, "required": ["location"]}}]

response = client.chat.completions.create(model="gpt-4", messages=[{"role": "user", "content": "Weather in NYC?"}], functions=functions, function_call="auto") ```

Google Gemini Integration


genai.configure(api_key=os.environ["GOOGLE_API_KEY"])

model = genai.GenerativeModel('gemini-pro')

# Basic generation

response = model.generate_content("Explain quantum computing") print(response.text)

# Chat

chat = model.start_chat(history=[]) response = chat.send_message("Hello!") print(response.text)

# Streaming

response = model.generate_content("Tell me a story", stream=True) for chunk in response: print(chunk.text, end="") ```

## Ollama Local Models

Basic completion

response = ollama.chat(model='llama2', messages=[{'role': 'user', 'content': 'Hello!'}]) print(response['message']['content'])

Streaming

stream = ollama.chat(model='llama2', messages=[{'role': 'user', 'content': 'Tell me a story.'}], stream=True) for chunk in stream: print(chunk['message']['content'], end='')

Pull model

ollama.pull('llama2')

List models

models = ollama.list() ```

Multi-Model Abstraction


class LLMProvider(ABC): @abstractmethod def generate(self, prompt: str, **kwargs) -> str: pass

@abstractmethod def stream(self, prompt: str, **kwargs) -> Generator[str, None, None]: pass


class ClaudeProvider(LLMProvider): def **init**(self, api_key: str, model: str = "claude-sonnet-4-20250514"): self.client = anthropic.Anthropic(api_key=api_key) self.model = model

def generate(self, prompt: str, **kwargs) -> str: message = self.client.messages.create( model=self.model, max_tokens=kwargs.get('max_tokens', 1024), messages=[{"role": "user", "content": prompt}] ) return message.content[0].text

def stream(self, prompt: str, **kwargs) -> Generator[str, None, None]: with self.client.messages.stream( model=self.model, max_tokens=kwargs.get('max_tokens', 1024), messages=[{"role": "user", "content": prompt}] ) as stream: for text in stream.text_stream: yield text


class LLMFactory: @staticmethod def create(provider: str, **kwargs) -> LLMProvider: providers = {'claude': ClaudeProvider, 'gpt': GPTProvider, 'gemini': GeminiProvider, 'ollama': OllamaProvider} return providers[provider](https://github.com/lobbi-docs/claude/blob/HEAD/.claude/skills/llm-integration/**kwargs) ```

## Prompt Engineering Best Practices

Structured prompts

SYSTEM_PROMPT = """You are a helpful coding assistant.

Guidelines:

  1. Write clean, well-documented code
  2. Follow best practices
  3. Explain your reasoning """

Few-shot examples

FEW_SHOT_PROMPT = """Convert natural language to SQL.

Example 1: Input: Get all users Output: SELECT * FROM users;

Example 2: Input: Count active orders Output: SELECT COUNT(*) FROM orders WHERE status = 'active';

Input: {user_input} Output:"""

Chain of thought

COT_PROMPT = """Solve this step by step: {problem}

Let's think through this: 1.""" ```

Extended Thinking Integration

Extended thinking enables Claude models to "think" before responding, improving accuracy on complex tasks like coding, math, and scientific reasoning.

When to Use Extended Thinking

  • Complex multi-step reasoning tasks
  • Code architecture and system design
  • Mathematical problem-solving
  • Scientific analysis and research
  • Strategic planning and decision-making

Cross-reference: See .claude/skills/extended-thinking/SKILL.md for detailed guidance.

Basic Extended Thinking


client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])

# Enable extended thinking (Claude Sonnet 4 and Opus 4)

response = client.messages.create(model="claude-sonnet-4-20250514", max_tokens=16000, thinking={"type": "enabled", "budget_tokens": 10000 # Reserve tokens for thinking}, messages=[{"role": "user", "content": "Design a scalable microservices architecture for a multi-tenant SaaS platform"}])

# Response includes thinking and final text

for block in response.content: if block.type == "thinking": print(f"Thinking: {block.thinking}") elif block.type == "text": print(f"Response: {block.text}") ```

### Extended Thinking with Streaming

Stream thinking process in real-time

with client.messages.stream(model="claude-sonnet-4-20250514", max_tokens=16000, thinking={"type": "enabled", "budget_tokens": 10000}, messages=[{"role": "user", "content": "Analyze the time complexity of this sorting algorithm..."}]) as stream: for event in stream: if event.type == "content_block_start": if event.content_block.type == "thinking": print("\n[Thinking Process]") elif event.content_block.type == "text": print("\n[Final Answer]") elif event.type == "content_block_delta": if event.delta.type == "thinking_delta": print(event.delta.thinking, end="", flush=True) elif event.delta.type == "text_delta": print(event.delta.text, end="", flush=True) ```

Multi-Provider Extended Thinking Abstraction


@dataclass class ThinkingConfig: enabled: bool = False budget_tokens: Optional[int] = None show_thinking: bool = True

class ExtendedThinkingProvider: """Abstract extended thinking across providers"""

def __init__(self, provider: str, config: ThinkingConfig): self.provider = provider self.config = config

def generate_with_thinking(self, prompt: str, kwargs) -> Dict[str, Any]: if self.provider == "claude": return self._claude_thinking(prompt, kwargs) elif self.provider == "gpt": # Simulate thinking with chain-of-thought return self._gpt_cot_thinking(prompt, **kwargs) else: raise ValueError(f"Provider {self.provider} doesn't support extended thinking")

def _claude_thinking(self, prompt: str, **kwargs) -> Dict[str, Any]: client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])

thinking_params = {} if self.config.enabled: thinking_params["thinking"] = { "type": "enabled", "budget_tokens": self.config.budget_tokens or 10000 }

response = client.messages.create( model=kwargs.get("model", "claude-sonnet-4-20250514"), max_tokens=kwargs.get("max_tokens", 16000), messages=[{"role": "user", "content": prompt}], **thinking_params )

result = {"thinking": None, "response": None} for block in response.content: if block.type == "thinking": result["thinking"] = block.thinking elif block.type == "text": result["response"] = block.text

return result

def _gpt_cot_thinking(self, prompt: str, **kwargs) -> Dict[str, Any]: """Use chain-of-thought prompting for GPT models""" from openai import OpenAI client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])

cot_prompt = f"""Let's approach this step-by-step:


{prompt}

First, think through the problem systematically, then provide your final answer."""

response = client.chat.completions.create( model=kwargs.get("model", "gpt-4"), messages=[{"role": "user", "content": cot_prompt}] )

# Parse thinking from response (heuristic-based) content = response.choices[0].message.content parts = content.split("\n\n")

return { "thinking": "\n\n".join(parts[:-1]) if len(parts) > 1 else None, "response": parts[-1] if parts else content }


# Usage

thinking_provider = ExtendedThinkingProvider(provider="claude", config=ThinkingConfig(enabled=True, budget_tokens=8000))

result = thinking_provider.generate_with_thinking("Design a distributed caching strategy for a multi-tenant system")

if result["thinking"]: print(f"Thinking Process:\n{result['thinking']}\n") print(f"Final Answer:\n{result['response']}") ```

## Claude Prompt Engineering Best Practices

Based on Anthropic's official guidelines for optimal performance.

### 1. Clear and Direct Instructions

BAD: Vague request

prompt = "Make this code better"

GOOD: Specific instructions

prompt = """Refactor this Python function to:

  1. Use type hints
  2. Add comprehensive docstrings
  3. Handle edge cases (empty input, None values)
  4. Improve variable naming for clarity
  5. Add input validation

Code: {code} """ ```

2. Use XML Tags for Structure


# XML tags help Claude parse complex inputs

prompt = """Analyze this codebase and identify security vulnerabilities.

Provide output in this format: High|Medium|Low path/to/file.py 123 Clear description How to fix """ ```

### 3. Provide Examples (Few-Shot Prompting)

Now convert this user story: <user_story> {user_input} </user_story> """ ```

4. Assign Roles for Context


- Software architecture and design patterns
- Security best practices (OWASP Top 10)
- Performance optimization
- Code maintainability and readability

When reviewing code:

1. Identify bugs and potential issues
2. Suggest improvements for clarity and performance
3. Check for security vulnerabilities
4. Recommend design pattern improvements
5. Ensure code follows language best practices

Be constructive and specific in your feedback.""",

"architect": """You are a senior software architect specializing in:


- Microservices and distributed systems
- Cloud-native architecture (AWS, GCP, Azure)
- Database design and optimization
- API design (REST, GraphQL, gRPC)
- Security and compliance

When designing systems:

1. Consider scalability and performance
2. Ensure fault tolerance and resilience
3. Design for observability (logging, metrics, tracing)
4. Follow cloud-native best practices
5. Consider cost optimization""", "security_expert": """You are a security specialist focused on:

- OWASP Top 10 vulnerabilities
- Authentication and authorization (OAuth, OIDC, JWT)
- Data encryption and privacy
- Secure coding practices
- Compliance (GDPR, HIPAA, SOC2)

When analyzing security:

1. Identify vulnerabilities with severity ratings
2. Provide specific remediation steps
3. Reference security standards and best practices
4. Consider both code-level and architectural security"""}

# Usage

message = client.messages.create(model="claude-sonnet-4-20250514", max_tokens=4096, system=ROLE_BASED_SYSTEM_PROMPTS["code_reviewer"], messages=[{"role": "user", "content": f"Review this code:\n\n{code}"}]) ```

### 5. Chain of Thought Prompting

Problem: {problem}

Think through this by:

  1. Understanding what's being asked
  2. Identifying relevant information
  3. Breaking down the problem into steps
  4. Solving each step
  5. Verifying the solution

Show your work for each step."""

For complex reasoning, combine with extended thinking

response = client.messages.create(model="claude-sonnet-4-20250514", max_tokens=16000, thinking={"type": "enabled", "budget_tokens": 10000}, messages=[{"role": "user", "content": COT_PROMPT.format(problem=complex_problem)}]) ```

6. Prefill Responses for Format Control


# Force JSON output by prefilling assistant response

messages = [{"role": "user", "content": "Extract entities from: 'Apple Inc. hired John Smith as CEO in 2023.'"}, {"role": "assistant", "content": "{"} # Prefill to force JSON]

response = client.messages.create(model="claude-sonnet-4-20250514", max_tokens=1024, messages=messages)

# Claude will complete the JSON starting with "{"

json_output = "{" + response.content[0].text ```

### 7. Long Context Best Practices

For Claude's 200k token context window

LONG_CONTEXT_TEMPLATE = """I'm providing a large codebase for analysis. The most important files for this task are at the END of this message.

<critical_files> {important_files} </critical_files>

Focus primarily on the critical files when answering the task.""" ```

Token Budget Management

Anthropic Token Counting


def count_tokens_anthropic(text: str, model: str = "claude-sonnet-4-20250514") -> int: """Count tokens using Anthropic's API""" client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])

Use count_tokens endpoint

result = client.messages.count_tokens( model=model, messages=[{"role": "user", "content": text}] )

return result.input_tokens


def count_tokens_with_system(messages: list, system: str = None, model: str = "claude-sonnet-4-20250514") -> dict: """Count tokens including system prompt and messages""" client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])

params = { "model": model, "messages": messages } if system: params["system"] = system

result = client.messages.count_tokens(**params)

return { "input_tokens": result.input_tokens, "system_tokens": getattr(result, "system_tokens", 0) }

Smart Token Budget Management


class TokenBudgetManager: """Intelligent token budget management for LLM calls"""

def __init__(self, model: str = "claude-sonnet-4-20250514"): self.model = model self.client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])

# Model-specific limits self.limits = { "claude-opus-4-20250514": {"context": 200000, "output": 16384}, "claude-sonnet-4-20250514": {"context": 200000, "output": 16384}, "claude-haiku-3-5-20250514": {"context": 200000, "output": 8192}, }

def get_budget(self, model: str = None) -> Dict[str, int]: """Get token limits for model""" model = model or self.model return self.limits.get(model, {"context": 200000, "output": 16384})

def check_budget( self, messages: List[Dict], system: str = None, max_tokens: int = 4096, thinking_tokens: int = 0 ) -> Dict[str, any]: """Check if request fits within budget"""

# Count input tokens token_count = self.client.messages.count_tokens( model=self.model, messages=messages, system=system )

input_tokens = token_count.input_tokens budget = self.get_budget()

# Calculate total required tokens total_required = input_tokens + max_tokens + thinking_tokens

return { "fits_budget": total_required <= budget["context"], "input_tokens": input_tokens, "requested_output": max_tokens, "thinking_budget": thinking_tokens, "total_required": total_required, "context_limit": budget["context"], "remaining": budget["context"] - total_required, "utilization_pct": (total_required / budget["context"]) * 100 }

def optimize_for_budget( self, messages: List[Dict], system: str = None, target_output: int = 4096, thinking_tokens: int = 0, priority_last_n: int = 3 ) -> List[Dict]: """Truncate messages to fit budget, preserving recent context"""

budget = self.get_budget() available = budget["context"] - target_output - thinking_tokens

# Always keep system prompt and last N messages preserved_messages = messages[-priority_last_n:]

# Count tokens for preserved content preserved_count = self.client.messages.count_tokens( model=self.model, messages=preserved_messages, system=system ).input_tokens

if preserved_count <= available: # Try to include earlier messages remaining = available - preserved_count earlier_messages = messages[:-priority_last_n]

# Binary search to find how many earlier messages fit left, right = 0, len(earlier_messages) best_fit = 0

while left <= right: mid = (left + right) // 2 test_messages = earlier_messages[-mid:] + preserved_messages

test_count = self.client.messages.count_tokens( model=self.model, messages=test_messages, system=system ).input_tokens

if test_count <= available: best_fit = mid left = mid + 1 else: right = mid - 1

return earlier_messages[-best_fit:] + preserved_messages if best_fit > 0 else preserved_messages else: # Even preserved messages exceed budget, truncate them return preserved_messages[-1:] # Keep at least the last message

def get_recommendations(self, budget_check: Dict) -> List[str]: """Get recommendations based on budget utilization""" recommendations = []

util = budget_check["utilization_pct"]

if util > 90: recommendations.append("CRITICAL: Token usage >90%. Consider reducing context or output length.") recommendations.append("Enable extended thinking only if necessary for task complexity.") elif util > 75: recommendations.append("WARNING: Token usage >75%. Monitor context size.") recommendations.append("Consider summarizing earlier conversation turns.") elif util > 50: recommendations.append("Moderate token usage. Budget healthy.") else: recommendations.append("Low token usage. Budget has plenty of headroom.")

if budget_check["thinking_budget"] > budget_check["requested_output"]: recommendations.append("Thinking budget exceeds output budget. Ensure this is intentional.")

return recommendations


# Usage example

manager = TokenBudgetManager(model="claude-sonnet-4-20250514")

messages = [{"role": "user", "content": "What is Python?"}, {"role": "assistant", "content": "Python is a high-level programming language..."}, {"role": "user", "content": "Write a complex microservices architecture"}]

system = "You are an expert software architect."

# Check budget

budget_check = manager.check_budget(messages=messages, system=system, max_tokens=8192, thinking_tokens=10000)

print(f"Fits budget: {budget_check['fits_budget']}") print(f"Utilization: {budget_check['utilization_pct']:.1f}%") print(f"Remaining tokens: {budget_check['remaining']}")

# Get recommendations

for rec in manager.get_recommendations(budget_check): print(f"- {rec}")

# Optimize if needed

if not budget_check["fits_budget"]: optimized_messages = manager.optimize_for_budget(messages=messages, system=system, target_output=8192, thinking_tokens=10000) print(f"Reduced from {len(messages)} to {len(optimized_messages)} messages") ```

### OpenAI Token Counting

def count_tokens_openai(text: str, model: str = "gpt-4") -> int: """Count tokens for OpenAI models""" encoding = tiktoken.encoding_for_model(model) return len(encoding.encode(text))

def truncate_to_token_limit(text: str, max_tokens: int, model: str = "gpt-4") -> str: """Truncate text to fit token limit""" encoding = tiktoken.encoding_for_model(model) tokens = encoding.encode(text) if len(tokens) <= max_tokens: return text return encoding.decode(tokens[:max_tokens])

def split_by_tokens(text: str, chunk_size: int, model: str = "gpt-4") -> List[str]: """Split text into chunks of specific token size""" encoding = tiktoken.encoding_for_model(model) tokens = encoding.encode(text)

chunks = []
for i in range(0, len(tokens), chunk_size):
    chunk_tokens = tokens[i:i + chunk_size]
    chunks.append(encoding.decode(chunk_tokens))

return chunks

## Cross-References and Related Skills

### Extended Thinking

For complex reasoning tasks requiring deep analysis:

- **Skill:** `.claude/skills/extended-thinking/SKILL.md`
- **Use when:** Multi-step reasoning, architecture design, mathematical proofs

### Complex Reasoning

For advanced problem-solving and analysis:

- **Skill:** `.claude/skills/complex-reasoning/SKILL.md`
- **Use when:** System design, optimization problems, strategic planning

### Deep Analysis

For comprehensive codebase and system analysis:

- **Skill:** `.claude/skills/deep-analysis/SKILL.md`
- **Use when:** Code review, security audits, performance analysis

### Orchestration Integration

When using LLM integration within the Golden Armada orchestration system:

Log LLM API calls for tracking

logger = AgentActivityLogger()

logger.log_activity(agent_name="code-reviewer", activity_type="llm_api_call", details={"provider": "anthropic", "model": "claude-sonnet-4-20250514", "input_tokens": 1500, "output_tokens": 800, "thinking_tokens": 3000, "extended_thinking": True, "task": "security_audit"}) ```

Model Selection Guide

Claude Models

ModelBest ForContextOutputCost
Opus 4Complex reasoning, architecture design200K16KHighest
Sonnet 4General development, balanced performance200K16KMedium
Haiku 3.5Fast tasks, simple queries, high throughput200K8KLowest

Extended Thinking: Only available on Sonnet 4 and Opus 4

When to Use Each Model


def select_model(task_type: str, use_thinking: bool = False) -> str: """Select appropriate model based on task""" model = MODEL_SELECTION.get(task_type, "claude-sonnet-4-20250514")

Ensure model supports extended thinking if requested

if use_thinking and "haiku" in model: model = "claude-sonnet-4-20250514"

return model

Performance Optimization Tips

1. Prompt Caching (Reduce Costs)


# Cache large system prompts or context

response = client.messages.create(model="claude-sonnet-4-20250514", max_tokens=4096, system=[{"type": "text", "text": large_system_prompt, "cache_control": {"type": "ephemeral"} # Cache this}], messages=[{"role": "user", "content": "Question about the system"}]) ```

### 2. Batch Processing
async def process_item(item: str):
    # Async LLM call
    return await async_llm_call(item)

results = []
for i in range(0, len(items), batch_size):
    batch = items[i:i + batch_size]
    batch_results = await asyncio.gather(*[process_item(item) for item in batch])
    results.extend(batch_results)

    # Rate limiting
    if i + batch_size < len(items):
        await asyncio.sleep(1)

return results

### 3. Streaming for Responsiveness

Always use streaming for long-running tasks

with client.messages.stream(model="claude-sonnet-4-20250514", max_tokens=8192, messages=[{"role": "user", "content": complex_task}]) as stream: for text in stream.text_stream: yield text # Stream to UI or process incrementally ```

平台分布

Claude Code

27.9%
按下载量换算82

Gemini CLI

26.15%
按下载量换算77

Antigravity

17.86%
按下载量换算52

windsurf

14.13%
按下载量换算41

Codex

8.84%
按下载量换算26

OpenCode

3.36%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills