一键导入
sticky-notes
Read and search Windows Sticky Notes — access your notes via the local SQLite database using built-in winsqlite3.dll, zero dependencies.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Read and search Windows Sticky Notes — access your notes via the local SQLite database using built-in winsqlite3.dll, zero dependencies.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Persistent agent memory via OpenViking — store and retrieve context across sessions using a tiered filesystem database. L0/L1/L2 context layers with semantic search.
Windows Task Scheduler — create, list, manage, and delete scheduled tasks for automated workflows, zero dependencies.
Browser integration — open URLs, read bookmarks and history from Edge/Chrome, get active tabs, list downloads, zero dependencies.
Local AI inference via Ollama — run LLMs on-device, manage models, detect NPU/GPU/DirectML hardware, zero cloud dependencies.
System diagnostics — CPU, RAM, battery, GPU, network, processes, OS info via WMI, zero dependencies.
Search, browse, and manage files and folders on Windows — file search, recent files, folder operations, disk info, zero dependencies.
| name | sticky-notes |
| description | Read and search Windows Sticky Notes — access your notes via the local SQLite database using built-in winsqlite3.dll, zero dependencies. |
| metadata | {"openclaw":{"emoji":"📝","os":["win32"]}} |
Read and search Windows Sticky Notes directly from the local database.
Uses Windows built-in winsqlite3.dll via P/Invoke — zero external dependencies.
Works on Windows 10/11 with PowerShell 5.1+. Requires the Sticky Notes app to have been opened and at least one note created.
Verify that the Sticky Notes database exists:
powershell.exe -NoProfile -Command "
$dbPath = Join-Path $env:LocalAppData 'Packages\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe\LocalState\plum.sqlite'
if (Test-Path $dbPath) {
$f = Get-Item $dbPath
Write-Host ('Database: {0}' -f $dbPath)
Write-Host ('Size: {0:N0} bytes' -f $f.Length)
Write-Host ('Modified: {0}' -f $f.LastWriteTime)
} else {
Write-Host 'Database not found. Open Sticky Notes and create at least one note first.'
}
"
Check the actual table structure (useful if the schema varies between Windows versions):
powershell.exe -NoProfile -Command "
Add-Type -TypeDefinition @'
using System;
using System.Runtime.InteropServices;
public class SQ {
const string L = ""winsqlite3.dll"";
[DllImport(L)] public static extern int sqlite3_open_v2(string f, out IntPtr db, int flags, IntPtr vfs);
[DllImport(L)] public static extern int sqlite3_close(IntPtr db);
[DllImport(L)] public static extern int sqlite3_prepare_v2(IntPtr db, string sql, int n, out IntPtr st, IntPtr t);
[DllImport(L)] public static extern int sqlite3_step(IntPtr st);
[DllImport(L)] public static extern IntPtr sqlite3_column_text(IntPtr st, int c);
[DllImport(L)] public static extern int sqlite3_finalize(IntPtr st);
public static string Utf8(IntPtr p) {
if (p == IntPtr.Zero) return string.Empty;
int len = 0; while (Marshal.ReadByte(p, len) != 0) len++;
byte[] b = new byte[len]; Marshal.Copy(p, b, 0, len);
return System.Text.Encoding.UTF8.GetString(b);
}
}
'@
$dbPath = Join-Path $env:LocalAppData 'Packages\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe\LocalState\plum.sqlite'
$db = [IntPtr]::Zero; $st = [IntPtr]::Zero
[SQ]::sqlite3_open_v2($dbPath, [ref]$db, 1, [IntPtr]::Zero) | Out-Null
$sql = ""SELECT name, sql FROM sqlite_master WHERE type='table' ORDER BY name""
[SQ]::sqlite3_prepare_v2($db, $sql, -1, [ref]$st, [IntPtr]::Zero) | Out-Null
while ([SQ]::sqlite3_step($st) -eq 100) {
$name = [SQ]::Utf8([SQ]::sqlite3_column_text($st, 0))
$ddl = [SQ]::Utf8([SQ]::sqlite3_column_text($st, 1))
Write-Host ('=== {0} ===' -f $name)
Write-Host $ddl
Write-Host ''
}
[SQ]::sqlite3_finalize($st) | Out-Null
[SQ]::sqlite3_close($db) | Out-Null
"
powershell.exe -NoProfile -Command "
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
Add-Type -TypeDefinition @'
using System;
using System.Runtime.InteropServices;
public class SQ {
const string L = ""winsqlite3.dll"";
[DllImport(L)] public static extern int sqlite3_open_v2(string f, out IntPtr db, int flags, IntPtr vfs);
[DllImport(L)] public static extern int sqlite3_close(IntPtr db);
[DllImport(L)] public static extern int sqlite3_prepare_v2(IntPtr db, string sql, int n, out IntPtr st, IntPtr t);
[DllImport(L)] public static extern int sqlite3_step(IntPtr st);
[DllImport(L)] public static extern IntPtr sqlite3_column_text(IntPtr st, int c);
[DllImport(L)] public static extern long sqlite3_column_int64(IntPtr st, int c);
[DllImport(L)] public static extern int sqlite3_finalize(IntPtr st);
public static string Utf8(IntPtr p) {
if (p == IntPtr.Zero) return string.Empty;
int len = 0; while (Marshal.ReadByte(p, len) != 0) len++;
byte[] b = new byte[len]; Marshal.Copy(p, b, 0, len);
return System.Text.Encoding.UTF8.GetString(b);
}
}
'@
$dbPath = Join-Path $env:LocalAppData 'Packages\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe\LocalState\plum.sqlite'
$db = [IntPtr]::Zero; $st = [IntPtr]::Zero
[SQ]::sqlite3_open_v2($dbPath, [ref]$db, 1, [IntPtr]::Zero) | Out-Null
$sql = ""SELECT Id, Text, Theme, CreatedAt, UpdatedAt FROM Note WHERE DeletedAt IS NULL OR DeletedAt = '' OR DeletedAt = 0 ORDER BY UpdatedAt DESC""
[SQ]::sqlite3_prepare_v2($db, $sql, -1, [ref]$st, [IntPtr]::Zero) | Out-Null
$i = 1
while ([SQ]::sqlite3_step($st) -eq 100) {
$id = [SQ]::Utf8([SQ]::sqlite3_column_text($st, 0))
$text = [SQ]::Utf8([SQ]::sqlite3_column_text($st, 1))
$theme = [SQ]::Utf8([SQ]::sqlite3_column_text($st, 2))
$ticks = [SQ]::sqlite3_column_int64($st, 4)
$updated = if ($ticks -gt 0) { [DateTime]::new($ticks).ToString('yyyy-MM-dd HH:mm') } else { 'unknown' }
$preview = if ($text.Length -gt 80) { $text.Substring(0,80) + '...' } else { $text }
$preview = $preview -replace ""[\r\n]+"", ' '
Write-Host (""--- Note {0} [{1}] ---"" -f $i, $theme)
Write-Host (""ID: {0}"" -f $id)
Write-Host (""Preview: {0}"" -f $preview)
Write-Host (""Updated: {0}"" -f $updated)
Write-Host ''
$i++
}
if ($i -eq 1) { Write-Host 'No notes found.' }
[SQ]::sqlite3_finalize($st) | Out-Null
[SQ]::sqlite3_close($db) | Out-Null
"
Flag 1 = SQLITE_OPEN_READONLY. Safe to run while Sticky Notes is open.
Timestamps are stored as .NET Ticks (100-nanosecond intervals since 0001-01-01).
powershell.exe -NoProfile -Command "
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
Add-Type -TypeDefinition @'
using System;
using System.Runtime.InteropServices;
public class SQ {
const string L = ""winsqlite3.dll"";
[DllImport(L)] public static extern int sqlite3_open_v2(string f, out IntPtr db, int flags, IntPtr vfs);
[DllImport(L)] public static extern int sqlite3_close(IntPtr db);
[DllImport(L)] public static extern int sqlite3_prepare_v2(IntPtr db, string sql, int n, out IntPtr st, IntPtr t);
[DllImport(L)] public static extern int sqlite3_step(IntPtr st);
[DllImport(L)] public static extern IntPtr sqlite3_column_text(IntPtr st, int c);
[DllImport(L)] public static extern long sqlite3_column_int64(IntPtr st, int c);
[DllImport(L)] public static extern int sqlite3_finalize(IntPtr st);
public static string Utf8(IntPtr p) {
if (p == IntPtr.Zero) return string.Empty;
int len = 0; while (Marshal.ReadByte(p, len) != 0) len++;
byte[] b = new byte[len]; Marshal.Copy(p, b, 0, len);
return System.Text.Encoding.UTF8.GetString(b);
}
}
'@
$dbPath = Join-Path $env:LocalAppData 'Packages\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe\LocalState\plum.sqlite'
$db = [IntPtr]::Zero; $st = [IntPtr]::Zero
[SQ]::sqlite3_open_v2($dbPath, [ref]$db, 1, [IntPtr]::Zero) | Out-Null
$sql = ""SELECT Text, Theme, CreatedAt, UpdatedAt FROM Note WHERE Id = 'NOTE_ID'""
[SQ]::sqlite3_prepare_v2($db, $sql, -1, [ref]$st, [IntPtr]::Zero) | Out-Null
if ([SQ]::sqlite3_step($st) -eq 100) {
$text = [SQ]::Utf8([SQ]::sqlite3_column_text($st, 0))
$theme = [SQ]::Utf8([SQ]::sqlite3_column_text($st, 1))
$created = [SQ]::sqlite3_column_int64($st, 2)
$updated = [SQ]::sqlite3_column_int64($st, 3)
$cDate = if ($created -gt 0) { [DateTime]::new($created).ToString('yyyy-MM-dd HH:mm') } else { 'unknown' }
$uDate = if ($updated -gt 0) { [DateTime]::new($updated).ToString('yyyy-MM-dd HH:mm') } else { 'unknown' }
Write-Host (""Theme: {0} | Created: {1} | Updated: {2}"" -f $theme, $cDate, $uDate)
Write-Host '---'
Write-Host $text
} else { Write-Host 'Note not found.' }
[SQ]::sqlite3_finalize($st) | Out-Null
[SQ]::sqlite3_close($db) | Out-Null
"
Replace NOTE_ID with the note's GUID from the list command.
powershell.exe -NoProfile -Command "
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
Add-Type -TypeDefinition @'
using System;
using System.Runtime.InteropServices;
public class SQ {
const string L = ""winsqlite3.dll"";
[DllImport(L)] public static extern int sqlite3_open_v2(string f, out IntPtr db, int flags, IntPtr vfs);
[DllImport(L)] public static extern int sqlite3_close(IntPtr db);
[DllImport(L)] public static extern int sqlite3_prepare_v2(IntPtr db, string sql, int n, out IntPtr st, IntPtr t);
[DllImport(L)] public static extern int sqlite3_step(IntPtr st);
[DllImport(L)] public static extern IntPtr sqlite3_column_text(IntPtr st, int c);
[DllImport(L)] public static extern long sqlite3_column_int64(IntPtr st, int c);
[DllImport(L)] public static extern int sqlite3_finalize(IntPtr st);
[DllImport(L)] public static extern int sqlite3_bind_text(IntPtr st, int idx, byte[] val, int n, IntPtr d);
public static string Utf8(IntPtr p) {
if (p == IntPtr.Zero) return string.Empty;
int len = 0; while (Marshal.ReadByte(p, len) != 0) len++;
byte[] b = new byte[len]; Marshal.Copy(p, b, 0, len);
return System.Text.Encoding.UTF8.GetString(b);
}
public static byte[] ToUtf8(string s) {
byte[] u = System.Text.Encoding.UTF8.GetBytes(s);
byte[] r = new byte[u.Length + 1]; Array.Copy(u, r, u.Length);
return r;
}
}
'@
$dbPath = Join-Path $env:LocalAppData 'Packages\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe\LocalState\plum.sqlite'
$db = [IntPtr]::Zero; $st = [IntPtr]::Zero
[SQ]::sqlite3_open_v2($dbPath, [ref]$db, 1, [IntPtr]::Zero) | Out-Null
$sql = ""SELECT Id, Text, Theme, UpdatedAt FROM Note WHERE Text LIKE ? AND (DeletedAt IS NULL OR DeletedAt = '' OR DeletedAt = 0) ORDER BY UpdatedAt DESC""
[SQ]::sqlite3_prepare_v2($db, $sql, -1, [ref]$st, [IntPtr]::Zero) | Out-Null
$pattern = '%' + 'SEARCH_TERM' + '%'
[SQ]::sqlite3_bind_text($st, 1, [SQ]::ToUtf8($pattern), -1, [IntPtr]::Zero) | Out-Null
$i = 0
while ([SQ]::sqlite3_step($st) -eq 100) {
$id = [SQ]::Utf8([SQ]::sqlite3_column_text($st, 0))
$text = [SQ]::Utf8([SQ]::sqlite3_column_text($st, 1))
$theme = [SQ]::Utf8([SQ]::sqlite3_column_text($st, 2))
$ticks = [SQ]::sqlite3_column_int64($st, 3)
$updated = if ($ticks -gt 0) { [DateTime]::new($ticks).ToString('yyyy-MM-dd HH:mm') } else { 'unknown' }
$preview = if ($text.Length -gt 100) { $text.Substring(0,100) + '...' } else { $text }
$preview = $preview -replace ""[\r\n]+"", ' '
Write-Host (""--- [{0}] {1} ---"" -f $theme, $updated)
Write-Host (""ID: {0}"" -f $id)
Write-Host $preview
Write-Host ''
$i++
}
Write-Host (""{0} note(s) found."" -f $i)
[SQ]::sqlite3_finalize($st) | Out-Null
[SQ]::sqlite3_close($db) | Out-Null
"
Replace SEARCH_TERM with the text to search for (case-insensitive via SQLite LIKE). Supports Chinese and other non-ASCII text via UTF-8 bind.
Close the Sticky Notes app before writing to avoid database conflicts.
powershell.exe -NoProfile -Command "
Add-Type -TypeDefinition @'
using System;
using System.Runtime.InteropServices;
public class SQ {
const string L = ""winsqlite3.dll"";
[DllImport(L)] public static extern int sqlite3_open_v2(string f, out IntPtr db, int flags, IntPtr vfs);
[DllImport(L)] public static extern int sqlite3_close(IntPtr db);
[DllImport(L)] public static extern int sqlite3_prepare_v2(IntPtr db, string sql, int n, out IntPtr st, IntPtr t);
[DllImport(L)] public static extern int sqlite3_step(IntPtr st);
[DllImport(L)] public static extern int sqlite3_finalize(IntPtr st);
[DllImport(L)] public static extern int sqlite3_bind_text(IntPtr st, int idx, byte[] val, int n, IntPtr d);
[DllImport(L)] public static extern int sqlite3_bind_int64(IntPtr st, int idx, long val);
[DllImport(L)] public static extern int sqlite3_bind_int(IntPtr st, int idx, int val);
[DllImport(L)] public static extern IntPtr sqlite3_errmsg(IntPtr db);
public static string Utf8(IntPtr p) {
if (p == IntPtr.Zero) return string.Empty;
int len = 0; while (Marshal.ReadByte(p, len) != 0) len++;
byte[] b = new byte[len]; Marshal.Copy(p, b, 0, len);
return System.Text.Encoding.UTF8.GetString(b);
}
public static byte[] ToUtf8(string s) {
byte[] u = System.Text.Encoding.UTF8.GetBytes(s);
byte[] r = new byte[u.Length + 1]; Array.Copy(u, r, u.Length);
return r;
}
}
'@
$dbPath = Join-Path $env:LocalAppData 'Packages\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe\LocalState\plum.sqlite'
$db = [IntPtr]::Zero; $st = [IntPtr]::Zero
[SQ]::sqlite3_open_v2($dbPath, [ref]$db, 6, [IntPtr]::Zero) | Out-Null
$id = [Guid]::NewGuid().ToString()
$now = [DateTime]::UtcNow.Ticks
$text = 'NOTE_TEXT'
$theme = 'NOTE_THEME'
$sql = 'INSERT INTO Note (Id, Text, Theme, IsOpen, CreatedAt, UpdatedAt) VALUES (?, ?, ?, ?, ?, ?)'
[SQ]::sqlite3_prepare_v2($db, $sql, -1, [ref]$st, [IntPtr]::Zero) | Out-Null
[SQ]::sqlite3_bind_text($st, 1, [SQ]::ToUtf8($id), -1, [IntPtr]::Zero) | Out-Null
[SQ]::sqlite3_bind_text($st, 2, [SQ]::ToUtf8($text), -1, [IntPtr]::Zero) | Out-Null
[SQ]::sqlite3_bind_text($st, 3, [SQ]::ToUtf8($theme), -1, [IntPtr]::Zero) | Out-Null
[SQ]::sqlite3_bind_int($st, 4, 1) | Out-Null
[SQ]::sqlite3_bind_int64($st, 5, $now) | Out-Null
[SQ]::sqlite3_bind_int64($st, 6, $now) | Out-Null
$rc = [SQ]::sqlite3_step($st)
if ($rc -eq 101) {
Write-Host ('Note created: {0}' -f $id)
} else {
$err = [SQ]::Utf8([SQ]::sqlite3_errmsg($db))
Write-Host ('Error: {0}' -f $err)
}
[SQ]::sqlite3_finalize($st) | Out-Null
[SQ]::sqlite3_close($db) | Out-Null
"
NOTE_TEXT: the note contentNOTE_THEME: color — Yellow, Green, Pink, Purple, Blue, or Charcoal6 = SQLITE_OPEN_READWRITEClose the Sticky Notes app before writing.
powershell.exe -NoProfile -Command "
Add-Type -TypeDefinition @'
using System;
using System.Runtime.InteropServices;
public class SQ {
const string L = ""winsqlite3.dll"";
[DllImport(L)] public static extern int sqlite3_open_v2(string f, out IntPtr db, int flags, IntPtr vfs);
[DllImport(L)] public static extern int sqlite3_close(IntPtr db);
[DllImport(L)] public static extern int sqlite3_prepare_v2(IntPtr db, string sql, int n, out IntPtr st, IntPtr t);
[DllImport(L)] public static extern int sqlite3_step(IntPtr st);
[DllImport(L)] public static extern int sqlite3_finalize(IntPtr st);
[DllImport(L)] public static extern int sqlite3_bind_text(IntPtr st, int idx, byte[] val, int n, IntPtr d);
[DllImport(L)] public static extern int sqlite3_bind_int64(IntPtr st, int idx, long val);
public static byte[] ToUtf8(string s) {
byte[] u = System.Text.Encoding.UTF8.GetBytes(s);
byte[] r = new byte[u.Length + 1]; Array.Copy(u, r, u.Length);
return r;
}
}
'@
$dbPath = Join-Path $env:LocalAppData 'Packages\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe\LocalState\plum.sqlite'
$db = [IntPtr]::Zero; $st = [IntPtr]::Zero
[SQ]::sqlite3_open_v2($dbPath, [ref]$db, 6, [IntPtr]::Zero) | Out-Null
$now = [DateTime]::UtcNow.Ticks
$sql = 'UPDATE Note SET Text = ?, UpdatedAt = ? WHERE Id = ?'
[SQ]::sqlite3_prepare_v2($db, $sql, -1, [ref]$st, [IntPtr]::Zero) | Out-Null
[SQ]::sqlite3_bind_text($st, 1, [SQ]::ToUtf8('NEW_TEXT'), -1, [IntPtr]::Zero) | Out-Null
[SQ]::sqlite3_bind_int64($st, 2, $now) | Out-Null
[SQ]::sqlite3_bind_text($st, 3, [SQ]::ToUtf8('NOTE_ID'), -1, [IntPtr]::Zero) | Out-Null
$rc = [SQ]::sqlite3_step($st)
if ($rc -eq 101) { Write-Host 'Note updated.' }
else { Write-Host 'Error updating note.' }
[SQ]::sqlite3_finalize($st) | Out-Null
[SQ]::sqlite3_close($db) | Out-Null
"
Replace NOTE_ID with the GUID and NEW_TEXT with the new content.
Soft-delete (marks as deleted, hidden from the app). Close Sticky Notes first.
powershell.exe -NoProfile -Command "
Add-Type -TypeDefinition @'
using System;
using System.Runtime.InteropServices;
public class SQ {
const string L = ""winsqlite3.dll"";
[DllImport(L)] public static extern int sqlite3_open_v2(string f, out IntPtr db, int flags, IntPtr vfs);
[DllImport(L)] public static extern int sqlite3_close(IntPtr db);
[DllImport(L)] public static extern int sqlite3_prepare_v2(IntPtr db, string sql, int n, out IntPtr st, IntPtr t);
[DllImport(L)] public static extern int sqlite3_step(IntPtr st);
[DllImport(L)] public static extern int sqlite3_finalize(IntPtr st);
[DllImport(L)] public static extern int sqlite3_bind_text(IntPtr st, int idx, byte[] val, int n, IntPtr d);
[DllImport(L)] public static extern int sqlite3_bind_int64(IntPtr st, int idx, long val);
public static byte[] ToUtf8(string s) {
byte[] u = System.Text.Encoding.UTF8.GetBytes(s);
byte[] r = new byte[u.Length + 1]; Array.Copy(u, r, u.Length);
return r;
}
}
'@
$dbPath = Join-Path $env:LocalAppData 'Packages\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe\LocalState\plum.sqlite'
$db = [IntPtr]::Zero; $st = [IntPtr]::Zero
[SQ]::sqlite3_open_v2($dbPath, [ref]$db, 6, [IntPtr]::Zero) | Out-Null
$now = [DateTime]::UtcNow.Ticks
$sql = 'UPDATE Note SET DeletedAt = ? WHERE Id = ?'
[SQ]::sqlite3_prepare_v2($db, $sql, -1, [ref]$st, [IntPtr]::Zero) | Out-Null
[SQ]::sqlite3_bind_int64($st, 1, $now) | Out-Null
[SQ]::sqlite3_bind_text($st, 2, [SQ]::ToUtf8('NOTE_ID'), -1, [IntPtr]::Zero) | Out-Null
$rc = [SQ]::sqlite3_step($st)
if ($rc -eq 101) { Write-Host 'Note deleted.' }
else { Write-Host 'Error deleting note.' }
[SQ]::sqlite3_finalize($st) | Out-Null
[SQ]::sqlite3_close($db) | Out-Null
"
Export all notes to a text file:
powershell.exe -NoProfile -Command "
Add-Type -TypeDefinition @'
using System;
using System.Runtime.InteropServices;
public class SQ {
const string L = ""winsqlite3.dll"";
[DllImport(L)] public static extern int sqlite3_open_v2(string f, out IntPtr db, int flags, IntPtr vfs);
[DllImport(L)] public static extern int sqlite3_close(IntPtr db);
[DllImport(L)] public static extern int sqlite3_prepare_v2(IntPtr db, string sql, int n, out IntPtr st, IntPtr t);
[DllImport(L)] public static extern int sqlite3_step(IntPtr st);
[DllImport(L)] public static extern IntPtr sqlite3_column_text(IntPtr st, int c);
[DllImport(L)] public static extern long sqlite3_column_int64(IntPtr st, int c);
[DllImport(L)] public static extern int sqlite3_finalize(IntPtr st);
public static string Utf8(IntPtr p) {
if (p == IntPtr.Zero) return string.Empty;
int len = 0; while (Marshal.ReadByte(p, len) != 0) len++;
byte[] b = new byte[len]; Marshal.Copy(p, b, 0, len);
return System.Text.Encoding.UTF8.GetString(b);
}
}
'@
$dbPath = Join-Path $env:LocalAppData 'Packages\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe\LocalState\plum.sqlite'
$outPath = 'OUTPUT_PATH'
$db = [IntPtr]::Zero; $st = [IntPtr]::Zero
[SQ]::sqlite3_open_v2($dbPath, [ref]$db, 1, [IntPtr]::Zero) | Out-Null
$sql = ""SELECT Id, Text, Theme, CreatedAt FROM Note WHERE DeletedAt IS NULL OR DeletedAt = '' OR DeletedAt = 0 ORDER BY CreatedAt""
[SQ]::sqlite3_prepare_v2($db, $sql, -1, [ref]$st, [IntPtr]::Zero) | Out-Null
$sb = New-Object System.Text.StringBuilder
$i = 0
while ([SQ]::sqlite3_step($st) -eq 100) {
$id = [SQ]::Utf8([SQ]::sqlite3_column_text($st, 0))
$text = [SQ]::Utf8([SQ]::sqlite3_column_text($st, 1))
$theme = [SQ]::Utf8([SQ]::sqlite3_column_text($st, 2))
$ticks = [SQ]::sqlite3_column_int64($st, 3)
$created = if ($ticks -gt 0) { [DateTime]::new($ticks).ToString('yyyy-MM-dd HH:mm') } else { 'unknown' }
[void]$sb.AppendLine(('=== Note {0} [{1}] Created: {2} ===' -f ($i+1), $theme, $created))
[void]$sb.AppendLine($text)
[void]$sb.AppendLine('')
$i++
}
[System.IO.File]::WriteAllText($outPath, $sb.ToString(), [System.Text.Encoding]::UTF8)
Write-Host ('{0} notes exported to {1}' -f $i, $outPath)
[SQ]::sqlite3_finalize($st) | Out-Null
[SQ]::sqlite3_close($db) | Out-Null
"
Replace OUTPUT_PATH with the desired file path (e.g., C:\Users\me\Desktop\sticky-notes-export.txt).
cmd.exe /c start "" "shell:AppsFolder\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe!App"
1. Agent receives info to save (e.g., a phone number, meeting notes)
2. sticky-notes: create a note with the content
3. User opens Sticky Notes app to see it on desktop
1. User asks "what was that note about the API key?"
2. sticky-notes: search notes for "API key"
3. sticky-notes: read the full note by ID
1. sticky-notes: export all notes to a text file
2. Save export to Dropbox or other backup location
1. sticky-notes: list all notes
2. Agent summarizes note contents for the user
3. Identify stale notes for cleanup
SQLITE_OPEN_READONLY.winsqlite3.dll from C:\Windows\System32 — shipped with Windows 10 1803+ (zero dependencies).%LocalAppData%\Packages\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe\LocalState\plum.sqliteDeletedAt ticks) — same as the app's own delete behavior.Yellow, Green, Pink, Purple, Blue, Charcoal.