windmill-labs / write-script-java
Install for your project team
Run this command in your project directory to install the skill for your entire team:
mkdir -p .claude/skills/write-script-java && curl -L -o skill.zip "https://fastmcp.me/Skills/Download/2049" && unzip -o skill.zip -d .claude/skills/write-script-java && rm skill.zip
Project Skills
This skill will be saved in .claude/skills/write-script-java/ and checked into git. All team members will have access to it automatically.
Important: Please verify the skill by reviewing its instructions before using it.
MUST use when writing Java scripts.
1 views
0 installs
Skill Content
---
name: write-script-java
description: MUST use when writing Java scripts.
---
## CLI Commands
Place scripts in a folder. After writing, run:
- `wmill script generate-metadata` - Generate .script.yaml and .lock files
- `wmill sync push` - Deploy to Windmill
Use `wmill resource-type list --schema` to discover available resource types.
# Java
The script must contain a Main public class with a `public static main()` method:
```java
public class Main {
public static Object main(String name, int count) {
java.util.Map<String, Object> result = new java.util.HashMap<>();
result.put("name", name);
result.put("count", count);
return result;
}
}
```
**Important:**
- Class must be named `Main`
- Method must be `public static Object main(...)`
- Return type is `Object` or `void`
## Maven Dependencies
Add dependencies using comments at the top:
```java
//requirements:
//com.google.code.gson:gson:2.10.1
//org.apache.httpcomponents:httpclient:4.5.14
import com.google.gson.Gson;
public class Main {
public static Object main(String input) {
Gson gson = new Gson();
return gson.fromJson(input, Object.class);
}
}
```