{
  "schemaVersion": "1.0",
  "item": {
    "slug": "sqlite",
    "name": "SQLite",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/ivangdavila/sqlite",
    "canonicalUrl": "https://clawhub.ai/ivangdavila/sqlite",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/sqlite",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=sqlite",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/sqlite"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/sqlite",
    "agentPageUrl": "https://openagent3.xyz/skills/sqlite/agent",
    "manifestUrl": "https://openagent3.xyz/skills/sqlite/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/sqlite/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Concurrency (Biggest Gotcha)",
        "body": "Only one writer at a time—concurrent writes queue or fail; not for high-write workloads\nEnable WAL mode: PRAGMA journal_mode=WAL—allows reads during writes, huge improvement\nSet busy timeout: PRAGMA busy_timeout=5000—waits 5s before SQLITE_BUSY instead of failing immediately\nWAL needs -wal and -shm files—don't forget to copy them with main database\nBEGIN IMMEDIATE to grab write lock early—prevents deadlocks in read-then-write patterns"
      },
      {
        "title": "Foreign Keys (Off by Default!)",
        "body": "PRAGMA foreign_keys=ON required per connection—not persisted in database\nWithout it, foreign key constraints silently ignored—data integrity broken\nCheck before relying: PRAGMA foreign_keys returns 0 or 1\nON DELETE CASCADE only works if foreign_keys is ON"
      },
      {
        "title": "Type System",
        "body": "Type affinity, not strict types—INTEGER column accepts \"hello\" without error\nSTRICT tables enforce types—but only SQLite 3.37+ (2021)\nNo native DATE/TIME—use TEXT as ISO8601 or INTEGER as Unix timestamp\nBOOLEAN doesn't exist—use INTEGER 0/1; TRUE/FALSE are just aliases\nREAL is 8-byte float—same precision issues as any float"
      },
      {
        "title": "Schema Changes",
        "body": "ALTER TABLE very limited—can add column, rename table/column; that's mostly it\nCan't change column type, add constraints, or drop columns (until 3.35)\nWorkaround: create new table, copy data, drop old, rename—wrap in transaction\nALTER TABLE ADD COLUMN can't have PRIMARY KEY, UNIQUE, or NOT NULL without default"
      },
      {
        "title": "Performance Pragmas",
        "body": "PRAGMA optimize before closing long-running connections—updates query planner stats\nPRAGMA cache_size=-64000 for 64MB cache—negative = KB; default very small\nPRAGMA synchronous=NORMAL with WAL—good balance of safety and speed\nPRAGMA temp_store=MEMORY for temp tables in RAM—faster sorts and temp results"
      },
      {
        "title": "Vacuum & Maintenance",
        "body": "Deleted data doesn't shrink file—VACUUM rewrites entire database, reclaims space\nVACUUM needs 2x disk space temporarily—ensure enough room\nPRAGMA auto_vacuum=INCREMENTAL with PRAGMA incremental_vacuum—partial reclaim without full rewrite\nAfter bulk deletes, always vacuum or file stays bloated"
      },
      {
        "title": "Backup Safety",
        "body": "Never copy database file while open—corrupts if write in progress\nUse .backup command in sqlite3—or sqlite3_backup_* API\nWAL mode: -wal and -shm must be copied atomically with main file\nVACUUM INTO 'backup.db' creates standalone copy (3.27+)"
      },
      {
        "title": "Indexing",
        "body": "Covering indexes work—add extra columns to avoid table lookup\nPartial indexes supported (3.8+): CREATE INDEX ... WHERE condition\nExpression indexes (3.9+): CREATE INDEX ON t(lower(name))\nEXPLAIN QUERY PLAN shows index usage—simpler than PostgreSQL EXPLAIN"
      },
      {
        "title": "Transactions",
        "body": "Autocommit by default—each statement is own transaction; slow for bulk inserts\nBatch inserts: BEGIN; INSERT...; INSERT...; COMMIT—10-100x faster\nBEGIN EXCLUSIVE for exclusive lock—blocks all other connections\nNested transactions via SAVEPOINT name / RELEASE name / ROLLBACK TO name"
      },
      {
        "title": "Common Mistakes",
        "body": "Using SQLite for web app with concurrent users—one writer blocks all; use PostgreSQL\nAssuming ROWID is stable—VACUUM can change ROWIDs; use explicit INTEGER PRIMARY KEY\nNot setting busy_timeout—random SQLITE_BUSY errors under any concurrency\nIn-memory database ':memory:'—each connection gets different database; use file::memory:?cache=shared for shared"
      }
    ],
    "body": "Concurrency (Biggest Gotcha)\nOnly one writer at a time—concurrent writes queue or fail; not for high-write workloads\nEnable WAL mode: PRAGMA journal_mode=WAL—allows reads during writes, huge improvement\nSet busy timeout: PRAGMA busy_timeout=5000—waits 5s before SQLITE_BUSY instead of failing immediately\nWAL needs -wal and -shm files—don't forget to copy them with main database\nBEGIN IMMEDIATE to grab write lock early—prevents deadlocks in read-then-write patterns\nForeign Keys (Off by Default!)\nPRAGMA foreign_keys=ON required per connection—not persisted in database\nWithout it, foreign key constraints silently ignored—data integrity broken\nCheck before relying: PRAGMA foreign_keys returns 0 or 1\nON DELETE CASCADE only works if foreign_keys is ON\nType System\nType affinity, not strict types—INTEGER column accepts \"hello\" without error\nSTRICT tables enforce types—but only SQLite 3.37+ (2021)\nNo native DATE/TIME—use TEXT as ISO8601 or INTEGER as Unix timestamp\nBOOLEAN doesn't exist—use INTEGER 0/1; TRUE/FALSE are just aliases\nREAL is 8-byte float—same precision issues as any float\nSchema Changes\nALTER TABLE very limited—can add column, rename table/column; that's mostly it\nCan't change column type, add constraints, or drop columns (until 3.35)\nWorkaround: create new table, copy data, drop old, rename—wrap in transaction\nALTER TABLE ADD COLUMN can't have PRIMARY KEY, UNIQUE, or NOT NULL without default\nPerformance Pragmas\nPRAGMA optimize before closing long-running connections—updates query planner stats\nPRAGMA cache_size=-64000 for 64MB cache—negative = KB; default very small\nPRAGMA synchronous=NORMAL with WAL—good balance of safety and speed\nPRAGMA temp_store=MEMORY for temp tables in RAM—faster sorts and temp results\nVacuum & Maintenance\nDeleted data doesn't shrink file—VACUUM rewrites entire database, reclaims space\nVACUUM needs 2x disk space temporarily—ensure enough room\nPRAGMA auto_vacuum=INCREMENTAL with PRAGMA incremental_vacuum—partial reclaim without full rewrite\nAfter bulk deletes, always vacuum or file stays bloated\nBackup Safety\nNever copy database file while open—corrupts if write in progress\nUse .backup command in sqlite3—or sqlite3_backup_* API\nWAL mode: -wal and -shm must be copied atomically with main file\nVACUUM INTO 'backup.db' creates standalone copy (3.27+)\nIndexing\nCovering indexes work—add extra columns to avoid table lookup\nPartial indexes supported (3.8+): CREATE INDEX ... WHERE condition\nExpression indexes (3.9+): CREATE INDEX ON t(lower(name))\nEXPLAIN QUERY PLAN shows index usage—simpler than PostgreSQL EXPLAIN\nTransactions\nAutocommit by default—each statement is own transaction; slow for bulk inserts\nBatch inserts: BEGIN; INSERT...; INSERT...; COMMIT—10-100x faster\nBEGIN EXCLUSIVE for exclusive lock—blocks all other connections\nNested transactions via SAVEPOINT name / RELEASE name / ROLLBACK TO name\nCommon Mistakes\nUsing SQLite for web app with concurrent users—one writer blocks all; use PostgreSQL\nAssuming ROWID is stable—VACUUM can change ROWIDs; use explicit INTEGER PRIMARY KEY\nNot setting busy_timeout—random SQLITE_BUSY errors under any concurrency\nIn-memory database ':memory:'—each connection gets different database; use file::memory:?cache=shared for shared"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ivangdavila/sqlite",
    "publisherUrl": "https://clawhub.ai/ivangdavila/sqlite",
    "owner": "ivangdavila",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/sqlite",
    "downloadUrl": "https://openagent3.xyz/downloads/sqlite",
    "agentUrl": "https://openagent3.xyz/skills/sqlite/agent",
    "manifestUrl": "https://openagent3.xyz/skills/sqlite/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/sqlite/agent.md"
  }
}