|
| 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 | + |
| 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) |
0 commit comments