fc-java-website
Build and deploy a Java website/app on function-compute (Aliyun FC 3.0 built-in java11 runtime, handler example.App::handleRequest).
Skill by Reyvic925
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/reyvic925-fc-java-website
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, backend, devops, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/fc-java-website
What's inside
- Skill name
fc-java-website- Description
- Build and deploy a Java website/app on function-compute (Aliyun FC 3.0 built-in java11 runtime, handler example.App::handleRequest). Use when an Agent creates an environment="java" function and uploads COMPILED bytecode (a class implementing com.aliyun.fc.runtime.StreamRequestHandler) — the runtime does NOT compile source (ship .class, not .java; source returns 502), and fc-java-core is provided at runtime. Covers the StreamRequestHandler contract, a verified example, compile+zip, and the create + upload-to-LATEST API (a human publishes). 在 function-compute(阿里云 FC 3.0 内置 java11 运行时,处理函数 example.App::handleRequest)上构建并部署 Java 网站/应用。当 Agent 用 environment="java" 创建函数并上传【已编译】字节码(实现 com.aliyun.fc.runtime.StreamRequestHandler 的类)时使用——运行时【不会】编译源码 (上传 .class 而非 .java,源码会返回 502),fc-java-core 由运行时提供。涵盖 StreamRequestHandler 契约、经验证示例、编译+打包,以及创建与上传到 LATEST 的 API (由人工发布)。
- License
- MIT
- Instructions
- 385 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (2)
- .bundled-hash
- SKILL.md
SKILL.md (first lines)
# Deploy a Java website on function-compute / 在 function-compute 上部署 Java 网站
## AutoClaw managed-delivery boundary (highest priority) / 受控交付边界(最高优先级)
When `website_delivery_start` or `AUTOCLAW_FUNCTION_COMPUTE_WEBSITE_PROTOCOL`
is active, **do not call `/functionCompute`, read/request/store/output a JWT, or
execute this Skill's curl commands.** API sections are reference-only. Build,
package, and verify the artifact locally; AutoClaw Main owns create/upload, and
the human owns publication. The current managed automatic-preview path supports
nginx only, so do not add an nginx `autoPreview` marker for a Java package.
当 `website_delivery_start` 或 `AUTOCLAW_FUNCTION_COMPUTE_WEBSITE_PROTOCOL`
生效时,**禁止调用 `/functionCompute`、读取/索取/保存/输出 JWT,禁止执行本 Skill 的 curl。**
API 章节仅作参考;Agent 只负责本地构建、打包与验证,创建和上传由 AutoClaw Main 负责,
正式发布由用户负责。当前自动预览仅支持 nginx,Java 产物不得写 nginx `autoPreview` 标记。
## English
### 1. What the `java` environment is
The `java` environment runs on the **Aliyun FC 3.0 built-in `java11` runtime**. It is
**handler-based** (not a long-running server): FC invokes one method per HTTP request.
> **CRITICAL — this runtime does NOT compile source.** You MUST ship **compiled
> bytecode** (`.class` files). Shipping `App.java` as source returns **HTTP 502**. The
> deployable artifact is a zip of compiled classes, e.g. `example/App.class` at the zip
> root.
| Property | Value |
| --- | --- |
| Runtime | `java11` (built-in, Java 11) |
| Handler | `example.App::handleRequest` (fixed by the preset) |
| Memory | 512 MB |
| CPU | 0.35 vCPU |
| Disk | 512 MB |
| Timeout | 60 s per request |
| Instance concurrency | 1 |
| Code location | Extracted to `/code` inside the instance |
| Classpath | `/code` plus `/code/lib/*.jar` |
| Port | none — this is a handler runtime, do NOT open a socket |
Constraints to respect:
- **Ship compiled `.class`, never `.java`.** The built-in runtime executes your bytecode;
it does not run a compiler. A source zip fails with HTTP 502.
- The handler string is **`example.App::handleRequest`**. Your compiled class must be
`example.App`, implementing `com.aliyun.fc.runtime.StreamRequestHandler`. Do not rename
it unless you also change the function's handler (the preset does not).
- One request per instance (concurrency 1); keep per-request work under the 60 s timeout.
- No inbound port and no custom start command — FC calls your method directly.
### 2. The handler contract
Your class **must implement `com.aliyun.fc.runtime.StreamRequestHandler`** and override:
```java
void handleRequest(InputStream input, OutputStream output, Context context)
```
- **`fc-java-core` is PROVIDED by the FC java11 runtime.** `com.aliyun.fc.runtime.Context`
and `com.aliyun.fc.runtime.StreamRequestHandler` exist on the runtime classpath. **Do
NOT bundle `fc-java-core`** in your zip — only compile against it (as a `provided`
Maven dependency, or against a tiny stub of the two interfaces) and ship your own class.
- The request arrives as the **v1 event JSON** on the `InputStream`.
- You write the **v1 response JSON** — `{statusCode, headers, body, isBase64Encoded}` —
as UTF-8 bytes to the `OutputStream`, then flush.
Response JSON fields:
- `statusCode` — integer HTTP status.
- `headers` — object of response headers (set `content-type`).
- `body` — the response body as a string (HTML/JSON/text). Escape it inside the JSON.
- `isBase64Encoded` — `true` if `body` is base64-encoded binary; `false` for text.
### 3. Verified working example (use verbatim)
This exact class is what the platform's built-in Java example ships as a compiled
`App.class`, and it is verified to return **HTTP 200**:
```java
package example;
import com.aliyun.fc.runtime.Context;
import com.aliyun.fc.runtime.StreamRequestHandler;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
public class App implements StreamRequestHandler {
@Override
public void handleRequest(InputStream input, OutputStream output, Context context) throws IOException {
String html = "<html><body><h1>Hello from Function Compute (Java)</h1></body></html>";
String body = html.replace("\\", "\\\\").replace("\"", "\\\"");
String resp = "{\"statusCode\":200,\"headers\":{\"content-type\":\"text/html; charset=utf-8\"},\"body\":\"" + body + "\",\"isBase64Encoded\":false}";
output.write(resp.getBytes(StandardCharsets.UTF_8));
output.flush();
}
}
```
### 4. File-structure contract
The uploaded `.zip` must contain **compiled classes** that satisfy the
`example.App::handleRequest` handler — `example.App` implementing
`StreamRequestHandler`. Put your compiled `example/App.class` at the **zip root** (it
extracts to `/code/example/App.class`). The classpath is rooted at `/code` plus
`/code/lib/*.jar`, so dependency jars go under `lib/`. **No `App.java`. No bundled
`fc-java-core`.**
```
your.zip
├── example/
│ └── App.class # compiled example.App (implements StreamRequestHandler)
└── lib/ # optional: your dependency jars on the classpath
└── *.jar # do NOT put fc-java-core here — it is provided by the runtime
```
The zip is valid as long as the compiled class `example.App` (with the
`handleRequest(InputStream, OutputStream, Context)` method) resolves on the runtime
classpath rooted at `/code`.
### 5. Build recipeFrom Reyvic925/tradingwebsite, MIT.
More from Reyvic925/tradingwebsite
- 0.524score
fc-nextjs-website
Reyvic925
Build, package, and deploy a Next.js SSR/SSG app on function-compute's "nextjs" environment — Aliyun FC custom runtime (custom.debian10, Node.js 20), started…
SkillBFreshness: BClaude Code +9 - 0.524score
fc-nginx-website
Reyvic925
Build, package, and deploy a static website (HTML/CSS/JS/images or any pre-built SPA output) on the function-compute service's "nginx" environment, which runs…
SkillBFreshness: BClaude Code +9 - 0.524score
fc-nodejs-website
Reyvic925
Build and deploy a Node.js website/app on the function-compute service (Aliyun FC 3.0 built-in nodejs20 runtime).
SkillBFreshness: BClaude Code +9 - 0.524score
fc-python-website
Reyvic925
Build and deploy a Python website or HTTP app on function-compute (Aliyun FC 3.0, runtime python3.12).
SkillBFreshness: BClaude Code +9 - 0.515score
autoclaw-mcp-tools
Reyvic925
Use when users ask to access configured MCP services, external data providers, stocks, funds, macro data, news, files, databases, or mention mcporter/MCP tools.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 19, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Reyvic925/tradingwebsite
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Reyvic925
- 0.524score
fc-nextjs-website
Reyvic925
Build, package, and deploy a Next.js SSR/SSG app on function-compute's "nextjs" environment — Aliyun FC custom runtime (custom.debian10, Node.js 20), started…
SkillBFreshness: BClaude Code +9 - 0.524score
fc-nginx-website
Reyvic925
Build, package, and deploy a static website (HTML/CSS/JS/images or any pre-built SPA output) on the function-compute service's "nginx" environment, which runs…
SkillBFreshness: BClaude Code +9 - 0.524score
fc-nodejs-website
Reyvic925
Build and deploy a Node.js website/app on the function-compute service (Aliyun FC 3.0 built-in nodejs20 runtime).
SkillBFreshness: BClaude Code +9 - 0.524score
fc-python-website
Reyvic925
Build and deploy a Python website or HTTP app on function-compute (Aliyun FC 3.0, runtime python3.12).
SkillBFreshness: BClaude Code +9 - 0.515score
autoclaw-mcp-tools
Reyvic925
Use when users ask to access configured MCP services, external data providers, stocks, funds, macro data, news, files, databases, or mention mcporter/MCP tools.
SkillBFreshness: BClaude Code +9
Cite this page
fc-java-website skill. Agent Mart. https://agentmart.dev/skills/reyvic925-fc-java-website (last updated 2026-10-24)