Skip to content

Commit 825e314

Browse files
authored
Merge pull request #1041 from stephanj/feature/issue-1040-skills
Introduce langchain4j Skills + rename Custom Prompts to Commands (#1040)
2 parents 1ec30a3 + 0fcf64b commit 825e314

45 files changed

Lines changed: 2598 additions & 293 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/claude-code-review.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ on:
1212

1313
jobs:
1414
claude-review:
15-
# Optional: Filter by PR author
16-
# if: |
17-
# github.event.pull_request.user.login == 'external-contributor' ||
18-
# github.event.pull_request.user.login == 'new-developer' ||
19-
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
15+
# Skip on fork PRs: GitHub strips id-token: write for pull_request events
16+
# from forks, so the OIDC fetch fails regardless of the permissions block.
17+
# The job is silently absent on fork PRs instead of always failing red.
18+
if: github.event.pull_request.head.repo.full_name == github.repository
2019

2120
runs-on: ubuntu-latest
2221
permissions:

.lychee.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ exclude = [
2929
"https://genie\\.devoxx\\.com/.*\\.md",
3030
# Static images served by Docusaurus — not present on the live site at these paths.
3131
"https://genie\\.devoxx\\.com/static/img/.*",
32+
# New doc pages added in this PR — will exist on the live site after next deploy.
33+
# TODO(post-deploy): remove these two lines once the renamed/new pages are live.
34+
"https://genie\\.devoxx\\.com/docs/features/commands$",
35+
"https://genie\\.devoxx\\.com/docs/features/skills$",
3236
# Placeholder/example URLs used in documentation snippets.
3337
"https://github\\.com/myproject/.*",
3438
"https://wiki\\.example\\.com/.*",
@@ -37,6 +41,8 @@ exclude = [
3741
"https://platform\\.openai\\.com/.*",
3842
# JetBrains support blocks automated crawlers with 403
3943
"https://intellij-support\\.jetbrains\\.com/.*",
44+
# Intel support blocks automated crawlers with 403
45+
"https://www\\.intel\\.com/.*",
4046
]
4147

4248
# GitHub token is passed via GITHUB_TOKEN env var (set by lychee-action)

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ dependencies {
258258
implementation("dev.langchain4j:langchain4j-chroma:$lg4j_beta_version")
259259
implementation("dev.langchain4j:langchain4j-mcp:$lg4j_beta_version")
260260
implementation("dev.langchain4j:langchain4j-reactor:$lg4j_beta_version")
261+
implementation("dev.langchain4j:langchain4j-skills:$lg4j_beta_version")
261262
implementation(platform("software.amazon.awssdk:bom:$awsSdkVersion"))
262263
implementation("software.amazon.awssdk:bedrock")
263264
implementation("software.amazon.awssdk:sts")
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
---
2+
slug: commands-and-skills
3+
title: From Slash Commands to LLM-Activated Skills
4+
authors: [stephanj]
5+
tags: [skills, commands, agent mode, langchain4j, claude, codex, gemini, IntelliJ IDEA]
6+
date: 2026-05-18
7+
description: DevoxxGenie now supports portable SKILL.md files shared with Claude Code, Codex and Gemini. They are discovered automatically and activated by the LLM mid-conversation. Here's how it works under the hood with Langchain4j.
8+
keywords: [devoxxgenie, skills, SKILL.md, commands, custom prompts, langchain4j, claude code, codex, gemini, agent mode, intellij plugin]
9+
image: /img/Skills.png
10+
---
11+
12+
# From Slash Commands to LLM-Activated Skills
13+
14+
DevoxxGenie has long had a way to bottle up reusable prompts as **Commands**: the `/test`, `/explain`, `/review` style slash commands that expand a template before sending it to the model. With the latest release we are adding a second, complementary mechanism called **Skills**: portable `SKILL.md` files on disk that the *LLM itself* decides to activate while it is thinking.
15+
16+
The big difference: **Commands are typed by you, Skills are picked by the model**. And because Skills live in the same directories that Claude Code, Codex and Gemini's `.agents`-aware tools already use, the same file can teach all four assistants the same playbook.
17+
18+
<!-- truncate -->
19+
20+
![DevoxxGenie Skills settings panel](../static/img/Skills.png)
21+
22+
## Commands: the slash-command you already know
23+
24+
Commands are a pre-LLM text substitution macro. You type `/explain`, DevoxxGenie expands the stored template (optionally substituting `$ARGUMENT`), and the resulting prompt is sent to the model. The model never sees the `/explain`; it just sees the expanded text.
25+
26+
That makes Commands ideal for things you trigger consciously and repeatedly:
27+
28+
| Command | What it sends |
29+
|-----------|--------------------------------------------------------|
30+
| `/test` | "Generate unit tests for the selected code…" |
31+
| `/explain`| "Explain the selected code…" |
32+
| `/review` | "Review the selected code and suggest improvements…" |
33+
| `/find` | RAG-backed semantic search across your project |
34+
| `/init` | Generate a `DEVOXXGENIE.md` project description file |
35+
36+
You add your own in **Settings → Tools → DevoxxGenie → Commands**. Everything happens locally, with no tool call and no agent loop required.
37+
38+
See the full reference in the [Commands docs](/docs/features/commands).
39+
40+
## Skills: capabilities the LLM activates itself
41+
42+
Skills flip the workflow around. Instead of you typing a slash, you drop a `SKILL.md` file into one of the well-known skill directories. DevoxxGenie scans those directories, hands a one-line index to the LLM in the system prompt, and the model decides, based on what you're asking, whether to call `activate_skill("…")` to pull in the full body of the skill mid-conversation.
43+
44+
A minimal skill looks like this:
45+
46+
```
47+
~/.claude/skills/refactor-helper/SKILL.md
48+
```
49+
50+
```markdown
51+
---
52+
name: refactor-helper
53+
description: Guides a safe, step-by-step refactoring workflow with tests
54+
---
55+
56+
# Refactor Helper
57+
58+
When the user asks for a refactor:
59+
60+
1. Read the target file and its references.
61+
2. Sketch the refactor as a diff before applying it.
62+
3. Run the project's tests after each step.
63+
4. Stop and report if any test fails.
64+
```
65+
66+
The model sees only the `name`/`description` pair until it decides the skill is relevant. Then it calls `activate_skill("refactor-helper")`, gets the full Markdown body streamed back as a tool result, and continues the conversation with those instructions in context.
67+
68+
## One file, four assistants: Claude, Codex, Gemini, DevoxxGenie
69+
70+
The real win is portability. DevoxxGenie scans **six** directories for skills, in increasing priority order:
71+
72+
| Priority | Directory | Shared with |
73+
|---------------|------------------------------------------|----------------------------------------------|
74+
| 1 *(lowest)* | `~/.agents/skills/<name>/` | Codex, Gemini, other `.agents`-aware tools |
75+
| 2 | `~/.claude/skills/<name>/` | Claude Code |
76+
| 3 | `~/.devoxxgenie/skills/<name>/` | DevoxxGenie only |
77+
| 4 | `<project>/.agents/skills/<name>/` | Codex, Gemini, other `.agents`-aware tools |
78+
| 5 | `<project>/.claude/skills/<name>/` | Claude Code |
79+
| 6 *(highest)* | `<project>/.devoxxgenie/skills/<name>/` | DevoxxGenie only |
80+
81+
Two rules govern collisions: **project beats user**, and within the same scope **`.devoxxgenie` beats `.claude` beats `.agents`**. The screenshot above shows the Settings panel listing exactly that mix: `subtask`, `ralph-runners`, `conference-scheduler`, `review`, `start-task`, `git-commit-push-pr`, all loaded from `~/.claude/skills/` and `<project>/.claude/skills/`, instantly visible to DevoxxGenie too.
82+
83+
This is the whole point: keep a curated library of skills in `~/.claude/skills/`, get them everywhere. Override one per-project in `<project>/.devoxxgenie/skills/` when you need a team-specific variant.
84+
85+
## Under the hood: Langchain4j's `Skills` API
86+
87+
Skills support in DevoxxGenie is a thin layer on top of the **`langchain4j-skills`** module, the same Java framework that already powers the plugin's chat, agent and MCP integrations.
88+
89+
```kotlin
90+
// build.gradle.kts
91+
implementation("dev.langchain4j:langchain4j-skills:1.14.0-beta24")
92+
```
93+
94+
The whole pipeline is three building blocks:
95+
96+
### 1. Load `SKILL.md` files from disk
97+
98+
```java
99+
import dev.langchain4j.skills.FileSystemSkill;
100+
import dev.langchain4j.skills.FileSystemSkillLoader;
101+
102+
List<FileSystemSkill> skills = FileSystemSkillLoader.loadSkills(dir);
103+
```
104+
105+
DevoxxGenie does this for each of the six directories above, merging the results into a single map and letting higher-priority sources overwrite lower ones (with a warning logged on collision).
106+
107+
### 2. Wrap them in a `Skills` instance
108+
109+
```java
110+
import dev.langchain4j.skills.Skill;
111+
import dev.langchain4j.skills.Skills;
112+
113+
Skills skills = Skills.from(activeSkills);
114+
115+
// One-line index for the system prompt (the LLM sees only this)
116+
String fragment = skills.formatAvailableSkills();
117+
```
118+
119+
The fragment is appended to the system prompt under a heading like *"You have access to the following skills"*, so the model knows what's on the menu before the first user message.
120+
121+
### 3. Expose the activation tool to the agent loop
122+
123+
```java
124+
import dev.langchain4j.service.tool.ToolProvider;
125+
126+
// AgentToolProviderFactory.java
127+
Skills skills = SkillRegistry.getInstance(project).buildSkills();
128+
if (skills != null) {
129+
providers.add(skills.toolProvider()); // adds activate_skill tool
130+
log.info("Skills tool provider included in agent tool chain");
131+
}
132+
```
133+
134+
`skills.toolProvider()` returns a Langchain4j `ToolProvider` exposing the `activate_skill` tool (plus an optional `read_skill_resource` helper). It is added alongside DevoxxGenie's built-in agent tools (`read_file`, `write_file`, `run_command`, `parallel_explore` and so on) and any MCP tool providers, then composed and wrapped with the existing approval and loop-tracking layers.
135+
136+
That's the full integration. The rest is wiring: a project-scoped `SkillRegistry`, a settings panel to enable/disable individual skills, and the small system-prompt augmentation that tells the model *"these exist, here's how to activate them"*.
137+
138+
## When to reach for which
139+
140+
| | Commands | Skills |
141+
|--------------------------|-----------------------------------------|----------------------------------------------|
142+
| **Invoked by** | You typing `/name args` | The LLM calling `activate_skill(name)` |
143+
| **Timing** | Pre-LLM, before the request is sent | Mid-conversation, LLM-driven |
144+
| **Requires Agent mode** | No | Yes (tool-capable model needed) |
145+
| **Storage** | IDE settings (XML) | `SKILL.md` files on disk |
146+
| **Portable** | DevoxxGenie only | Shared with Claude Code, Codex, Gemini |
147+
| **Best for** | Quick repeatable prompt templates | Reusable agent workflows and playbooks |
148+
149+
Use **Commands** for the things you trigger consciously, every day: "explain this", "write tests for this". Use **Skills** for repeatable agent *behaviours* that the model should reach for on its own: code-review checklists, framework-specific recipes, deployment runbooks, your team's commit-message conventions.
150+
151+
## Try it out
152+
153+
1. Drop a `SKILL.md` into `~/.claude/skills/<name>/` (or any of the other five locations).
154+
2. In DevoxxGenie open **Settings → Tools → DevoxxGenie → Skills**, hit **Reload**, and confirm the skill shows up in the table.
155+
3. Enable **Agent Mode**, pick a tool-capable model, and ask a question that matches the skill's description. The model will activate it on its own.
156+
157+
Full reference: **[Skills docs](/docs/features/skills)** · **[Commands docs](/docs/features/commands)** · **[Agent Mode](/docs/features/agent-mode)**.
158+
159+
**Install:** [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/24169-devoxxgenie) · [GitHub](https://github.com/devoxx/DevoxxGenieIDEAPlugin)

docusaurus/docs/configuration/prompts.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ image: /img/devoxxgenie-social-card.jpg
88

99
# Prompts Configuration
1010

11-
DevoxxGenie allows you to configure the system prompt, keyboard shortcuts, and project description file. Slash commands (like `/test`, `/explain`) are now managed separately under **Skills** — see the [Skills](../features/skills.md) page.
11+
DevoxxGenie allows you to configure the system prompt, keyboard shortcuts, and project description file. Slash commands (like `/test`, `/explain`) are now managed separately under **Commands** — see the [Commands](../features/commands.md) page.
1212

1313
## Accessing Prompt Settings
1414

@@ -70,10 +70,18 @@ You can also generate this file by typing `/init` in the DevoxxGenie input field
7070

7171
For more information about DEVOXXGENIE.md, see the [DEVOXXGENIE.md Configuration](devoxxgenie-md.md) page.
7272

73-
## Skills (Slash Commands)
73+
## Commands (Slash Commands)
7474

75-
Slash commands like `/test`, `/explain`, `/review`, and custom commands are now configured in a dedicated **Skills** settings page.
75+
Slash commands like `/test`, `/explain`, `/review`, and custom commands are now configured in a dedicated **Commands** settings page.
76+
77+
To manage commands, go to **Settings** > **Tools** > **DevoxxGenie** > **Commands**.
78+
79+
See the [Commands](../features/commands.md) page for full documentation on creating and using commands.
80+
81+
## Skills (LLM-Activated SKILL.md Files)
82+
83+
Skills are a separate, newer feature: self-describing capabilities loaded from `SKILL.md` files on disk and activated by the LLM itself when Agent Mode is enabled.
7684

7785
To manage skills, go to **Settings** > **Tools** > **DevoxxGenie** > **Skills**.
7886

79-
See the [Skills](../features/skills.md) page for full documentation on creating and using skills.
87+
See the [Skills](../features/skills.md) page for full documentation.

docusaurus/docs/configuration/settings.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,26 @@ Configure the system prompt and keyboard shortcuts:
5050

5151
See [Prompts Configuration](prompts.md) for details.
5252

53-
### Skills
53+
### Commands
5454

5555
Configure slash commands that trigger predefined prompts:
5656

57-
- View and manage built-in skills (`/test`, `/explain`, `/review`, `/find`, etc.)
58-
- Create custom skills with `$ARGUMENT` placeholder support
59-
- Restore default skills
57+
- View and manage built-in commands (`/test`, `/explain`, `/review`, `/find`, etc.)
58+
- Create custom commands with `$ARGUMENT` placeholder support
59+
- Restore default commands
60+
61+
See [Commands](../features/commands.md) for details.
62+
63+
### Skills
64+
65+
Manage LLM-activated `SKILL.md` capabilities loaded from disk:
66+
67+
- View all skills detected across the six supported directories (user/project × `.agents`/`.claude`/`.devoxxgenie`)
68+
- Enable or disable individual skills
69+
- Open (and auto-create) any of the six skill directories from the dropdown
70+
- Reload skills from disk without restarting the IDE
6071

61-
See [Skills](../features/skills.md) for details.
72+
Requires **Agent Mode** to be enabled. See [Skills](../features/skills.md) for details.
6273

6374
### MCP Settings
6475

0 commit comments

Comments
 (0)