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.
curl -O https://raw.githubusercontent.com/jonapoul/aktual/main/.claude/skills/apply-upstream-migration/SKILL.mdgit clone --depth 1 https://github.com/jonapoul/aktualWrote 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.
[](https://agentmods.dev/skills/jonapoul/aktual/apply-upstream-migration)<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>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.
| Model | Per session | Once 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 |
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.
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
$ARGUMENTSis 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 TABLEstatement in the matching.sqfile - If it stores typed JSON, declare it as
TEXT AS MyType DEFAULT NULLwith 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 0for the tombstone column - Add at minimum:
insert: INSERT OR REPLACE INTO foo(id, ...) VALUES (?, ...);andgetById: 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)
}
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.
- 6d ago First seen · 165 lines · 50 tokens per session scan A b8a752958d98
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.
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.
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)…
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.
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.
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.
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.