From b34963c507713ebe107deffd5a2d58c41118bf88 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 10 Apr 2026 16:01:35 +0000 Subject: [PATCH 1/5] Add skills-jar-maven-plugin to publish skills to Maven Adds the ca.weblite:skills-jar-plugin:0.1.0 to the parent POM so that `mvn package` produces a -skills.jar artifact alongside the library JARs. The existing skills/teavm-lambda/ directory is automatically detected. https://claude.ai/code/session_0172wqpFrZND6awWEfCg9Miq --- pom.xml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pom.xml b/pom.xml index 35da20f..5fddc84 100644 --- a/pom.xml +++ b/pom.xml @@ -278,6 +278,13 @@ + + + github + https://maven.pkg.github.com/webliteca/skills-jar-maven-plugin + + + @@ -290,6 +297,21 @@ true + + ca.weblite + skills-jar-plugin + 0.1.0 + false + + + skills-jar + package + + package + + + + From 19c0c942e1f03f5325c77b8d326dd782a1a302d5 Mon Sep 17 00:00:00 2001 From: Steve Hannah Date: Fri, 10 Apr 2026 16:37:13 +0000 Subject: [PATCH 2/5] Fix CI: authenticate to GitHub Packages for skills-jar-plugin - Update skills-jar-plugin from 0.1.0 to 0.1.1 - Add skillDirectory config pointing to skills/teavm-lambda - Configure PACKAGES_READ_TOKEN secret in CI build step for GitHub Packages authentication Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 6 ++++++ pom.xml | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bfd5ca..4cfb2cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,9 +19,15 @@ jobs: java-version: '21' distribution: 'temurin' cache: maven + server-id: github + server-username: GITHUB_ACTOR + server-password: PACKAGES_READ_TOKEN - name: Build all modules run: mvn -B clean package -DskipTests + env: + GITHUB_ACTOR: ${{ github.actor }} + PACKAGES_READ_TOKEN: ${{ secrets.PACKAGES_READ_TOKEN }} - name: Check SPI platform parity run: ./check-spi-parity.sh diff --git a/pom.xml b/pom.xml index 5fddc84..3395de9 100644 --- a/pom.xml +++ b/pom.xml @@ -300,8 +300,11 @@ ca.weblite skills-jar-plugin - 0.1.0 + 0.1.1 false + + ${project.basedir}/skills/teavm-lambda + skills-jar From ec538bc941f2b8f7bffb4542c7ee8abc2491da37 Mon Sep 17 00:00:00 2001 From: Steve Hannah Date: Fri, 10 Apr 2026 16:45:28 +0000 Subject: [PATCH 3/5] Move skills-jar-plugin to Maven profile to fix Docker builds The skills-jar-plugin requires GitHub Packages auth to resolve. Moving it and its pluginRepository into a 'skills-jar' profile prevents Docker builds (which lack auth) from failing. The CI build job activates the profile explicitly with -P skills-jar. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 2 +- pom.xml | 56 ++++++++++++++++++++++------------------ 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4cfb2cf..e73c321 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: server-password: PACKAGES_READ_TOKEN - name: Build all modules - run: mvn -B clean package -DskipTests + run: mvn -B clean package -DskipTests -P skills-jar env: GITHUB_ACTOR: ${{ github.actor }} PACKAGES_READ_TOKEN: ${{ secrets.PACKAGES_READ_TOKEN }} diff --git a/pom.xml b/pom.xml index 3395de9..0156654 100644 --- a/pom.xml +++ b/pom.xml @@ -278,13 +278,6 @@ - - - github - https://maven.pkg.github.com/webliteca/skills-jar-maven-plugin - - - @@ -297,28 +290,41 @@ true - - ca.weblite - skills-jar-plugin - 0.1.1 - false - - ${project.basedir}/skills/teavm-lambda - - - - skills-jar - package - - package - - - - + + skills-jar + + + github + https://maven.pkg.github.com/webliteca/skills-jar-maven-plugin + + + + + + ca.weblite + skills-jar-plugin + 0.1.1 + false + + ${project.basedir}/skills/teavm-lambda + + + + skills-jar + package + + package + + + + + + + sign-artifacts From 0cd525d9808a45764f831e6d207190539214da47 Mon Sep 17 00:00:00 2001 From: Steve Hannah Date: Fri, 10 Apr 2026 16:52:12 +0000 Subject: [PATCH 4/5] Activate skills-jar profile in deploy job Ensures the skills JAR is built and deployed alongside library artifacts when publishing to GitHub Packages. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e73c321..70aa4fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -290,8 +290,11 @@ jobs: distribution: 'temurin' cache: maven server-id: github + server-username: GITHUB_ACTOR + server-password: GITHUB_TOKEN - name: Deploy snapshots to GitHub Packages - run: mvn -B clean package org.apache.maven.plugins:maven-deploy-plugin:3.1.2:deploy -DskipTests -DaltDeploymentRepository=github::https://maven.pkg.github.com/webliteca/teavm-lambda + run: mvn -B clean package org.apache.maven.plugins:maven-deploy-plugin:3.1.2:deploy -DskipTests -P skills-jar -DaltDeploymentRepository=github::https://maven.pkg.github.com/webliteca/teavm-lambda env: + GITHUB_ACTOR: ${{ github.actor }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7ae2ec8d723c25fe6c885d90d10543895245e94e Mon Sep 17 00:00:00 2001 From: Steve Hannah Date: Fri, 10 Apr 2026 16:59:22 +0000 Subject: [PATCH 5/5] Add Claude Code skill installation instructions to README and CLAUDE.md Documents how to install the teavm-lambda skill from GitHub Packages (via skills JAR) or from source, for both project-level and user-level use. Also documents how to build the skill JAR locally. Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 36 ++++++++++++++++++++++++++++++++++++ README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 7a70db0..a3ee867 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -150,6 +150,42 @@ Multi-module Maven project: | `jvm-server` | javac → bytecode, maven-shade uber JAR | Single JAR in `target/` | `teavm-lambda-adapter-httpserver` | | `jvm-war` | javac → bytecode, maven-war WAR | WAR file in `target/` | `teavm-lambda-adapter-war` | +## Claude Code Skill + +A Claude Code skill is packaged from `skills/teavm-lambda/` via the `skills-jar` Maven profile. The skill JAR is deployed to GitHub Packages alongside the library artifacts. + +### Building the skill JAR + +```bash +mvn clean package -P skills-jar +# Produces target/teavm-lambda-parent-0.1.0-SNAPSHOT-skills.jar +``` + +The `skills-jar` profile requires GitHub Packages authentication (configured in CI via `PACKAGES_READ_TOKEN`). Builds without the profile skip the plugin entirely. + +### Installing the skill + +```bash +# From source (into another project) +cp -r skills/teavm-lambda /path/to/project/.claude/skills/teavm-lambda + +# From source (user-level, all projects) +cp -r skills/teavm-lambda ~/.claude/skills/teavm-lambda + +# From GitHub Packages JAR +mvn dependency:copy -Dartifact=ca.weblite:teavm-lambda-parent:0.1.0-SNAPSHOT:jar:skills \ + -DoutputDirectory=/tmp/teavm-lambda-skill -Dmdep.stripVersion=true +mkdir -p ~/.claude/skills/teavm-lambda +unzip -o /tmp/teavm-lambda-skill/teavm-lambda-parent-skills.jar -d ~/.claude/skills/teavm-lambda +``` + +### Skill contents + +- `SKILL.md` — main skill definition (quickstart, annotations, API reference, middleware, deployment) +- `references/` — 12 deep-dive docs (API signatures, pom.xml templates, routing, security, database, deployments, gotchas) +- `assets/examples/` — 4 starter projects (minimal-hello, crud-postgres, jwt-protected, cloudrun-deploy) +- `scripts/` — `generate-api-signatures.sh` regenerates `references/api-signatures.md` from source + ## Code Conventions - Standard Maven layout: `src/main/java/` diff --git a/README.md b/README.md index 7878af3..22c9765 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,47 @@ Path traversal is blocked and MIME types are detected from file extensions. | `teavm-lambda-demo` | Demo REST API for AWS Lambda | | `teavm-lambda-demo-cloudrun` | Demo REST API + static web UI for Cloud Run | +## Claude Code Skill + +This project ships a [Claude Code](https://claude.ai/code) skill that teaches Claude how to build, deploy, and debug teavm-lambda applications. It includes API references, pom.xml templates, example projects, and common gotchas. + +### Install from GitHub Packages + +Download and extract the skills JAR into your project or home directory: + +```bash +# Project-level (applies to this project only) +mvn dependency:copy -Dartifact=ca.weblite:teavm-lambda-parent:0.1.0-SNAPSHOT:jar:skills \ + -DoutputDirectory=/tmp/teavm-lambda-skill \ + -Dmdep.stripVersion=true +mkdir -p .claude/skills/teavm-lambda +unzip -o /tmp/teavm-lambda-skill/teavm-lambda-parent-skills.jar -d .claude/skills/teavm-lambda + +# Or user-level (applies to all your projects) +mkdir -p ~/.claude/skills/teavm-lambda +unzip -o /tmp/teavm-lambda-skill/teavm-lambda-parent-skills.jar -d ~/.claude/skills/teavm-lambda +``` + +### Install from source + +If you have the teavm-lambda repo cloned: + +```bash +# Project-level +cp -r /path/to/teavm-lambda/skills/teavm-lambda .claude/skills/teavm-lambda + +# Or user-level +cp -r /path/to/teavm-lambda/skills/teavm-lambda ~/.claude/skills/teavm-lambda +``` + +### What's included + +| Directory | Contents | +|-----------|----------| +| `SKILL.md` | Main skill definition — quickstart, annotations, API reference, middleware, deployment | +| `references/` | 12 deep-dive docs: API signatures, pom.xml templates, routing, security, database, deployments, gotchas | +| `assets/examples/` | 4 starter projects: minimal-hello, crud-postgres, jwt-protected, cloudrun-deploy | + ## Testing ```bash