Index of every page on this site: llms.txt
All skills
cpinan avatar

/corta-spam-add-setting

@10c0750
Run it yourself

Use when adding a new persisted user setting (a new field on SettingsRepository) in the Corta Spam app. Lists the exact fallout of files that must change — every implementer/fake breaks otherwise.

  • 1 file
  • 3.5 KB
  • Updated 4 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/cpinan/corta-spam/corta-spam-add-setting

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈56 tokens for metadata: the name and description. ≈811 when used: this file.

Description uses 2.8% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈221 characters, or 2.8%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Add a new SettingsRepository field — Corta Spam

Adding a field to SettingsRepository (shared/src/commonMain/kotlin/org/carlospinan/bloqueador/app/settings/SettingsRepository.kt) is an interface change — every implementer must be updated in the same pass or the build breaks. This project uses hand-written fakes (no MockK), but there is now exactly one of them per repository interface, under shared/src/commonTest/kotlin/.../testing/.

1. Storage primitive (only if the value type is new)

db/KeyValueSettingsStore.kt currently has readBool/writeBool and readInt/writeInt. Reuse these; only add a new read*/write* pair if the setting isn't a bool/int/string.

2. The interface + real implementation

  • shared/.../settings/SettingsRepository.kt — add the Flow<T> (or StateFlow<T> if Android Telecom/BroadcastReceiver code needs synchronous .value access outside a coroutine — check whether the setting is read from PassthroughInCallService/CallActionReceiver first) and the suspend fun set...(...).
  • shared/.../settings/SqlSettingsRepository.kt — back it with a new string key, a sane default, same MutableStateFlow + init-hydration pattern as the existing fields.

3. Fallout — every one of these needs the new member added or the build fails

Confirmed via grep -rl "SettingsRepository" shared androidApp --include="*.kt" — re-run that grep to catch any new implementer added since this was written:

  • shared/src/commonMain/kotlin/.../settings/SettingsViewModel.kt — thread into SettingsUiState. If combine() is already at 5 flows (kotlinx.coroutines' typed overload ceiling), don't force a 6-arg vararg combine — chain a second .combine(newFlow) { partial, value -> ... } on top of the existing combine's result, like repeatedCallerBypassCount did.
  • shared/src/commonMain/kotlin/.../home/HomeViewModel.kt (if it reads settings)
  • shared/src/commonMain/kotlin/.../rules/domain/EvaluateIncomingCallUseCase.kt (if the rule engine needs it)
  • shared/src/commonMain/kotlin/.../onboarding/DialerOnboardingViewModel.kt
  • androidApp/.../telecom/PassthroughInCallService.kt
  • One test fake: shared/src/commonTest/kotlin/.../testing/FakeSettingsRepository.kt. Add the flow as a constructor parameter with a default (so no existing call site breaks) and a write-through setter, matching the other fields. testing/FakeSettingsRepositoryTest.kt pins that contract — extend it if the new default matters. Every ViewModel and screen test shares this one fake; there are no per-test copies left.

4. UI

SettingsScreen.kt — new toggle/control, gated visibility pattern already used for autoAllowContacts's contacts-permission gate. New Compose strings needed — use corta-spam-add-localized-string skill for that part (all 4 locales).

5. If the setting feeds a RuleDecision/precedence change

Also touches RuleDecision.kt (new variant or field) and RulePrecedenceResolver.kt's ResolveContext — that likely means a new rule_type CHECK value too. Use corta-spam-sqldelight-check-migration skill for that part.

6. Verify

Run corta-spam-verify-build (Android trio + iOS compile since this always touches commonMain).

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 10c0750. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 weeks ago.

Steadyupdated 4 months ago
metadata
{
  "type": "project-runbook",
  "version": "1.1.0"
}

README badge

README badge for cpinan/corta-spam/corta-spam-add-setting