Agentscope Java
Automates Java code generation, testing, and documentation using AI, streamlining backend development workflows.
Install on your platform
We auto-selected Claude Code based on this skillβs supported platforms.
Run in terminal (recommended)
claude mcp add agentscope-java npx -- -y @trustedskills/agentscope-java
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"agentscope-java": {
"command": "npx",
"args": [
"-y",
"@trustedskills/agentscope-java"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill, Agentscope Java, automates Java code generation, testing, and documentation for backend development workflows. It provides specific guidelines and constraints to ensure generated code adheres to AgentScope's architectural patterns and best practices, particularly around asynchronous operations using Reactor (Mono/Flux) and proper API usage within the AgentScope framework. The skill aims to streamline development by providing a consistent coding style and preventing common errors.
When to use it
- When you need to generate Java code for backend services that integrate with AgentScope.
- For creating agents, models, and messages using the Builder pattern.
- To ensure asynchronous operations are handled correctly using
MonoandFlux. - When implementing error handling and logging within your AgentScope applications.
- Generating tool integrations following specific API conventions.
Key capabilities
- Automated Java code generation adhering to AgentScope standards.
- Enforcement of Reactor-based asynchronous programming (
Mono,Flux). - Guidance on using the Builder pattern for agent and model creation.
- Specific instructions for error handling, logging (SLF4J), and API usage within the AgentScope framework.
- Correct import path enforcement:
io.agentscope.core.model.*
Example prompts
- "Write a Java function to create a DashScopeChatModel."
- "Generate code for an agent that uses a tool with the name 'my_tool'."
- "Create a ToolResultBlock and extract the output from it, ensuring proper error handling."
Tips & gotchas
- Critical: Avoid using
.block(),Thread.sleep(),ThreadLocal, or hardcoded API keys in generated code. UseMono.delay()instead ofThread.sleep(). - Always use
System.getenv()for retrieving sensitive information like API keys. - Pay close attention to the specific API methods and import paths as outlined in the skill's documentation β many have changed or donβt exist. Refer to the provided examples for correct usage.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates β what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
π Community
Passed automated security scans.