sqlite-knowledge-patch
SQLite changes since training cutoff (latest: 3.51) — json_pretty, unistr, jsonb_each/jsonb_tree, percentile aggregates, multi-arg iif, numeric underscores, sqlite3_setlk_timeout. Load before working with SQLite.
What this skill does
# SQLite 3.46+ Knowledge Patch
Claude's baseline knowledge covers SQLite through 3.45. This skill provides changes from 3.46.0 (2024-05-23) onwards.
## New SQL Functions
| Function | Version | Description |
|----------|---------|-------------|
| `json_pretty(X)` / `json_pretty(X,indent)` | 3.46.0 | Pretty-print JSON with optional indent string |
| `unistr(X)` | 3.50.0 | Convert string with `\uXXXX` Unicode escapes to characters |
| `unistr_quote(X)` | 3.50.0 | Quote string using Unicode escape syntax |
| `jsonb_each(X)` | 3.51.0 | Like `json_each()` but returns JSONB for array/object values |
| `jsonb_tree(X)` | 3.51.0 | Like `json_tree()` but returns JSONB for array/object values |
| `median(X)` | 3.47.0 | Median aggregate (CLI extension) |
| `percentile(X,P)` | 3.47.0 | Percentile aggregate (CLI extension) |
| `percentile_cont(X,P)` | 3.47.0 | Continuous percentile (CLI extension) |
| `percentile_disc(X,P)` | 3.47.0 | Discrete percentile (CLI extension) |
## iif() / if() Enhancements
```sql
-- 3.48.0: if() is an alias for iif()
-- 3.48.0: 2-argument form returns NULL when false
SELECT
if (x > 0, 'positive');
-- NULL when x <= 0
-- 3.49.0: accepts any number of args >= 2 (chained if/elseif)
SELECT
iif (x > 0, 'positive', x < 0, 'negative', 'zero');
```
## Numeric Literal Underscores (3.46.0)
```sql
SELECT
1_000_000;
-- 1000000
SELECT
3.141_592_653;
-- 3.141592653
SELECT
0xFF_FF;
-- 65535
```
## Date/Time Enhancements (3.46.0)
```sql
-- New strftime format specifiers
SELECT strftime('%G', 'now'); -- ISO 8601 week-numbering year
SELECT strftime('%V', 'now'); -- ISO 8601 week number
-- Ceiling/floor modifiers for ambiguous month shifts
SELECT date('2024-01-31', '+1 month', 'ceiling'); -- 2024-03-01
SELECT date('2024-01-31', '+1 month', 'floor'); -- 2024-02-29
```
## New C APIs
See [references/new-apis.md](references/new-apis.md) for details.
- `sqlite3_setlk_timeout()` (3.50.0) — separate timeout for blocking locks
- `sqlite3_set_errmsg()` (3.51.0) — extensions can set error messages
- `sqlite3_db_status64()` (3.51.0) — 64-bit version of `sqlite3_db_status()`
- `sqlite3changeset_apply_v3()` (3.51.0) — session extension
## DBCONFIG Options
```c
// 3.49.0 — all default to ON
sqlite3_db_config(db, SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE, 0, 0); // prevent ATTACH creating new DBs
sqlite3_db_config(db, SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE, 0, 0); // make ATTACH read-only
sqlite3_db_config(db, SQLITE_DBCONFIG_ENABLE_COMMENTS, 0, 0); // disallow SQL comments
```
## JSON Operator Change (3.47.0)
```sql
-- Negative RHS on ->> accesses from the right of an array
SELECT '[10,20,30]' ->> -1; -- 30 (last element)
SELECT '[10,20,30]' ->> -2; -- 20 (second to last)
```
## FTS5 Enhancements
- **3.47.0**: `fts5_tokenizer_v2` API and `locale=1` option for locale-aware tokenizers
- **3.47.0**: `contentless_unindexed=1` for contentless tables with persistent UNINDEXED columns
- **3.48.0**: `insttoken` config option and `fts5_insttoken()` function for prefix queries
- **3.51.0**: STRICT typing enforced on computed columns
## Other Notable Changes
- **3.47.0**: `group_concat()` returns empty string (not NULL) for single empty string input
- **3.47.0**: `sqlite3_rsync` — experimental tool for replicating SQLite databases
- **3.48.0**: Max function arguments increased from 127 to 1000
- **3.48.0**: Build only requires C compiler + make (no TCL dependency)
- **3.50.0**: `%Q`/`%q` printf with `#` flag converts control chars to `unistr()` escapes
- **3.51.0**: `PRAGMA wal_checkpoint=NOOP` — check if checkpoint is needed without doing one
- **3.51.0**: `carray` and `percentile` extensions in amalgamation (compile with `-DSQLITE_ENABLE_CARRAY` / `-DSQLITE_ENABLE_PERCENTILE`)
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.