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
Who's talking about JetBrains/kotlin-web-site
- detekt/detekt“Migrate to Kotlin Gradle Plugin's binary compatibility validation”GitHub · Jun 12, 2025 · 2 reactions
- JetBrains/kotlin-compiler-server“New samples from kotlin-web-site”GitHub · Jul 6, 2023 · 1 reactions
- JetBrains/kotlin-compiler-server“New samples from kotlin-web-site”GitHub · Nov 16, 2021 · 1 reactions
- kotlinkr/kotlinkr.github.io“코틀린 한글 번역 프로젝트 제안”GitHub · Jan 24, 2021 · 1 reactions
- hltj/kotlin-web-site-cn“Fix typo”GitHub · Sep 26, 2020 · 1 reactions
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
- Jun 12, 2025Migrate to Kotlin Gradle Plugin's binary compatibility validation — detekt/detekt2 reactions
- Jul 6, 2023New samples from kotlin-web-site — JetBrains/kotlin-compiler-server1 reaction · 1 comment
- Nov 16, 2021New samples from kotlin-web-site — JetBrains/kotlin-compiler-server1 reaction · 1 comment
- Jan 24, 2021코틀린 한글 번역 프로젝트 제안 — kotlinkr/kotlinkr.github.io1 reaction
- Sep 26, 2020Fix typo — hltj/kotlin-web-site-cn1 reaction
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
In this repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-api-referenceSkill
- fix-frontend-review-commentsSkill
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
- Distinctive: line 32
Ask the user for (infer sensible defaults from the serialization example where possible):
- Very specific: line 76
Add a line after the last vcsRoot(...) call:
- Very specific: line 82
No import needed — the file already does import documentation.vcsRoots.*.
- Very specific: line 88
Add an addSubDocumentation(...) call inside the init { } block, alongside the existing calls.
- Very specific: line 117
Add (or replace a placeholder topic= entry with) a <toc-element> that includes the external tree.
- Very specific: line 133
Add a <var> for each version the module's docs reference via %name%:
- Distinctive: line 143
Add a row to the external-docs table (the "Source files ...
≈ “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.
Files
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.mdat all times (required byCLAUDE.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):
| Input | Example | Notes |
| Object base name | KotlinxSerialization | Used as <base>Root for the VCS root object. |
| Display name | Kotlinx Serialization | Human-readable name of the VCS root. |
| Git SSH URL | git@github.com:Kotlin/kotlinx.serialization.git | Must be SSH (git@github.com:...). |
| Branch | refs/heads/master | Full ref. May be a custom docs branch. |
| Checkout dir | kotlinx.serialization | Dir name passed to addSubDocumentation. |
| Docs layout | default docs/ or custom (e.g. docs-website) | Determines whether custom rules are needed. |
| External tree file | serialization.tree | The .tree file that lives in the source repo. |
| origin / element-id | serialization | The module id used in the <include>. |
| TOC title | Serialization (kotlinx.serialization) | Shown in the site sidebar. |
| Version vars | kotlinxIoVersion=0.9.0, okioVersion=3.16.2 | Any %var% the docs reference; optional. |
| README row | page URL + repo URL | For 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/anddocs/snippets/) — omit therulesarg; 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 indocs-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
.treefile and the docs path used in the checkout rules. - The
origin/element-idmatch 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.treeremains valid XML and the new<include>resolves the expectedorigin/element-id. - Diff the result against the serialization reference shape — the change should touch the same six files and nothing else.
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
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.

