spring-ai
Provides comprehensive guidance for Spring AI including AI model integration, prompt templates, vector stores, and AI applications. Use when the user asks about Spring AI, needs to integrate AI models, implement RAG applications, or work with AI services in Spring.
npx skills add majiayu000/claude-skill-registry --skill spring-ai --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Spring AI 开发指南 ## 概述 Spring AI 是 Spring 官方提供的 AI 应用开发框架,简化了与各种大语言模型(LLM)的集成,包括 OpenAI、Anthropic、Azure OpenAI 等。 ## 核心功能 ### 1. 项目创建 **依赖**: ```xml <dependency> <groupId>org.springframework.ai</groupId> <artifactId>spring-ai-openai-spring-boot-starter</artifactId> </dependency> ``` **或使用 Gradle**: ```gradle dependencies { implementation 'org.springframework.ai:spring-ai-openai-spring-boot-starter' } ``` ### 2. Chat Client **配置**: ```yaml spring: ai: openai: api-key: ${OPENAI_API_KEY} chat: options: model: gpt-4 temperature: 0.7 ``` **使用 ChatClient**: ```java @Service public class ChatService { private final ChatClient chatClient; public ChatService(ChatClient chatClient) { this.chatClient = chatClient; } public String chat(String message) { return chatClient.call(message); } public String chatWithPrompt(String userMessage) { Prompt prompt = new Prompt(new UserMessage(userMessage)); ChatResponse response = chatClient.call(prompt); return response.getResult().getOutput().getContent(); } } ``` **流式响应**: ```java @Service public class ChatService { private final StreamingChatClient streamingChatClient; public ChatService(StreamingChatClient streamingChatClient) { this.streamingChatClie
- 概述
- 核心功能
- 1. 项目创建
- 2. Chat Client
- 3. Prompt Template
- 4. Embedding
- 5. Vector Store
- 6. Function Calling
- 7. 多模型支持
- 最佳实践
- 1. 配置管理
- 2. 错误处理
- 3. 性能优化
- 4. 成本控制
What does the spring-ai skill do?
Provides comprehensive guidance for Spring AI including AI model integration, prompt templates, vector stores, and AI applications. Use when the user asks about Spring AI, needs to integrate AI models, implement RAG applications, or work with AI services in Spring.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill spring-ai --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
