aktual: Skill for Claude Code

.claude/skills/apply-upstream-migration/SKILL.md

apply-upstream-migration is a skill for Claude Code from jonapoul/aktual. It costs 50 tokens per session (1,729 once invoked), scanned A, original, Apache-2.0.

A guide for applying an upstream database change to Aktual, an Android budgeting app, and updating the matching Kotlin and SQL files.

In plain words
What is it for?
It helps developers import migration files, update SQLDelight schemas and adapters, add needed model types, and adjust migration tests.
Why use it?
It prevents the app's database structure, data models, and migration tests from getting out of sync with the upstream project.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

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 →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/jon/dev/actual/packages/loot-core/migrations/<filename>.

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/skills/apply-upstream-migration/SKILL.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 apply-upstream-migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/jonapoul/aktual/apply-upstream-migration.svg)](https://agentmods.dev/skills/jonapoul/aktual/apply-upstream-migration)
Your own site
<a href="https://agentmods.dev/skills/jonapoul/aktual/apply-upstream-migration"><img src="https://agentmods.dev/badge/skills/jonapoul/aktual/apply-upstream-migration.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,729 The whole file, excluding the scripts and references it only reads on demand.
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.00050 $0.01729
Opus 5 $0.00025 $0.00864
Sonnet 5 $0.00010 $0.00346
Haiku 4.5 $0.00005 $0.00173

Measured 6d ago against content hash b8a752958d98, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

apply-upstream-migration 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 6d 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/skills/apply-upstream-migration/SKILL.md · 165 lines

How it starts

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

Apply a new upstream Actual database migration to Aktual's database layer.

Do NOT ask clarifying questions — just execute.

Arguments

  • $ARGUMENTS is the migration filename, e.g. 1778510362740_add_cleanup_groups_and_def.sql
  • If omitted, read it from .github/upstream-migration-tracker/last-known-migration.txt

Step-by-Step Process

1. Read the upstream migration SQL

The migration lives at:

/home/jon/dev/actual/packages/loot-core/migrations/<filename>

Parse all DDL statements: ALTER TABLE ... ADD COLUMN, CREATE TABLE, CREATE INDEX, etc. Strip BEGIN TRANSACTION / COMMIT wrappers.

2. Categorise the changes

For each statement:

Statement Actions needed
ALTER TABLE t ADD COLUMN c Update .sq file + possible adapter
CREATE TABLE t New .sq file + adapter + BuildDatabase.kt + possible ID type. Emit as CREATE TABLE IF NOT EXISTS in the migration (never bare CREATE TABLE)
CREATE INDEX Add to the relevant .sq file (no adapter)

Also check if new column types need new model classes (sealed interfaces, value class IDs).

3. Update SQLDelight schema files

All .sq files: aktual-budget/data/db/src/commonMain/sqldelight/aktual/budget/db/

New column on an existing table:

  • Add the column to the CREATE TABLE statement in the matching .sq file
  • If it stores typed JSON, declare it as TEXT AS MyType DEFAULT NULL with an import at the top
  • If it stores a typed ID, declare it as TEXT AS FooId DEFAULT NULL

New table:

  • Create Foo.sq (PascalCase, matching the table name)
  • Mirror upstream columns with SQLDelight typed aliases
  • Use tombstone INTEGER AS Boolean DEFAULT 0 for the tombstone column
  • Add at minimum: insert: INSERT OR REPLACE INTO foo(id, ...) VALUES (?, ...); and getById: SELECT * FROM foo WHERE id = ?;

4. Add model types if needed

Types live in aktual-budget/model/src/commonMain/kotlin/aktual/budget/model/.

New table ID — add to Ids.kt, following the existing value class pattern:

@JvmInline
@Serializable
value class FooId(val value: String) : Comparable<FooId> {
  override fun toString(): String = value
  override fun compareTo(other: FooId) = value.compareTo(other.value)
}

Read the full file on GitHub · 165 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. 6d ago First seen · 165 lines · 50 tokens per session scan A b8a752958d98

Subscribe to this mod's changes

apply-upstream-migration is a skill published in the GitHub repository jonapoul/aktual (34 stars, last pushed today), licensed Apache-2.0. It adds 50 tokens to every session and 1,729 once invoked, about $0.0003 per session on Opus 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

Other skills, from other repositories

kotlin-expert

Expert-level Kotlin development, Android, coroutines, and multiplatform. Use when the user mentions Android, coroutines, multiplatform, or JVM, or when the task involves Kotlin Fundamentals, Android Development, Kotlin Multiplatform, or Kotlin Style.

personamanagmentlayer/pcl · 55 tokens

kotlin-docs

Comprehensive Kotlin 2.4.0 reference covering all language features: variables, basic types, strings, control flow, functions, lambdas, classes, objects, inheritance, interfaces, data classes, sealed classes, generics, collections, sequences, null safety, coroutines (suspend, launch, async, Flow, StateFlow, channels)…

pledgeandgrow/pledge-skills · 183 tokens

compose-animations

Use when writing or reviewing Jetpack Compose motion: visibility enter/exit, animating one property toward a target, color or size transitions, multiple properties from one state, switching composable content, or choosing between AnimatedVisibility, animateAsState, rememberTransition, AnimatedContent, and Crossfade.

chrisbanes/skills · 64 tokens

compose-focus-navigation

Use when writing or reviewing Jetpack Compose UI for TV, keyboard, desktop, accessibility focus, D-pad navigation, FocusRequester, focusProperties, key events, or initial focus behavior.

chrisbanes/skills · 41 tokens

kotlin-control-flow

Use when writing or reviewing Kotlin branching and control flow: when expressions, guard conditions, sealed type exhaustiveness, smart casts, nullable branching, early returns, or replacing complex if/else chains.

chrisbanes/skills · 44 tokens

release-kotlin-library

Use when preparing, publishing, or checking readiness for a new Kotlin library version in a repository using gradle-maven-publish-plugin, including release changelog reconciliation, API snapshots, and publication verification.

chrisbanes/skills · 45 tokens