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.
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.
curl -O https://raw.githubusercontent.com/JetBrains/koog/develop/.claude/skills/add-java-code-snippets-in-docs/SKILL.mdgit clone --depth 1 https://github.com/JetBrains/koogWrote 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.
[](https://agentmods.dev/skills/jetbrains/koog/add-java-code-snippets-in-docs)<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.
<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>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once 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 |
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.
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-nonjvmskill 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— customFeatureMessageProcessorsubclass (suspend bridge methodshandleMessage/handleClose).docs/docs/testing.md—MockPromptExecutorbuilder, 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:
- Read the Kotlin block: INCLUDE, visible code, SUFFIX, KNIT directive.
- Check existing Java tab. If absent → add one. If it has empty
/** */placeholder content → replace entirely. If it has real content → update. - Consider Kotlin-side alignment. If the Kotlin block uses Kotlin-only APIs (
kotlinx.io,MutableStateFlow,KLogger, inlineDuration), consider whether the Kotlin example should switch to a JVMcreate()factory (e.g.,TraceFeatureMessageFileWriter.create(path)). This keeps the two examples structurally aligned. Seereference/factory-classes.md. - Add
@JavaAPIbridge methods if missing. If the Java code needs a bridge that doesn't exist yet (e.g., a builder method onMockExecutorBuilder), 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. - Write the Java tab immediately after the Kotlin tab, using the template below.
- If renaming Knit files (e.g., hyphenated
example-feature-java-01.java→ camelCaseexampleFeatureJava01.java), delete the old generated files first. - Generate and compile (see Verification at the bottom).
- Read the generated
.javato confirm correctness. Fix and repeat 7–8 on failure.
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.
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.
- 2mo ago First seen · 144 lines · 70 tokens per session scan A 7252e23216f5
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.
add-java-code-snippets-in-docs compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| add-java-code-snippets-in-docsJetBrains/koog | Skill | 4.7k | yesterday | Apache-2.0 | A | 70 | Claude Code |
| vigilante-issue-implementation-on-java-kotlinaliengiraffe/vigilante | Skill | 41 | 3d ago | Apache-2.0 | A | 45 | Codex |
| junit-testingVersoXBT/claude-initial-setup | Skill | 4 | 6mo ago | MIT | A | 86 | Claude Code |
| maven-gradle-guideVersoXBT/claude-initial-setup | Skill | 4 | 6mo ago | MIT | A | 88 | Claude Code |
| spring-boot-patternsVersoXBT/claude-initial-setup | Skill | 4 | 6mo ago | MIT | A | 83 | Claude Code |
| java-coding-standardsaffaan-m/ECC | Skill | 298k | 4d ago | MIT | A | 50 | Claude Code, Kiro |
| python-package-managementmicrosoft/agent-framework | Skill | 15k | yesterday | MIT | A | 43 | Claude Code, Codex |