Agent skill

Code Style

by pandulapeter in pandulapeter/campfire

Code style, commenting, and documentation conventions for the Campfire codebase.

MPL-2.0Auto-check passedAgent Workflows

Install Code Style

skills CLI
$ npx skills add pandulapeter/campfire --skill code-style -a claude-code

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

GitHub CLI
$ gh skill install pandulapeter/campfire code-style --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/pandulapeter/campfire.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/code-style .claude/skills/code-style && 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
code-style
GitHub stars
101
Token cost
~2.8k tokens
SKILL.md length
1,474 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MPL-2.0

At a glance

Code style, commenting, and documentation conventions for the Campfire codebase.

  • Tasks that involve Agent instruction files
  • SKILL.md covers License header, Comments, Documentation (KDoc) and Formatting, plus 8 more sections
  • Calls git

What it does

Code Style is an agent skill from pandulapeter/campfire. Code style, commenting, and documentation conventions for the Campfire codebase. MANDATORY — invoke this skill BEFORE writing or editing ANY source in this repo (every Write or Edit to a .kt/.kts/strings.xml file, new file or change to an existing one), with NO exceptions, even for a "trivial" one-line edit. It governs the MPL-2.0 header on new files, the KDoc-for-declarations / //-for-statements split, the "why, not what" comment voice, the trailing comma rule, modifier as the first parameter, string resources…

Its SKILL.md is about 2.8k 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 Agent Workflows, covering Agent instruction files. The repository describes itself as: A cross-platform songbook and metronome with a built-in chordPro editor, setlists, transposition, PDF export, and Dropbox sync. The licence is MPL-2.0.

When your agent uses it

  • Tasks that involve Agent instruction files

Example prompts

  • “trivial”
  • “why, not what”
  • “/code-style”

What it can do on your machine

Read from SKILL.md and the folder at commit 94d4b7f. 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

    Shell commands in SKILL.md call:

    • git

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

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    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

Code Style loads about 2.8k tokens when it runs. Until then it costs about 159 tokens; SKILL.md has 1,474 words of instructions outside code blocks.

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

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 pandulapeter/campfire at commit 94d4b7f, republished under its MPL-2.0 licence (© pandulapeter). 1,474 words, ~2,838 tokens.

Download SKILL.mdSave it as .claude/skills/code-style/SKILL.md (or your agent's skills folder).
name
code-style
description
Code style, commenting, and documentation conventions for the Campfire codebase. MANDATORY — invoke this skill BEFORE writing or editing ANY source in this repo (every Write or Edit to a `.kt`/`.kts`/`strings.xml` file, new file or change to an existing one), with NO exceptions, even for a "trivial" one-line edit. It governs the MPL-2.0 header on new files, the KDoc-for-declarations / `//`-for-statements split, the "why, not what" comment voice, the trailing comma rule, `modifier` as the first parameter, string resources, and keeping the per-module `CLAUDE.md` files in sync. Get these right while writing, not after.

Campfire code style

Conventions for matching the pre-established style of this codebase. Architecture, the module graph and the build are in the root CLAUDE.md and the per-module ones; this skill is about how the code reads.

License header

  • Every new file starts with the MPL-2.0 header, copied verbatim from a sibling file: .kt, .kts, .xml (comment syntax), .md (HTML comment), .gitignore-style config (# lines). No exceptions — a new file without it is an incomplete change.
  • The year range stays as the siblings have it (2017-2026); don't invent a new one per file.

Comments

Campfire is a heavily commented codebase, but only in one direction: comments carry the why, never the what. The bar for a comment is "a reader who understands Kotlin and Compose would still get this wrong or undo it".

  • Never narrate routine code. No comment above a remember, a when, a mapper, a LaunchedEffect that does the obvious thing, and no section-divider banners. If the code says it, the comment is noise.
  • Do comment the load-bearing decision. Platform quirks, ordering constraints, API misbehavior, why a state is eager instead of WhileSubscribed, why a sheet clears visibleDialog itself, why a file input is wider than it looks like it should be. These are exactly the comments the codebase already has, and the ones a future "simplification" would otherwise delete.
  • Write them as prose, in full sentences, in the voice of the existing comments and CLAUDE.md files: specific, technical, unhurried, several lines when the reason needs several lines. Wrap at the same width as the surrounding file (~130 columns). Not telegraphic fragments, not "// HACK".
  • Never write archaeology. Once a fix has landed the code is simply how it works; no "this used to crash because…", no postmortems, no bug/ticket numbers. Where an unintuitive solution invites being optimized away, state the constraint that makes it necessary, in the present tense.
  • No TODOs, no commented-out code. Delete it instead.

Documentation (KDoc)

  • Declaration-level documentation is always KDoc (/** … */), never a // block — including on internal and private declarations. // comments are for statements inside a function body.
  • api modules carry the contract. Interfaces in :data:source:*:api, :data:repository:api, :domain:api and the public surface of :chordpro are documented with KDoc that explains the rules a second implementation must honor (see SyncProvider for the tone): what the type is for, what is opaque, what may throw, what the caller must not assume. @param only where the parameter is not self-explanatory.
  • implementation modules are documented by naming and structure, plus a class-level KDoc where a class's job isn't obvious from its name. Don't KDoc every member of an Impl.
  • Keep KDoc in sync when you change a signature or its behavior; a stale KDoc is worse than none.

Formatting

  • Always use trailing commas on the last element of any multi-line comma-separated list — function parameters and arguments, constructor parameters, collection literals, enum entries, when with multiple guards. This keeps diffs minimal and reordering clean.
  • The whole codebase has them, so a list without one is an oversight rather than an older style. The closing bracket decides: a ) or ] that starts a line of its own ends a list that wants a trailing comma; one that sits at the end of the last element's line does not. A parameter list broken across lines counts even with a single parameter in it, since a second one is the expected next edit — but a single-argument call written that way does not, and neither does a js("""…""") block.
  • enum entries follow the same rule, except where the list ends in a ; because members come after it. A when branch with several conditions keeps the last one on the arrow's line, so there is nothing to put a comma after.
  • Expression bodies wherever the function is one expression, including Composables that are a single layout call (private fun ScreenSurface(...) = Surface(...)) and one-line overrides that just delegate.
  • Match the surrounding file's indentation, import order and idiom rather than reformatting to a personal preference. Don't reorder imports of files you touch.
  • Named arguments for anything where the call site would otherwise be a row of positional values — Koin wiring, use case invocations, multi-parameter Composables.

Kotlin Multiplatform rules

  • commonMain stays JVM-free: no java.*, no KoinJavaComponent, no JVM-only libraries. Use kotlin.uuid.Uuid, androidx.compose.ui.text.intl.Locale, KoinPlatform.getKoin() and import kotlinx.coroutines.IO for Dispatchers.IO.
  • Platform behavior goes into androidMain / desktopMain / iosMain / wasmJsMain behind expect/actual — all four actuals, in the same change. A new expect that only three platforms implement does not build.
  • Implementation classes are internal and named <Interface>Impl; Compose components in :presentation are internal too. Use cases are operator fun invoke.
  • New Koin bindings go into the module's own top-level Module.kt, nowhere else.
  • Cross layers through the mapper/ packages; never leak a document/entity type upwards.

Compose

  • modifier: Modifier = Modifier is the first parameter of a Composable that takes one — this repo's order, even though the Compose guidelines say otherwise. Follow the repo.
  • A Composable reads as a short list of named children. When a body grows several distinct visual groups, extract each into its own private @Composable named for what it is in the UI (SongFilters, SectionHeader), not for where it sits. A single focused widget needs no extraction.
  • Extraction must not change the rendered output: don't add a Row/Column/Box a group didn't have, don't drop one it relied on, and apply parent-scope modifiers (Modifier.weight) at the call site.
  • Material 3 Expressive only (org.jetbrains.compose.material3). Never import androidx.compose.material (M2). Icons are vector drawables in composeResources/drawable/, loaded with painterResource and passed around as Painter.
  • Nothing appears or disappears abruptly: new UI states animate in and out the way the neighboring screens' empty/error states do.
Show full SKILL.md (557 more words)Show less

User-facing strings

  • No hardcoded user-facing strings in UI code — Text, contentDescription, titles, labels, hints, dialog and notification text all come from composeResources/values/strings.xml.
  • Read them with com.pandulapeter.campfire.presentation.localization.stringResource(Res.string.x). Never the org.jetbrains.compose.resources overload: it ignores the in-app language.
  • Add every new key to both values/strings.xml and values-hu/strings.xml, in the same commented group in both files, and translate the Hungarian properly. A missing key is a build-time hole that shows up as "???".
  • Formatted strings are always called with their arguments (%1$s, %1$d); never concatenate a literal with a value. A sentence that takes text somebody else wrote — a title, a tag, a header value, a file or account name — is read with textResource(Res.string.x, text) (:presentation's components/TextResource.kt) instead: the plugin's formatter scans its own output a second time, and the % s in 100% sure is a format specifier to it (pluralTextResource(Res.plurals.x, count, count.toString(), text) for a <plurals> that carries such text). Keys are lower_snake_case, grouped by intent, and an existing key is reused rather than duplicated.
  • Exempt: file names, preference keys, serialization identifiers, ChordPro directive names.

Clean up after changes

  • Never leave anything unused behind. When a change removes the last usage of a declaration, delete the declaration: unused imports, private/internal functions, properties, classes, expect/actual pairs, drawables, and string keys — in every locale file.
  • After editing, grep for each symbol and resource you stopped using and confirm there is no remaining reference before you call the task done.

Refactor old code when a change outgrows it

  • Refactor what your change makes wrong. A new feature often leaves a name, signature or structure that no longer fits — fix it as part of the change instead of bolting on.
  • Rename when scope changes. If loadFile starts saving too, or a …Toggles Composable gains a slider, the name now lies. Rename it and every call site, with no stragglers.
  • Stay within the spirit of the change: leave touched code cleaner, don't start unrelated rewrites.

Tests

  • Only pure logic is tested, in commonTest, run on the desktop target: :chordpro, :domain:implementation (ImportPlanner), :data:source:local:implementation (zip, file storage), :data:source:remote:* (hashing, encoders, the authorization URL), :data:repository:implementation (SyncPlanner) and :presentation (pure helpers pulled out of the screens and the view model, never a Composable). The UI itself is untested.
  • When you change any of those, add or update the tests in the same change, and run:
    bash
    ./gradlew :chordpro:desktopTest :domain:implementation:desktopTest :data:source:local:implementation:desktopTest :data:source:remote:api:desktopTest :data:source:remote:implementation:desktopTest :data:repository:implementation:desktopTest :presentation:desktopTest
  • Don't add a test module or a UI test framework for a change that doesn't warrant one.

Keep the CLAUDE.md files in sync

  • After a significant change, update the relevant CLAUDE.md — the module's own and the root one where it describes what you changed (module responsibilities, the data flow, a screen's behavior, the sync rules, the library layout, build properties). These files are unusually detailed here, and their value is that they are true.
  • Match their prose voice and keep it terse. Routine edits that change nothing documented need no doc update, and don't add a new section for something that was never documented unless it earns one.

Committing

  • Never commit automatically. Leave the work in the tree so it can be reviewed. Only run git add / git commit / git push when that request explicitly asked for it — finishing the code, fixing the build or passing the tests is not an implicit instruction to commit.
  • When you are asked to commit, load the commit-messages skill first.

© pandulapeter, MPL-2.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/code-style of pandulapeter/campfire.

Open the folder on GitHubat commit 94d4b7f

Compare with similar skills

Code Style 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.

Code Style compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Style this skillpandulapeter/campfire101—~2.8kAutomated safety check: PassMPL-2.0
Docs Gardeningmhmzdev/the-holy-quran-app889—~1.1kAutomated safety check: PassMIT
Mine HistoryZoneMinder/zmNinjaNg110—~1kAutomated safety check: PassApache-2.0
Happier Profile And Optimizehappier-dev/happier1.9k—~3.2kAutomated safety check: PassMIT
Using Agent Skillsaddyosmani/agent-skills103k4 repos~2.4kAutomated safety check: PassMIT
Claude ReflectBayramAnnakov/claude-reflect1.7k2 repos~627Automated safety check: PassMIT

Similar skills

  • Docs Gardening

    mhmzdev/the-holy-quran-app

    Audit and maintain The Holy Qur'an app's knowledge base (AGENTS.md, .agents/rules/, docs/ OKF bundle) for staleness, broken cross-links, drift from code, and OKF structural issues.

    889 GitHub stars~1.1k tokensUpdated 28 days ago
    Agent WorkflowsAuto-check passed
  • Mine History

    ZoneMinder/zmNinjaNg

    A skill your agent uses when asked to mine the commit history for lessons the agent instruction files have not captured, to audit whether domain-context and contracts reflect what actually broke, or…

    110 GitHub stars~1k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • Happier Profile And Optimize

    happier-dev/happier

    The method for profiling and optimizing anything whose success is a measured cost — frame the phase and metric, choose an instrument that can actually see the cost, label the waste, falsify the…

    1.9k GitHub stars~3.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Using Agent Skills

    addyosmani/agent-skills

    Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.

    103k GitHub starsUsed in 4 repos~2.4k tokens
    Agent WorkflowsAuto-check passed
  • Claude Reflect

    BayramAnnakov/claude-reflect

    Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md.

    1.7k GitHub starsUsed in 2 repos~627 tokens
    Agent WorkflowsAuto-check passed
  • Writing For Agents

    bestofjs/bestofjs

    Writing documents for agents. An agent skill from bestofjs/bestofjs.

    3.1k GitHub starsUsed in 19 repos~2.7k tokens
    Agent WorkflowsAuto-check passed

More from pandulapeter/campfire

  • Codebase Review

    pandulapeter/campfire

    The Campfire review-sweep process — read-only area reviewers, one plan file per verified finding, a README.md that indexes them into parallel lanes, an EXECUTION.md orchestrator brief, and later the…

    101 GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Prepare Release

    pandulapeter/campfire

    Prepare a Campfire release by writing a paste-ready GitHub release-notes draft (with the stores' "what's new" blurb and Play's update priority embedded in it), updating the localized in-app update…

    101 GitHub stars~4.9k tokensUpdated today
    Auto-check passed
  • Store Screenshots

    pandulapeter/campfire

    Retake Campfire's promotional images for every platform and form factor — the store listings (Play Store, App Store, Mac App Store, Microsoft Store), the Play Store feature graphic, Apple's product…

    101 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Commit Messages

    pandulapeter/campfire

    Commit message conventions for the Campfire repo. An agent skill from pandulapeter/campfire.

    101 GitHub stars~700 tokensUpdated today
    Auto-check passed

Questions about Code Style

What does Code Style do?

Code style, commenting, and documentation conventions for the Campfire codebase. Code Style is an agent skill from pandulapeter/campfire. Code style, commenting, and documentation conventions for the Campfire codebase.

When should I use Code Style?

Code Style fits situations like: tasks that involve Agent instruction files.

How do I install Code Style in Claude Code?

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

How do I install Code Style in Codex?

Run `npx skills add pandulapeter/campfire --skill code-style -a codex`. Or copy the skill folder (.claude/skills/code-style in pandulapeter/campfire) into .agents/skills/code-style in your project. Codex loads it when a task matches its description.

Can I use Code Style 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 pandulapeter/campfire --skill code-style -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-style, .gemini/skills/code-style, .github/skills/code-style and .opencode/skills/code-style in your project.

What does Code Style need to run?

Going by SKILL.md and its folder, Code Style needs the command-line tools its instructions call (git).

Does Code Style access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Code Style 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 Code Style use?

Code Style is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Style use?

About 2.8k tokens (SKILL.md is roughly 11k 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 Code Style?

Skills that share tags, products or a category with Code Style: Docs Gardening (mhmzdev/the-holy-quran-app, 889 stars), Mine History (ZoneMinder/zmNinjaNg, 110 stars), Happier Profile And Optimize (happier-dev/happier, 1.9k stars) and Using Agent Skills (addyosmani/agent-skills, 103k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Style?

pandulapeter (a GitHub user) maintains it in pandulapeter/campfire, which has 101 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 8, 2026.

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