Agent skill

I18n Compose

by r0adkll in r0adkll/Campfire

Extract hardcoded user-facing string literals from a Jetpack Compose / Compose Multiplatform file into the owning module's composeResources/values/<modulestrings.xml, then replace each call site…

GPL-3.0Auto-check passedFrontend & Design

Install I18n Compose

skills CLI
$ npx skills add r0adkll/Campfire --skill i18n-compose -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install r0adkll/Campfire i18n-compose --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/r0adkll/Campfire.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/i18n-compose .claude/skills/i18n-compose && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
i18n-compose
GitHub stars
141
Token cost
~3.2k tokens
SKILL.md length
1,112 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
GPL-3.0

At a glance

Extract hardcoded user-facing string literals from a Jetpack Compose / Compose Multiplatform file into the owning module's composeResources/values/<modulestrings.xml, then replace each call site…

  • Works in 6 steps: Locates the owning module by walking up… → Finds user-facing string literals in… → Proposes a key for each literal,… → …
  • The user asks to localize
  • SKILL.md covers What this skill does, When to invoke, Locate the strings.xml and Identify literals, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

I18n Compose is an agent skill from r0adkll/Campfire. Extract hardcoded user-facing string literals from a Jetpack Compose / Compose Multiplatform file into the owning module's composeResources/values/<modulestrings.xml, then replace each call site with stringResource(Res.string.<key, ...) and add the matching Res / key imports. Trigger when the user asks to "localize", "i18n", "extract strings", or "move strings to resources" for a given Compose file.

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Internationalization and Android development. It works with Jetpack Compose and Kotlin. The repository describes itself as: A KMP Compose app for Audiobookshelf. The licence is GPL-3.0.

When your agent uses it

  • The user asks to localize
  • Extract strings
  • Move strings to resources for a given Compose file

Example prompts

  • “localize”
  • “extract strings”
  • “move strings to resources”
  • “/i18n-compose”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Locates the owning module by walking up to the nearest src/commonMain/composeResources/values/*_strings.xml (or…
  2. Finds user-facing string literals in @Composable code: Text("..."), contentDescription = "...", placeholder = { Text("...") }, tooltip…
  3. Proposes a key for each literal, following the existing naming conventions in the module's _strings.xml. Group by feature/screen with a…
  4. Presents a plan as a table: literal → proposed key → XML value (with placeholders) → call-site replacement. Wait for user approval unless…
  5. Applies the changes by editing the strings XML, the source file (replacing each literal), and adding/sorting the imports.
  6. Runs ktlint on the touched files and reports any unresolved formatting issues.

What it can do on your machine

Read from SKILL.md and the folder at commit cf53383. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

I18n Compose loads about 3.2k tokens when it runs. Until then it costs about 106 tokens; SKILL.md has 1,112 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~106
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from r0adkll/Campfire at commit cf53383, republished under its GPL-3.0 licence (© r0adkll). 1,112 words, ~3,214 tokens.

Download SKILL.mdSave it as .claude/skills/i18n-compose/SKILL.md (or your agent's skills folder).
name
i18n-compose
description
Extract hardcoded user-facing string literals from a Jetpack Compose / Compose Multiplatform file into the owning module's `composeResources/values/<module>_strings.xml`, then replace each call site with `stringResource(Res.string.<key>, ...)` and add the matching `Res` / key imports. Trigger when the user asks to "localize", "i18n", "extract strings", or "move strings to resources" for a given Compose file.
argument-hint
[file] [--apply|--plan]

What this skill does

Given a Compose Kotlin file (typically *Ui.kt or a composable in features/**/ui/... or ui/**/), this skill:

  1. Locates the owning module by walking up to the nearest src/commonMain/composeResources/values/*_strings.xml (or src/commonMain/composeResources/values/ if the strings file does not yet exist — derive the filename from the module path).
  2. Finds user-facing string literals in @Composable code: Text("..."), contentDescription = "...", placeholder = { Text("...") }, tooltip text = "...", error messages, dialog titles, etc. Includes string-template literals ("$count items") — convert templates to format args.
  3. Proposes a key for each literal, following the existing naming conventions in the module's _strings.xml. Group by feature/screen with a stable prefix (e.g. action_*, cd_*, <screen>_<purpose>).
  4. Presents a plan as a table: literal → proposed key → XML value (with placeholders) → call-site replacement. Wait for user approval unless invoked with --apply.
  5. Applies the changes by editing the strings XML, the source file (replacing each literal), and adding/sorting the imports.
  6. Runs ktlint on the touched files and reports any unresolved formatting issues.

When to invoke

  • User says: "localize this file", "i18n this", "extract strings from <file>", "move these strings to resources", "/i18n-compose <path>".
  • Reviewing a new *Ui.kt PR that contains hardcoded English literals.
  • Migrating an older legacy screen to the resource pattern.

Do NOT invoke for:

  • Non-UI Kotlin code (presenters, repositories, network code). Strings used outside @Composable need a different lookup (getString(Res.string.x) is suspend); flag those for the user instead of silently converting.
  • Pure test files, debug-only screens behind a debug flag, or strings the user has explicitly tagged as developer-only / non-translatable.

Locate the strings.xml

For a file at features/podcasts/ui/src/commonMain/kotlin/app/campfire/podcasts/ui/find/FindEpisodesUi.kt:

  1. Walk up to the module root (features/podcasts/ui/).
  2. Strings file lives at features/podcasts/ui/src/commonMain/composeResources/values/<module>_strings.xml.
  3. Filename convention is <dot-separated module path>_strings.xml with : and - swapped for _ (e.g. :features:podcasts:ui → podcasts_ui_strings.xml, :ui:appbar → appbar_strings.xml). When in doubt, peek at sibling modules — the filename pattern is consistent within features/, ui/, and infra/.
  4. The generated import package is campfire.<dot-path>.generated.resources. Examples:
    • :features:podcasts:ui → campfire.features.podcasts.ui.generated.resources
    • :ui:appbar → campfire.ui.appbar.generated.resources
    • :app:common → campfire.app.common.generated.resources
  5. If the strings file does not yet exist, create the directory src/commonMain/composeResources/values/ and seed the file with <resources>\n</resources>.

Identify literals

Scan the file's AST visually (or via grep + careful read) for:

  • Text("literal") and Text(text = "literal", ...)
  • contentDescription = "literal" and contentDescription = "literal $variable"
  • Tooltip/dialog text: IconButtonTooltip(text = "..."), AlertDialog(title = { Text("...") }, text = { Text("...") })
  • Placeholder/label slots in TextField, SearchBar: placeholder = { Text("...") }, label = { Text("...") }
  • Snackbar messages, error strings used directly in UI
  • Modifier.semantics { contentDescription = "..." }

Skip:

  • Strings already wrapped in stringResource(...) or pluralStringResource(...).
  • Test tags (Modifier.testTag("...")).
  • Log tags, route IDs, JSON keys, analytics event names, navigation deep-link paths.
  • Format-string placeholders that are themselves Compose resources.
  • Empty strings ("") and single-character separators (" ", "·", "•").
  • Strings already obviously developer-only (TODO markers, debug surfaces).

If unsure, flag the literal in the plan with ??? and ask the user.

String templates → format args

Convert "$count items" and "${user.name}'s library" to positional placeholders:

  • "$count items" → XML: "%1$d items" (assume Int for count*/*count/size/*Size) or "%1$s items" if the type is ambiguous. Call site: stringResource(Res.string.<key>, count).
  • "${user.name}'s library" → XML: "%1$s's library". Call site: stringResource(Res.string.<key>, user.name).
  • Multi-arg: "$first of $total" → "%1$d of %2$d", call site stringResource(Res.string.<key>, first, total).

XML must escape % as %% and escape " and \\ and ' per Android string rules. Use \" for inner quotes and wrap values containing leading/trailing whitespace in "...".

Naming conventions

Follow the existing keys in the target _strings.xml. Common prefixes:

  • action_<verb>_<object> — button/tooltip labels: action_mark_episode_finished
  • cd_<noun> — content descriptions: cd_clear_search, cd_book_cover
  • <screen>_<purpose> — screen-scoped copy: find_episodes_empty, latest_episodes_title
  • error_<what> — error states: error_load_failed
  • dialog_<name>_<part> — dialog title/body/confirm/dismiss
  • Plurals: prefer ICU-style placeholders for now (Compose Resources pluralStringResource is supported — propose plural_<noun> only if the file already uses one).

Verbs are imperative ("Edit playlist", not "Editing playlist"). Sentence case for body copy, Title Case for short titles/buttons — match what's already in the file.

If the proposed key collides with an existing key in the XML:

  • If the existing value is identical → reuse the key.
  • If the existing value differs → append a disambiguating suffix (_short, _screen, <feature>) and call it out in the plan.
Show full SKILL.md (473 more words)Show less

Plan output

Present the plan as a single markdown table before applying anything:

| Line | Literal                              | Proposed key                  | XML value              | Notes |
|------|--------------------------------------|-------------------------------|------------------------|-------|
| 42   | "Latest"                             | latest_episodes_title         | Latest                 |       |
| 87   | "No episodes match \"$query\""       | find_episodes_empty           | No episodes match \"%1$s\" | template → arg |
| 91   | contentDescription = "${book.title}" | cd_book_cover                 | %1$s cover             |       |

Below the table, list:

  • New imports to add (sorted, deduped) and any to remove.
  • Whether a new _strings.xml will be created.
  • Any literals you skipped and why (e.g. test tag, log tag).
  • Any literals flagged ??? that need user input.

Pause for user approval unless --apply was passed. If the user approves, apply all edits in one pass.

Apply step

  1. XML edits: append new <string name="...">value</string> entries. Keep entries grouped by feature/screen (look at the existing blank-line groupings and follow them). Do not re-sort existing entries.
  2. Source edits: replace each literal with stringResource(Res.string.<key>) or stringResource(Res.string.<key>, arg1, arg2). For call sites where the result needs to be captured (e.g. passed to a non-composable lambda), hoist to a val foo = stringResource(...) near the top of the surrounding @Composable.
  3. Imports: add import org.jetbrains.compose.resources.stringResource if missing, import <pkg>.generated.resources.Res, and one import <pkg>.generated.resources.<key> per new key. Keep imports sorted; ktlint will fix order on the final pass if needed.
  4. Format: run ./scripts/ktlint --format <touched files> and report the result. If ktlint complains beyond import sorting, surface the message — don't silently mass-edit.

Non-composable call sites

If a literal sits outside a @Composable function (e.g. a presenter-side error message that flows into UI state):

  • DO extract the key into the strings XML.
  • Do NOT swap the call site to stringResource(...) — that's a @Composable function.
  • Instead, surface the literal at the UI layer: either (a) move the lookup to the UI by passing a sealed ErrorReason through state and resolving at the @Composable boundary, or (b) use the suspending getString(Res.string.<key>) from org.jetbrains.compose.resources if the call site is already suspend.
  • Flag this in the plan with Notes: non-composable — move resolution to UI and let the user decide.

Examples

Before
kotlin
// features/podcasts/ui/src/commonMain/kotlin/.../FindEpisodesUi.kt
@Composable
fun FindEpisodesUi(state: FindEpisodesUiState) {
  Scaffold(
    topBar = {
      TopAppBar(title = { Text("Find episodes") })
    },
  ) {
    if (state.results.isEmpty()) {
      Text("No episodes match \"${state.query}\"")
    }
    IconButton(onClick = { /*...*/ }) {
      Icon(Icons.Rounded.Close, contentDescription = "Clear search")
    }
  }
}
Plan
| Line | Literal                                       | Proposed key                  | XML value                       | Notes |
|------|-----------------------------------------------|-------------------------------|---------------------------------|-------|
| 6    | "Find episodes"                               | find_episodes_title           | Find episodes                   |       |
| 10   | "No episodes match \"${state.query}\""        | find_episodes_empty           | No episodes match \"%1$s\"      | template |
| 13   | "Clear search"                                | cd_clear_search               | Clear search                    |       |

New imports:

campfire.features.podcasts.ui.generated.resources.Res
campfire.features.podcasts.ui.generated.resources.cd_clear_search
campfire.features.podcasts.ui.generated.resources.find_episodes_empty
campfire.features.podcasts.ui.generated.resources.find_episodes_title
org.jetbrains.compose.resources.stringResource
After
kotlin
import campfire.features.podcasts.ui.generated.resources.Res
import campfire.features.podcasts.ui.generated.resources.cd_clear_search
import campfire.features.podcasts.ui.generated.resources.find_episodes_empty
import campfire.features.podcasts.ui.generated.resources.find_episodes_title
import org.jetbrains.compose.resources.stringResource

@Composable
fun FindEpisodesUi(state: FindEpisodesUiState) {
  Scaffold(
    topBar = {
      TopAppBar(title = { Text(stringResource(Res.string.find_episodes_title)) })
    },
  ) {
    if (state.results.isEmpty()) {
      Text(stringResource(Res.string.find_episodes_empty, state.query))
    }
    IconButtonTooltip(text = stringResource(Res.string.cd_clear_search)) {
      IconButton(onClick = { /*...*/ }) {
        Icon(
          Icons.Rounded.Close,
          contentDescription = stringResource(Res.string.cd_clear_search),
        )
      }
    }
  }
}

Note: this example also wraps the IconButton in IconButtonTooltip per the iconbutton-a11y convention. When extracting strings, opportunistically migrate icon-only buttons in the same pass.

Anti-patterns

  • Inventing keys without checking the file. Always read the target _strings.xml first and reuse prefixes already present.
  • Extracting log tags / test tags / route IDs. Those are developer-only strings, never translated.
  • Silent template flattening. Always convert "$x" to %1$s/%1$d (etc.) and pass the value through stringResource(...) args — never stringResource(Res.string.key) + " " + x.
  • Mixing positional and non-positional placeholders. Always use positional (%1$s, %2$d) — required for translators reordering args.
  • Mass-applying without showing a plan first. Unless --apply was explicitly passed, always pause for user approval after the plan table.
  • Forgetting to add the Res import. Each new key needs its own import line; the bare Res import alone won't compile.

Verification

After applying:

  1. The strings XML parses (run xmllint --noout <file> if available, else eyeball balanced tags).
  2. ./scripts/ktlint --check <touched-files> is clean.
  3. Optional: ./gradlew :<module-path>:compileKotlinMetadata (or the appropriate compile task) to confirm the generated resources picked up the new keys.

© r0adkll, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/i18n-compose of r0adkll/Campfire.

Open the folder on GitHubat commit cf53383

Compare with similar skills

I18n Compose next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

I18n Compose compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
I18n Compose this skillr0adkll/Campfire141—~3.2kAutomated safety check: PassGPL-3.0
Levyra ComposeLUC4N3X/Levyra-deepsound590—~2.2kAutomated safety check: PassGPL-3.0
Cometchat Android V6 Compose Customizationcometchat/cometchat-skills132—~2kAutomated safety check: PassMIT
Compose Multiplatform Patternsmonta-app/ocpp-emulator1805 repos~2kAutomated safety check: PassApache-2.0
Jetpack Compose Expertaldefy/compose-skill596—~4.8kAutomated safety check: PassCustom licence
Compose Screens Footgunsmaxrave-dev/kotlin-footguns1.1k—~5.5kAutomated safety check: PassGPL-3.0

Similar skills

  • Levyra Compose

    LUC4N3X/Levyra-deepsound

    Implement, debug, or review Levyra Jetpack Compose screens, state projections, navigation, animation, lifecycle, accessibility, performance, RTL, localization, edge-to-edge, adaptive layout, and…

    590 GitHub stars~2.2k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Make the CometChat Android v6 UI match your app in the Jetpack Compose cohort — theming with the CometChatTheme composable and lightColorScheme/darkColorScheme, per-component style data classes…

    132 GitHub stars~2k tokensUpdated 5 days ago
    Frontend & DesignAuto-check passed
  • Compose Multiplatform Patterns

    monta-app/ocpp-emulator

    Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.

    180 GitHub starsUsed in 5 repos~2k tokens
    MobileAuto-check passed
  • Jetpack Compose Expert

    aldefy/compose-skill

    Guides Jetpack Compose and Compose Multiplatform work across Android, Desktop, iOS and web, plus Android TV, Material 3 motion, paging, navigation and design-to-code.

    596 GitHub stars~4.8k tokensUpdated 2 mo ago
    MobileAuto-check passed
  • Compose Screens Footguns

    maxrave-dev/kotlin-footguns

    Compose screen and interaction traps: navigation, adaptive layout, window insets, pagers, toolbars, sheets, list drag and selection, sliders, text fields, settings UI, one-shot effects.

    1.1k GitHub stars~5.5k tokensUpdated 15 days ago
    MobileAuto-check passed
  • Make the CometChat Android v6 UI match your app in the Kotlin XML Views cohort — theming via CometChatTheme.DayNight attributes, per-component styles, message-bubble styling, ViewHolder view slots…

    132 GitHub stars~2.2k tokensUpdated 5 days ago
    MobileAuto-check passed

More from r0adkll/Campfire

All 9 skills in this repo
  • PR Stack

    r0adkll/Campfire

    Open, describe, and maintain pull requests in Campfire, especially stacks of dependent PRs (each branch built on the one before).

    141 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Compose Modifier

    r0adkll/Campfire

    Enforce the Compose guideline that every @Composable function must declare modifier: Modifier = Modifier as its first optional parameter and apply it to the root layout.

    141 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Fdroid Reproducible Foss

    r0adkll/Campfire

    Rules and reliable local tests for keeping Campfire's foss flavor F-Droid-compatible — a clean source scan (using scandelete, never scanignore) and a byte-for-byte reproducible build.

    141 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Iconbutton A11y

    r0adkll/Campfire

    Enforce the Campfire IconButton accessibility convention — every IconButton (and its derivatives) must be wrapped with IconButtonTooltip and given a localized action label.

    141 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Socket Event Listener

    r0adkll/Campfire

    Enforce the Campfire pattern for feature modules to react to Audiobookshelf socket events.

    141 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Compose UI

    r0adkll/Campfire

    Campfire Compose UI conventions. An agent skill from r0adkll/Campfire.

    141 GitHub stars~886 tokensUpdated today
    Auto-check passed

Questions about I18n Compose

What does I18n Compose do?

Extract hardcoded user-facing string literals from a Jetpack Compose / Compose Multiplatform file into the owning module's composeResources/values/<modulestrings.xml, then replace each call site…. I18n Compose is an agent skill from r0adkll/Campfire.) and add the matching Res / key imports.

When should I use I18n Compose?

I18n Compose fits situations like: the user asks to localize; extract strings; move strings to resources for a given Compose file.

How do I install I18n Compose in Claude Code?

Run `npx skills add r0adkll/Campfire --skill i18n-compose -a claude-code`. Or copy the skill folder (.claude/skills/i18n-compose in r0adkll/Campfire) into .claude/skills/i18n-compose in your project. Claude Code loads it when a task matches its description.

How do I install I18n Compose in Codex?

Run `npx skills add r0adkll/Campfire --skill i18n-compose -a codex`. Or copy the skill folder (.claude/skills/i18n-compose in r0adkll/Campfire) into .agents/skills/i18n-compose in your project. Codex loads it when a task matches its description.

Can I use I18n Compose in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add r0adkll/Campfire --skill i18n-compose -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/i18n-compose, .gemini/skills/i18n-compose, .github/skills/i18n-compose and .opencode/skills/i18n-compose in your project.

What does I18n Compose need to run?

SKILL.md names no scripts, command-line tools or credentials: I18n Compose is instructions for the agent only.

Does I18n Compose access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is I18n Compose safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does I18n Compose use?

I18n Compose is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does I18n Compose use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to I18n Compose?

Skills that share tags, products or a category with I18n Compose: Levyra Compose (LUC4N3X/Levyra-deepsound, 590 stars), Cometchat Android V6 Compose Customization (cometchat/cometchat-skills, 132 stars), Compose Multiplatform Patterns (monta-app/ocpp-emulator, 180 stars) and Jetpack Compose Expert (aldefy/compose-skill, 596 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains I18n Compose?

r0adkll (a GitHub user) maintains it in r0adkll/Campfire, which has 141 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 10, 2026.

Source: r0adkll/Campfire on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.