agentscope-java skill

Skill for Claude Code and Cursor that teaches reactive AgentScope Java code and steers clear of common dependency mistakes.

  • 6,362 ★ on the repository
  • Last commit
  • Apache-2.0
Skill

Minimal access

Why this level

  • The skill is plain instructions and runs nothing by itself.
All reasons and checks

agentscope-ai/agentscope-java

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/agentscope-java

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Minimal accessThe tool runs nothing and makes no network calls.

  • The skill is plain instructions and runs nothing by itself.

This is third-party code. Review the repository files before installing.

What it does

The `SKILL.md` at the root of the AgentScope Java repository gives the agent rules for Java code on this framework. It forbids `.block()` outside `main()` and tests, `Thread.sleep()` and `ThreadLocal`, requires keys from environment variables and shows correct module names and import paths. The file walks through framework abstractions, writing agents and tools, the hook system, pipelines, memory, MCP integration and testing with `StepVerifier`. A section of common pitfalls comes with ready fixes.

Who it is for. Java developers building agents on AgentScope who ask Claude Code or Cursor to write code without reactive mistakes.

Good fit when

  • The agent writes a first `ReActAgent` and must pick the right Maven dependencies.
  • An external MCP server has to be connected to an AgentScope agent.
  • Agent code needs tests on `StepVerifier` without blocking calls.
  • Several agents are assembled into a sequential or fanout pipeline.

Not a fit when

  • The project is not Java or does not use AgentScope.
  • Current version numbers are needed: the skill example shows release 1.0.12.
  • You need the framework itself without agent hints: it is added as a Maven dependency.

Example request

Write an AgentScope Java agent with one tool and a `StepVerifier` test, with no blocking calls.

Limitations

The skill targets Java 17 or newer, Maven or Gradle and some Project Reactor knowledge. Its versions lag behind the documentation: the skill shows release 1.0.12 while the project README names 2.0.3, so check the number against Maven Central. There is no dedicated install command for the skill: the file is copied by hand. The skill teaches a coding style and does not enforce it. The framework itself is added as a dependency and is not part of this card.

How to disable. Delete the copied skill folder from `.claude/skills` or the Cursor skills directory. The skill does not touch AgentScope dependencies in `pom.xml`.

FAQ

Which agents is the skill written for?

The compatibility field names Claude Code and Cursor. Java 17 or newer and Maven or Gradle are required.

Why does the skill forbid `.block()`?

AgentScope is built on Project Reactor and a blocking call breaks the reactive chain. The skill allows `.block()` only in `main()` and in tests.

Where do model keys come from?

From environment variables via `System.getenv()`. The skill forbids hardcoded keys.

What does the skill say about dependency names?

It lists non-existent artifacts such as `agentscope-model-dashscope` and shows working ones. Model providers live in the `io.agentscope.extensions.model` modules.

What if the version in the skill is outdated?

Take the current number from Maven Central or the project README. The skill shows release 1.0.12 while the README names 2.0.3.

Discussion

No questions or reviews yet.

Skills

Skills for AgentScope and QwenPaw: framework API guidance, agent memory, schedules, browser control, mail and multi-agent flows.

SkillExtended access135Repository stars

A multi-agent harness that verifies results by artifacts: stop hooks, an independent judge and an event log for Claude Code, Codex, Cursor and more

CLIBroad access1.4KRepository stars

A plugin of seven skills for Claude Code and Codex: prompts, subagents, skill authoring, editing, web search and a browser.

PluginExtended access64Repository stars

A catalog of nearly two hundred skills: code delivery, review, debugging, AI governance, product work and agent coordination.

SkillMinimal access175Repository stars

AI Builder Club Skills

AI Builder Club — Skills

A Claude Code plugin marketplace to make a repo agent-ready and run compounding agent loops

PluginBroad access1.3KRepository stars

A tool that builds tested skills from a real workflow and governs their lifecycle through your own marketplace

PluginExtended access2.4KRepository stars

README in short

The project documentation covers the framework itself: the event system, tool-call permissions, sandboxing, multi-agent orchestration and model modules. The skill at the repository root turns that into practical coding rules.

README badge

Original SKILL.md

---
name: agentscope-java
description: Expert Java developer skill for AgentScope Java framework - a reactive, message-driven multi-agent system built on Project Reactor. Use when working with reactive programming, LLM integration, agent orchestration, multi-agent systems, or when the user mentions AgentScope, ReActAgent, Mono/Flux, Project Reactor, or Java agent development. Specializes in non-blocking code, tool integration, hooks, pipelines, and production-ready agent applications.
license: Apache-2.0
compatibility: Designed for Claude Code and Cursor. Requires Java 17+, Maven/Gradle, and familiarity with reactive programming concepts.
metadata:
  framework: AgentScope Java
  language: Java 17+
  paradigm: Reactive Programming
  core-library: Project Reactor
  version: "1.0"
---

When the user asks you to write AgentScope Java code, follow these instructions carefully.

## CRITICAL RULES - NEVER VIOLATE THESE

**🚫 ABSOLUTELY FORBIDDEN:**
1. **NEVER use `.block()` in example code** - This is the #1 mistake. Only use `.block()` in `main()` methods or test code when explicitly creating a runnable example.
2. **NEVER use `Thread.sleep()`** - Use `Mono.delay()` instead.
3. **NEVER use `ThreadLocal`** - Use Reactor Context with `Mono.deferContextual()`.
4. **NEVER hardcode API keys** - Always use `System.getenv()`.
5. **NEVER ignore errors silently** - Always log errors and provide fallback values.
6. **NEVER use wrong import paths** - Shared model interfaces are in `io.agentscope.core.model.*`; provider models are in `io.agentscope.extensions.model.<provider>.*`.

**✅ ALWAYS DO:**
1. **Use `Mono` and `Flux`** for all asynchronous operations.
2. **Chain operations** with `.map()`, `.flatMap()`, `.then()`.
3. **Use Builder pattern** for creating agents, models, and messages.
4. **Include error handling** with `.onErrorResume()` or `.onErrorReturn()`.
5. **Add logging** with SLF4J for important operations.
6. **Use correct imports**: `import io.agentscope.extensions.model.dashscope.DashScopeChatModel;`
7. **Use correct APIs** (many methods don't exist or have changed):
   - `toolkit.registerTool()` NOT `registerObject()`
   - `toolkit.getToolNames()` NOT `getTools()`
   - `event.getToolUse().getName()` NOT `getToolName()`
   - `result.getOutput()` NOT `getContent()` (ToolResultBlock)
   - `event.getToolResult()` NOT `getResult()` (PostActingEvent)
   - `toolUse.getInput()` NOT `getArguments()` (ToolUseBlock)
   - Model builder: NO `temperature()` method, use `defaultOptions(GenerateOptions.builder()...)`
   - Hook events: NO `getMessages()`, `getResponse()`, `getIterationCount()`, `getThinkingBlock()` methods
   - ToolResultBlock: NO `getToolUseName()` method, use `event.getToolUse().getName()` instead
   - ToolResultBlock.getOutput() returns `List<ContentBlock>` NOT `String`, need to convert
   - **@ToolParam format**: MUST use `@ToolParam(name = "x", description = "y")` NOT `@ToolParam(name="x")`

Report a problem