koog: Skill for Claude Code

.claude/skills/add-java-code-snippets-in-docs/SKILL.md

add-java-code-snippets-in-docs is a skill for Claude Code from JetBrains/koog. It costs 70 tokens per session (1,718 once invoked), scanned A, original, Apache-2.0.

A documentation workflow for adding Java examples beside existing Kotlin examples in MkDocs, a tool that builds documentation websites. It also covers the links needed to expose Kotlin code to Java users.

In plain words
What is it for?
Use it to add Java tabs, mirror Kotlin examples, connect Java calls to Kotlin APIs, and fix Java examples in supported documentation files.
Why use it?
Documentation can show the Kotlin example while leaving Java readers without a usable equivalent. This keeps both language versions together and compatible with the documentation build process.

Skill for Claude Code ✓ vendor

Written for Claude Code: allowed-tools in frontmatter.

This is JetBrains/koog's own configuration. It tells Claude Code how to work on koog itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything koog configures →

About the project

Koog is a Kotlin and Java framework for building AI agents that use tools, interact with people, and run multi-step workflows. JVM and Kotlin developers use it to deploy agents across platforms such as JVM, Android, iOS, JavaScript, and WebAssembly, with features for persistence, fault recovery, model switching, and monitoring. The catalogue entries provide agents, skills, and instructions for building with Koog.

JetBrains/koog · 4,653 stars · on GitHub · docs.koog.ai

Reuse

Borrowing it

Nothing to install: this file belongs to JetBrains/koog. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/JetBrains/koog/develop/.claude/skills/add-java-code-snippets-in-docs/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/JetBrains/koog

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-java-code-snippets-in-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/jetbrains/koog/add-java-code-snippets-in-docs/github.svg)](https://agentmods.dev/skills/jetbrains/koog/add-java-code-snippets-in-docs)
Your own site
<a href="https://agentmods.dev/skills/jetbrains/koog/add-java-code-snippets-in-docs"><img src="https://agentmods.dev/badge/skills/jetbrains/koog/add-java-code-snippets-in-docs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-java-code-snippets-in-docs

Your own site · 80×15
<a href="https://agentmods.dev/skills/jetbrains/koog/add-java-code-snippets-in-docs"><img src="https://agentmods.dev/badge/skills/jetbrains/koog/add-java-code-snippets-in-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,718 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.01718
Opus 5.5 $0.00028 $0.00687
Sonnet 5.5 $0.00014 $0.00344
Haiku 4.5 $0.00007 $0.00172

Measured 2mo ago against content hash 7252e23216f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

add-java-code-snippets-in-docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/add-java-code-snippets-in-docs/SKILL.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

When to use

Adding Java code blocks alongside existing Kotlin blocks in mkdocs documentation (docs/docs/**.md). Typical triggers: "add Java examples to ", "add Java tabs", "complete the Java side of ", "fix the Java block in ".

Do NOT use this skill for:

  • Writing brand-new Kotlin docs (no precursor Kotlin block to mirror).
  • Splitting source files between JVM and non-JVM source sets — use the split-jvm-nonjvm skill instead.
  • Java examples outside the mkdocs/Knit pipeline.

Prerequisites

JDK 17. Gradle 8.x fails cryptically on newer JDKs. If the default JDK is newer, prefix every ./gradlew command in this workflow with JAVA_HOME=/path/to/jdk-17.

Before starting

Read one reference doc to anchor on the established pattern:

  • docs/docs/features/tracing.md — full Tracing feature (blocks 1–6).
  • docs/docs/agent-events.md — custom FeatureMessageProcessor subclass (suspend bridge methods handleMessage / handleClose).
  • docs/docs/testing.md — MockPromptExecutor builder, tool mocking, comment-only blocks for Kotlin-only DSL.
  • docs/docs/features/open-telemetry/index.md — OpenTelemetry examples.
  • docs/docs/features/open-telemetry/opentelemetry-langfuse-exporter.md — Langfuse exporter.
  • docs/docs/features/open-telemetry/opentelemetry-weave-exporter.md — Weave exporter.

Workflow

For each Kotlin code block in the target .md:

  1. Read the Kotlin block: INCLUDE, visible code, SUFFIX, KNIT directive.
  2. Check existing Java tab. If absent → add one. If it has empty /** */ placeholder content → replace entirely. If it has real content → update.
  3. Consider Kotlin-side alignment. If the Kotlin block uses Kotlin-only APIs (kotlinx.io, MutableStateFlow, KLogger, inline Duration), consider whether the Kotlin example should switch to a JVM create() factory (e.g., TraceFeatureMessageFileWriter.create(path)). This keeps the two examples structurally aligned. See reference/factory-classes.md.
  4. Add @JavaAPI bridge methods if missing. If the Java code needs a bridge that doesn't exist yet (e.g., a builder method on MockExecutorBuilder), add it before writing the Java tab. This may pause the doc work for a source-code change — flag it to the user before proceeding.
  5. Write the Java tab immediately after the Kotlin tab, using the template below.
  6. If renaming Knit files (e.g., hyphenated example-feature-java-01.java → camelCase exampleFeatureJava01.java), delete the old generated files first.
  7. Generate and compile (see Verification at the bottom).
  8. Read the generated .java to confirm correctness. Fix and repeat 7–8 on failure.

Read the full file on GitHub · 144 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 144 lines · 70 tokens per session scan A 7252e23216f5

Subscribe to this mod's changes

add-java-code-snippets-in-docs is a skill published in the GitHub repository JetBrains/koog (4,653 stars, last pushed yesterday), licensed Apache-2.0. It adds 70 tokens to every session and 1,718 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

add-java-code-snippets-in-docs compared with skills from other repositories

add-java-code-snippets-in-docs next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
add-java-code-snippets-in-docsJetBrains/koogSkill4.7kyesterdayApache-2.0A70Claude Code
vigilante-issue-implementation-on-java-kotlinaliengiraffe/vigilanteSkill413d agoApache-2.0A45Codex
junit-testingVersoXBT/claude-initial-setupSkill46mo agoMITA86Claude Code
maven-gradle-guideVersoXBT/claude-initial-setupSkill46mo agoMITA88Claude Code
spring-boot-patternsVersoXBT/claude-initial-setupSkill46mo agoMITA83Claude Code
java-coding-standardsaffaan-m/ECCSkill298k4d agoMITA50Claude Code, Kiro
python-package-managementmicrosoft/agent-frameworkSkill15kyesterdayMITA43Claude Code, Codex