aktual: Instructions file for Claude Code

CLAUDE.md

aktual CLAUDE.md is an instructions file for Claude Code from jonapoul/aktual. It costs 3,788 tokens per session, scanned A, original, Apache-2.0.

A set of coding instructions for Aktual, an unofficial Kotlin Multiplatform app for Actual personal budgeting software. It covers project conventions, builds, tests, and generated user-facing text.

In plain words
What is it for?
Building Kotlin modules, testing flows, updating localized strings, and maintaining architecture references.
Why use it?
It helps coding agents work consistently across the app's Android and desktop code without overlooking project-specific rules.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is jonapoul/aktual's own configuration. It tells Claude Code how to work on aktual itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything aktual configures →

Reuse

Borrowing it

Nothing to install: this file belongs to jonapoul/aktual. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/jonapoul/aktual/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/jonapoul/aktual

Made for: Claude Code.

Wrote 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.

agentmods badge for aktual CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jonapoul/aktual/claude-md/github.svg)](https://agentmods.dev/instructions/jonapoul/aktual/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/jonapoul/aktual/claude-md"><img src="https://agentmods.dev/badge/instructions/jonapoul/aktual/claude-md/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.

agentmods 80×15 button for aktual CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/jonapoul/aktual/claude-md"><img src="https://agentmods.dev/badge/instructions/jonapoul/aktual/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,788 This file is loaded in full into every session.
When invoked 3,788 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.03788 $0.03788
Opus 5.5 $0.01515 $0.01515
Sonnet 5.5 $0.00758 $0.00758
Haiku 4.5 $0.00379 $0.00379

Measured 2d ago against content hash 9e53c9a62c95, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

aktual CLAUDE.md 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 2d 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.

CLAUDE.md · 158 lines

How it starts

The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

Guidance for Claude Code when working in this repo.

Project

Aktual is an unofficial Kotlin Multiplatform client for Actual personal budgeting software, targeting Android and Desktop (JVM). Pet project, unaffiliated with upstream.

General

  • IMPORTANT: After any architectural/structural change, grep **/CLAUDE.md for references that need updating (scopes, annotations, module paths, DI patterns). Don't wait to be asked.
  • Limit visibility where possible: make a type internal unless another module uses it. Give injected classes (@Inject, @AssistedInject, @Contributes*) an internal constructor unless another module calls it, so their dependencies stay out of the public API. Metro still wires them across modules.
  • Prefer kotlinx.immutable collections in the UI layer, not plain List/Set.
  • Prefer stateFlow.update { x } over stateFlow.value = x.
  • In coroutine code, catch failures with runCatchingCancellable(attempt = { }, onFailure = { e -> }, finally = { }) (aktual-core), not runCatching or a hand-written catch (e: CancellationException) { throw e }. It rethrows cancellation and returns the result of attempt, or of onFailure if it threw. Use finally instead of wrapping it in try/finally.
  • The project compiles with -Xcontext-sensitive-resolution (CSR). Write enum entries, sealed subtypes and companion properties unqualified wherever the expected type is known, and don't import the entry. The RedundantQualifier detekt rule flags any you miss. Don't qualify just in case.
    // Unqualified
    takesRole(Admin); role == Admin; val role: Role = Admin; assertThat(role).isEqualTo(Admin)
    when (role) { Admin -> 1 }; state is Failure; state as Failure; takesKind(Button); listOf<Role>(Admin, Basic)
    role ?: Admin; amount > Zero; Admin in roles; val f: () -> Role = { Admin }
    
    // Must qualify: no expected type, or a constructor call
    val role = Role.Admin; listOf(Role.Admin); a to Role.Admin; roles += Role.Admin
    val r = if (x) Role.Admin else Role.Basic; takesState(State.Failure("x"))
    
    • Only a type, function or imported property in scope makes a name ambiguous (an icon import like aktual.core.icons.Copy clashes with LogExportTarget.Copy) (LoginMethod.Password vs the Password class, Role.Checkbox vs the Checkbox composable). Another enum's entry with the same name doesn't count, so consume(Plus) and UnaryNode(Plus, x) both resolve.
    • CSR can't infer a type argument from the name, so it doesn't apply where the parameter type mentions the call's own type parameter, like get(key: DbMetadataKey<T>). Statically import DbMetadataKey companion keys instead (import aktual.budget.model.DbMetadataKey.Companion.BudgetName, then prefs[BudgetName]).
    • Don't name new enum entries or sealed subtypes after Kotlin types (Number, Any, Boolean, Error), since that forces a qualifier at every use.
  • Strings.xyz (user-facing text) is generated from XML in aktual-core:l10n - add the string there and regenerate, don't hardcode. See aktual-core/l10n.
  • Before using or adding an icon, check upstream Actual for an equivalent and prefer it over Material. See aktual-core/icons.
  • In tests, observe Flow/StateFlow emissions with Turbine (flow.test { awaitItem() }), not by reading .value or manual collectors.
  • Put tests in commonTest. In modules with an android target they run on both targets. Use androidHostTest only for tests needing real Android behaviour (Context, Bundle, Looper, Compose UI), with @RunWith(RobolectricTestRunner::class). Host tests run on plain JUnit otherwise, with Android stubs returning defaults (isReturnDefaultValues).
  • Wrap comments at 100 columns, counting the indent and the // prefix (an 8-space indent leaves 89 characters of text). That is where ktfmt --google-style wraps them, not the max_line_length of 120 in .editorconfig. ktfmt doesn't reflow comments: it moves the overflow of each long line onto a new // line of its own, leaving stubs like // Existing mid-paragraph. When writing or editing a multi-line comment, rewrap the whole paragraph so every line fits. A line even one column over gets split, so measure rather than eyeball it: before running ktfmt, git diff -U0 origin/main -- '*.kt' '*.kts' | grep -E '^\+\s*//' | awk 'length > 101' must print nothing (101 allows for the diff's +). After ktfmt the stubs are short enough to pass that check, so look for them instead: a // line of one or two words followed by another // line.

Read the full file on GitHub · 158 lines

Changes

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.

  1. 2d ago Changed · +99 tokens per session 9e53c9a62c95
  2. 5d ago Changed · +6 lines · +472 tokens per session 6fdc585a3e7d
  3. 6d ago Changed · +26 tokens per session 1ba74cb2217c
  4. 8d ago Changed · +1 lines · +38 tokens per session 3079300bf530
  5. 9d ago Changed · +1 lines · +74 tokens per session e2a4e231794b
  6. 11d ago Changed · +9 lines · +391 tokens per session 430a81bea77f
  7. 15d ago Changed · +2 lines · +81 tokens per session df65156ab658
  8. 17d ago Changed · +4 tokens per session 8525584bf0e6
  9. 19d ago Changed · +8 tokens per session c7ef41ff5fa4
  10. 20d ago First seen · 139 lines · 2,595 tokens per session scan A e155cefd2c00

Subscribe to this mod's changes

aktual CLAUDE.md is an instructions file published in the GitHub repository jonapoul/aktual (43 stars, last pushed yesterday), licensed Apache-2.0. It adds 3,788 tokens to every session, about $0.0152 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-09-01.

Related

aktual CLAUDE.md compared with instructions from other repositories

aktual CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
aktual CLAUDE.mdjonapoul/aktualInstructions file43yesterdayApache-2.0A3,788Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode