agentleFS
JetBrainsKnown publisherJetBrains/kotlin-web-site/.claude/skills/add-writerside-doc-module/SKILL.md

add-writerside-doc-module

Skill1.6k starsChanged 2 months agoApache-2.0View on GitHub

Add a new external Writerside documentation source to kotlin-web-site via the

Trending

Quiet since January.about the whole repository

Jan 2026: 1 mentionFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the JetBrains/kotlin-web-site repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about JetBrains/kotlin-web-site

The biggest 5 of 42 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 42

Talked about on GitHub (42 times).

On GitHub · 42

37 more on GitHub
  • Jan 7, 2026New samples from kotlin-web-site — JetBrains/kotlin-compiler-server0 reactions · 25 comments
  • Jun 11, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 11, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 11, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 10, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 10, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 10, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 10, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 9, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 9, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 9, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 9, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 5, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 5, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 4, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 4, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 4, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 4, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 4, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 4, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 4, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 4, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 4, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 3, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 3, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 3, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 3, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 3, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 3, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 3, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 3, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 3, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 3, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 3, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 3, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 3, 2021New samples — vmishenev/kotlin-compiler-server0 reactions
  • Jun 3, 2021New samples — vmishenev/kotlin-compiler-server0 reactions

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask the user for (infer sensible defaults from the serialization example where possible):

    line 32
  2. Very specific:

    Add a line after the last vcsRoot(...) call:

    line 76
  3. Very specific:

    No import needed — the file already does import documentation.vcsRoots.*.

    line 82
  4. Very specific:

    Add an addSubDocumentation(...) call inside the init { } block, alongside the existing calls.

    line 88
  5. Very specific:

    Add (or replace a placeholder topic= entry with) a <toc-element> that includes the external tree.

    line 117
  6. Very specific:

    Add a <var> for each version the module's docs reference via %name%:

    line 133
  7. Distinctive:

    Add a row to the external-docs table (the "Source files ...

    line 143

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Add a new Writerside docs module

This skill wires an external documentation repository into kotlin-web-site so its pages are built and published as part of the main Kotlin docs site.

A doc source is now added entirely through the TeamCity Kotlin DSL as a sub-documentation source nested under the existing KotlinWithCoroutines build (the kotlin-reference module). There is no git submodule and no new build object for this pattern — addSubDocumentation(...) handles checkout and snippet wiring.

The reference implementation is the kotlinx.serialization addition; mirror it.

Follow .ai/guidelines.md at all times (required by CLAUDE.md).

When to use

The user wants to publish docs from another repo (e.g. a new Kotlin/* library) on kotlinlang.org, the same way coroutines, lincheck, dokka, api-guidelines, and serialization are published.

Inputs to gather first

Ask the user for (infer sensible defaults from the serialization example where possible):

InputExampleNotes
Object base nameKotlinxSerializationUsed as <base>Root for the VCS root object.
Display nameKotlinx SerializationHuman-readable name of the VCS root.
Git SSH URLgit@github.com:Kotlin/kotlinx.serialization.gitMust be SSH (git@github.com:...).
Branchrefs/heads/masterFull ref. May be a custom docs branch.
Checkout dirkotlinx.serializationDir name passed to addSubDocumentation.
Docs layoutdefault docs/ or custom (e.g. docs-website)Determines whether custom rules are needed.
External tree fileserialization.treeThe .tree file that lives in the source repo.
origin / element-idserializationThe module id used in the <include>.
TOC titleSerialization (kotlinx.serialization)Shown in the site sidebar.
Version varskotlinxIoVersion=0.9.0, okioVersion=3.16.2Any %var% the docs reference; optional.
README rowpage URL + repo URLFor the external-docs table.

Steps — apply these six edits

Make the edits in this order. Each one is anchored to an existing pattern; append the new entry alongside the others rather than reformatting the file.

1. Add the VCS root

File: .teamcity/documentation/vcsRoots/DocumentationRoots.kt

Append a new GitVcsRoot object after the last one (currently KotlinxSerializationRoot):

object <Base>Root: GitVcsRoot({
    name = "<Display name>"
    url = "<git SSH URL>"
    branch = "<refs/heads/...>"
    branchSpec = "+:refs/heads/*"
    checkoutPolicy = AgentCheckoutPolicy.USE_MIRRORS
    authMethod = uploadedKey {
        uploadedKey = "default teamcity key"
    }
})

2. Register the VCS root

File: .teamcity/documentation/DocumentationProject.kt

Add a line after the last vcsRoot(...) call:

vcsRoot(<Base>Root)

No import needed — the file already does import documentation.vcsRoots.*.

3. Wire it as sub-documentation

File: .teamcity/documentation/builds/KotlinWithCoroutines.kt

Add an addSubDocumentation(...) call inside the init { } block, alongside the existing calls.

  • Default layout (repo has docs/ and docs/snippets/) — omit the rules arg; the helper defaults to checking out .git + docs:

    addSubDocumentation("<checkout dir>", <Base>Root)
  • Custom layout — pass explicit checkout rules. Each rule is +:<srcPathInRepo> => <pathInBuildCheckout>. You must include .git. Example (serialization, whose docs live in docs-website):

    addSubDocumentation("kotlinx.serialization", KotlinxSerializationRoot, """
        +:.git => kotlinx-serialization/.git
        +:docs-website => kotlinx-serialization/docs-website
    """.trimIndent())

The helper addSubDocumentation (defined at the bottom of KotlinWithCoroutines.kt, around line 49) adds the VCS root with checkout rules and prepends a step that symlinks the module's snippets into docs/snippets. Don't duplicate that logic — just call it.

4. Include the module in the TOC

File: docs/kr.tree

Add (or replace a placeholder topic= entry with) a <toc-element> that includes the external tree. Place it near the other library includes (coroutines, lincheck):

<toc-element toc-title="<TOC title>">
    <include from="<external tree file>" origin="<origin>" element-id="<element-id>"/>
</toc-element>

from is the .tree filename that ships in the source repo; origin and element-id identify the module.

5. Add version variables (if any)

File: docs/v.list

Add a <var> for each version the module's docs reference via %name%:

<var name="<name>" value="<value>"/>

6. Update the README

File: README.md

Add a row to the external-docs table (the "Source files ... are stored in separate repositories" table):

| [<Page name> docs](<page URL>) | [<repo name>](<repo URL>) |

Worked example — kotlinx.serialization

This is the exact diff produced by the reference change; use it as a template.

# DocumentationRoots.kt
+object KotlinxSerializationRoot: GitVcsRoot({
+    name = "Kotlinx Serialization"
+    url = "git@github.com:Kotlin/kotlinx.serialization.git"
+    branch = "refs/heads/doc-restructuring-master"
+    branchSpec = "+:refs/heads/*"
+    checkoutPolicy = AgentCheckoutPolicy.USE_MIRRORS
+    authMethod = uploadedKey { uploadedKey = "default teamcity key" }
+})

# DocumentationProject.kt
+    vcsRoot(KotlinxSerializationRoot)

# KotlinWithCoroutines.kt  (inside init { })
+        addSubDocumentation("kotlinx.serialization", KotlinxSerializationRoot, """
+            +:.git => kotlinx-serialization/.git
+            +:docs-website => kotlinx-serialization/docs-website
+        """.trimIndent())

# docs/kr.tree
-        <toc-element toc-title="Serialization (kotlinx.serialization)" topic="serialization.md"/>
+        <toc-element toc-title="Serialization (kotlinx.serialization)">
+            <include from="serialization.tree" origin="serialization" element-id="serialization"/>
+        </toc-element>

# docs/v.list
+    <var name="kotlinxIoVersion" value="0.9.0"/>
+    <var name="okioVersion" value="3.16.2"/>

# README.md  (external-docs table)
+| [Serialization docs](https://kotlinlang.org/docs/serialization.html) | [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization) |

Pre-conditions to confirm with the user

  • The source repo, on the chosen branch, actually contains the referenced .tree file and the docs path used in the checkout rules.
  • The origin/element-id match what the source repo's tree exposes.

Verify

  • Compile/lint the TeamCity DSL so the new root and registration are valid Kotlin: generate the configs (e.g. cd .teamcity && mvn -q teamcity-configs:generate, or the repo's configured DSL check).
  • Confirm docs/kr.tree remains valid XML and the new <include> resolves the expected origin/element-id.
  • Diff the result against the serialization reference shape — the change should touch the same six files and nothing else.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.