[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79A2QAFPVXPXKY1Q60EHMCR":3,"skill-same:01M79A2QAFPVXPXKY1Q60EHMCR":133},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":68,"commitSha":69,"skillDirectory":70,"forksCount":14,"repositoryHtmlUrl":71,"repositoryHomepageUrl":6,"ownerHtmlUrl":72,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":73,"install":74,"resources":86},"01M79A2QAFPVXPXKY1Q60EHMCR","cloudflare-d1",null,"Cloudflare D1 serverless SQLite on edge. Use for databases, migrations, bindings, or encountering D1_ERROR, statement too long, too many requests queued errors.","Elogic360\u002Fsoftware-factory","Elogic360","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F156535519?v=4","01M74NH3F0RB13PWB7JZDE2V80","elogic360","01M74NH3FPC65082MDZVMFHDM3",0,"MIT","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fcloudflare-d1\u002Fskills\u002Fcloudflare-d1\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cloudflare-d1\ndescription: \"Cloudflare D1 serverless SQLite on edge. Use for databases, migrations, bindings, or encountering D1_ERROR, statement too long, too many requests queued errors.\"\nlicense: MIT\nmetadata:\n  version: \"3.0.0\"\n  last_verified: \"2025-01-15\"\n  production_tested: true\n  token_savings: \"~58%\"\n  errors_prevented: 8\n  templates_included: 3\n  references_included: 4\n  wrangler_version: \"4.50.0\"\n  workers_types_version: \"4.20251125.0\"\n  drizzle_orm_version: \"0.44.7\"\n  keywords:\n    - d1\n    - d1 database\n    - cloudflare d1\n    - wrangler d1\n    - d1 migrations\n    - d1 bindings\n    - sqlite workers\n    - edge database\n    - d1 queries\n    - sql cloudflare\n    - prepared statements\n    - batch queries\n    - d1 api\n    - wrangler migrations\n    - D1_ERROR\n    - D1_EXEC_ERROR\n    - statement too long\n    - database bindings\n    - sqlite cloudflare\n    - sql workers api\n    - d1 indexes\n    - query optimization\n    - d1 schema\n    - read replication\n    - read replica\n    - withSession\n    - Sessions API\n    - global replication\n    - database replication\n    - served_by_region\n    - bookmarks\n    - sequential consistency\n---\n# Cloudflare D1 Database\n\n**Status**: Production Ready ✅ | **Last Verified**: 2025-01-15\n\n## Table of Contents\n1. [What Is D1?](#what-is-d1)\n2. [Quick Start](#quick-start-5-minutes)\n3. [Critical Rules](#critical-rules)\n4. [D1 API Methods](#d1-api-methods)\n5. [Top 5 Use Cases](#top-5-use-cases)\n6. [Migrations Best Practices](#migrations-best-practices)\n7. [Common Patterns](#common-patterns)\n8. [SQLite Type Affinity](#sqlite-type-affinity)\n9. [Top 5 Errors Prevented](#top-5-errors-prevented)\n\n---\n\n## What Is D1?\n\nCloudflare D1 is **serverless SQLite** on the edge:\n- SQL database without servers\n- Global distribution\n- Zero cold starts\n- Standard SQLite syntax\n- Read replication for global performance\n\n---\n\n## 🆕 New in 2025\n\nD1 received major updates throughout 2025:\n\n### Performance (January 2025)\n- **40-60% latency reduction** globally (P50 query times)\n- Optimized SQLite engine for edge execution\n- Reduced cold start impact for databases \u003C100 MB\n\n### Reliability (September 2025)\n- **Automatic query retries**: Read queries retry up to 2x on transient failures\n- Transparent to application code (logged in `wrangler tail`)\n\n### Scalability (April 2025)\n- **Read Replication (Public Beta)**: Deploy read replicas globally\n- Up to 2x read throughput for read-heavy workloads\n- Sessions API for read-write separation\n\n### Compliance (November 2025)\n- **Data Localization**: Specify EU\u002FUS jurisdiction for GDPR\u002Fdata sovereignty\n- Configure via `--jurisdiction` flag or wrangler.jsonc\n\n### ⚠️ Breaking Change (February 10, 2025)\n- **Free tier hard limits enforced**: 10 DBs, 500 MB each, 50 queries\u002Finvocation\n- Exceeding limits = 429 errors (previously warnings only)\n- **Action**: Review usage with `wrangler d1 list` and upgrade if needed\n\n**Full details**: Load `references\u002F2025-features.md`\n\n---\n\n## Quick Start (5 Minutes)\n\n### 1. Create Database\n\n```bash\nbunx wrangler d1 create my-database\n```\n\nSave the `database_id` from output!\n\n### 2. Configure Binding\n\nAdd to `wrangler.jsonc`:\n\n```jsonc\n{\n  \"name\": \"my-worker\",\n  \"main\": \"src\u002Findex.ts\",\n  \"compatibility_date\": \"2025-10-11\",\n  \"d1_databases\": [\n    {\n      \"binding\": \"DB\",                    \u002F\u002F env.DB\n      \"database_name\": \"my-database\",\n      \"database_id\": \"\u003CUUID>\",\n      \"preview_database_id\": \"local-db\"\n    }\n  ]\n}\n```\n\n### 3. Create Migration\n\n```bash\nbunx wrangler d1 migrations create my-database create_users\n```\n\nEdit `migrations\u002F0001_create_users.sql`:\n\n```sql\nCREATE TABLE IF NOT EXISTS users (\n  user_id INTEGER PRIMARY KEY AUTOINCREMENT,\n  email TEXT NOT NULL UNIQUE,\n  username TEXT NOT NULL,\n  created_at INTEGER NOT NULL\n);\n\nCREATE INDEX IF NOT EXISTS idx_users_email ON users(email);\n\nPRAGMA optimize;\n```\n\n### 4. Apply Migration\n\n```bash\n# Local\nbunx wrangler d1 migrations apply my-database --local\n\n# Production\nbunx wrangler d1 migrations apply my-database --remote\n```\n\n### 5. Query from Worker\n\n```typescript\nimport { Hono } from 'hono';\n\ntype Bindings = {\n  DB: D1Database;\n};\n\nconst app = new Hono\u003C{ Bindings: Bindings }>();\n\napp.get('\u002Fusers\u002F:email', async (c) => {\n  const { results } = await c.env.DB.prepare(\n    'SELECT * FROM users WHERE email = ?'\n  )\n    .bind(c.req.param('email'))\n    .all();\n\n  return c.json(results);\n});\n\nexport default app;\n```\n\n**Load `references\u002Fsetup-guide.md` for complete walkthrough.**\n\n---\n\n## Critical Rules\n\n### Always Do ✅\n\n1. **Use prepared statements** with `.bind()` (never string concatenation)\n2. **Create indexes** for WHERE\u002FJOIN\u002FORDER BY columns\n3. **Use migrations** for schema changes (never manual SQL)\n4. **Batch queries** for multiple operations (.batch())\n5. **Run PRAGMA optimize** after schema changes\n6. **Handle errors** explicitly (try\u002Fcatch)\n7. **Use INTEGER for timestamps** (Date.now())\n8. **Test locally** before deploying migrations\n9. **Use read replicas** for global read performance\n10. **Validate input** before SQL queries\n\n### Never Do ❌\n\n1. **Never concatenate** user input into SQL\n2. **Never commit database_id** to public repos\n3. **Never skip migrations** for schema changes\n4. **Never use VARCHAR** (use TEXT instead)\n5. **Never skip indexes** for filtered columns\n6. **Never ignore** SQLite type affinity rules\n7. **Never use SELECT *** without LIMIT\n8. **Never run migrations** without testing locally\n9. **Never exceed** 1MB per row\n10. **Never use DATETIME** (use INTEGER for timestamps)\n\n---\n\n## D1 API Methods\n\n### prepare() - Execute Queries\n\n```typescript\n\u002F\u002F Single result\nconst { results } = await env.DB.prepare(\n  'SELECT * FROM users WHERE email = ?'\n)\n  .bind(email)\n  .all();\n\n\u002F\u002F First result only\nconst user = await env.DB.prepare(\n  'SELECT * FROM users WHERE user_id = ?'\n)\n  .bind(userId)\n  .first();\n\n\u002F\u002F Raw results (faster)\nconst { results } = await env.DB.prepare(\n  'SELECT username FROM users'\n)\n  .raw();  \u002F\u002F Returns arrays instead of objects\n```\n\n### batch() - Multiple Queries\n\n```typescript\nconst results = await env.DB.batch([\n  env.DB.prepare('INSERT INTO users (email, username, created_at) VALUES (?, ?, ?)')\n    .bind('user1@example.com', 'user1', Date.now()),\n  env.DB.prepare('INSERT INTO users (email, username, created_at) VALUES (?, ?, ?)')\n    .bind('user2@example.com', 'user2', Date.now()),\n  env.DB.prepare('SELECT COUNT(*) as count FROM users')\n]);\n\nconsole.log('Users count:', results[2].results[0].count);\n```\n\n**All queries execute in single transaction** (all succeed or all fail).\n\n### exec() - Run SQL String\n\n```typescript\n\u002F\u002F For migrations\u002Fsetup only\nawait env.DB.exec(`\n  CREATE TABLE IF NOT EXISTS users (\n    user_id INTEGER PRIMARY KEY,\n    email TEXT NOT NULL\n  );\n  CREATE INDEX idx_email ON users(email);\n`);\n```\n\n**NEVER use for queries with user input!**\n\n**Load `references\u002Fquery-patterns.md` for complete API reference.**\n\n---\n\n## Top 5 Use Cases\n\n### Use Case 1: User CRUD\n\n```typescript\n\u002F\u002F Create\napp.post('\u002Fusers', async (c) => {\n  const { email, username } = await c.req.json();\n\n  const { results } = await c.env.DB.prepare(\n    'INSERT INTO users (email, username, created_at) VALUES (?, ?, ?) RETURNING *'\n  )\n    .bind(email, username, Date.now())\n    .all();\n\n  return c.json(results[0]);\n});\n\n\u002F\u002F Read\napp.get('\u002Fusers\u002F:id', async (c) => {\n  const user = await c.env.DB.prepare(\n    'SELECT * FROM users WHERE user_id = ?'\n  )\n    .bind(c.req.param('id'))\n    .first();\n\n  if (!user) {\n    return c.json({ error: 'Not found' }, 404);\n  }\n\n  return c.json(user);\n});\n\n\u002F\u002F Update\napp.patch('\u002Fusers\u002F:id', async (c) => {\n  const { username } = await c.req.json();\n\n  await c.env.DB.prepare(\n    'UPDATE users SET username = ?, updated_at = ? WHERE user_id = ?'\n  )\n    .bind(username, Date.now(), c.req.param('id'))\n    .run();\n\n  return c.json({ success: true });\n});\n\n\u002F\u002F Delete\napp.delete('\u002Fusers\u002F:id', async (c) => {\n  await c.env.DB.prepare(\n    'DELETE FROM users WHERE user_id = ?'\n  )\n    .bind(c.req.param('id'))\n    .run();\n\n  return c.json({ success: true });\n});\n```\n\n### Use Case 2: Batch Operations\n\n```typescript\napp.post('\u002Fusers\u002Fbulk', async (c) => {\n  const users = await c.req.json();  \u002F\u002F Array of users\n\n  const statements = users.map(user =>\n    c.env.DB.prepare(\n      'INSERT INTO users (email, username, created_at) VALUES (?, ?, ?)'\n    ).bind(user.email, user.username, Date.now())\n  );\n\n  const results = await c.env.DB.batch(statements);\n\n  return c.json({ inserted: results.length });\n});\n```\n\n### Use Case 3: Read Replication (Global Reads)\n\n```typescript\n\u002F\u002F Configure read replica (any region)\nconst session = c.env.DB.withSession({\n  preferredRegion: 'auto'  \u002F\u002F or 'weur', 'wnam', 'enam', 'apac'\n});\n\n\u002F\u002F Read from nearest replica\nconst { results } = await session.prepare(\n  'SELECT * FROM users WHERE email = ?'\n)\n  .bind(email)\n  .all();\n\n\u002F\u002F Check which region served request\nconsole.log('Served by:', results[0].served_by_region);\n```\n\n**Load `references\u002Fread-replication.md` for complete guide.**\n\n### Use Case 4: Transactions with Batch\n\n```typescript\n\u002F\u002F Transfer credits between users (atomic)\nconst results = await c.env.DB.batch([\n  c.env.DB.prepare(\n    'UPDATE users SET credits = credits - ? WHERE user_id = ?'\n  ).bind(amount, fromUserId),\n  c.env.DB.prepare(\n    'UPDATE users SET credits = credits + ? WHERE user_id = ?'\n  ).bind(amount, toUserId),\n  c.env.DB.prepare(\n    'INSERT INTO transactions (from_user, to_user, amount, created_at) VALUES (?, ?, ?, ?)'\n  ).bind(fromUserId, toUserId, amount, Date.now())\n]);\n\n\u002F\u002F All succeed or all fail (transaction)\n```\n\n### Use Case 5: Pagination\n\n```typescript\napp.get('\u002Fusers', async (c) => {\n  const page = parseInt(c.req.query('page') || '1');\n  const limit = 20;\n  const offset = (page - 1) * limit;\n\n  const { results } = await c.env.DB.prepare(\n    'SELECT * FROM users ORDER BY created_at DESC LIMIT ? OFFSET ?'\n  )\n    .bind(limit, offset)\n    .all();\n\n  return c.json({\n    users: results,\n    page,\n    limit\n  });\n});\n```\n\n---\n\n## Migrations Best Practices\n\n### 1. Always Use Migrations\n\n```bash\nbunx wrangler d1 migrations create my-database add_users_avatar\n```\n\n### 2. Make Migrations Idempotent\n\n```sql\n-- ✅ GOOD: Idempotent\nCREATE TABLE IF NOT EXISTS users (...);\nCREATE INDEX IF NOT EXISTS idx_email ON users(email);\nDROP TABLE IF EXISTS old_table;\n\n-- ❌ BAD: Fails on re-run\nCREATE TABLE users (...);\nCREATE INDEX idx_email ON users(email);\n```\n\n### 3. Test Locally First\n\n```bash\nbunx wrangler d1 migrations apply my-database --local\nbunx wrangler d1 execute my-database --local --command \"SELECT * FROM users\"\n```\n\n### 4. Add PRAGMA optimize\n\n```sql\n-- End of migration\nPRAGMA optimize;\n```\n\n**Load `templates\u002Fschema-example.sql` for complete schema template.**\n\n---\n\n## When to Load References\n\n### Load `references\u002Fsetup-guide.md` when:\n- First-time D1 setup\n- Creating first database\n- Configuring bindings\n- Applying first migration\n\n### Load `references\u002Fquery-patterns.md` when:\n- Need complete API reference\n- Complex query patterns\n- Batch operations\n- Error handling\n\n### Load `references\u002Fread-replication.md` when:\n- Setting up global reads\n- Need low latency worldwide\n- Understanding Sessions API\n- Sequential consistency required\n\n### Load `references\u002Fbest-practices.md` when:\n- Optimizing query performance\n- Schema design decisions\n- Index strategies\n- Production deployment checklist\n\n### Load `references\u002Flimits.md` when:\n- Encountering 429 errors or quota warnings\n- Planning capacity for free vs paid tiers\n- Understanding database\u002Fquery limits\n- Migrating to paid plan\n\n### Load `references\u002Fmetrics-analytics.md` when:\n- Investigating performance issues\n- Setting up monitoring and alerts\n- Using `wrangler d1 insights` command\n- Analyzing query efficiency\n\n### Load `references\u002F2025-features.md` when:\n- Upgrading from v2.x to v3.x\n- Enabling new features (auto-retry, jurisdiction, replication)\n- Understanding breaking changes (Feb 10, 2025 enforcement)\n- Migrating before deadlines\n\n### Interactive Tools\n\n**Agents** (Autonomous diagnostics):\n- **`agents\u002Fd1-debugger.md`**: 9-phase diagnostic (config, migrations, queries, bindings, errors, limits, performance, Time Travel)\n- **`agents\u002Fd1-query-optimizer.md`**: Performance analysis (slow queries, missing indexes, optimization recommendations)\n\n**Commands** (Interactive wizards):\n- **`commands\u002Fcloudflare-d1:setup.md`**: Interactive first-time setup wizard\n- **`commands\u002Fd1-create-migration.md`**: Guided migration creation with validation\n\n---\n\n## Using Bundled Resources\n\n### References (references\u002F)\n\n- **setup-guide.md** - Complete setup walkthrough\n- **query-patterns.md** - Complete API reference with examples\n- **read-replication.md** - Global read replicas setup\n- **best-practices.md** - Performance and optimization\n\n### Templates (templates\u002F)\n\n- **schema-example.sql** - Complete schema with indexes\n- **d1-worker-queries.ts** - All query patterns in Workers\n- **cloudflare-d1:setup-migration.sh** - Complete setup script\n\n---\n\n## Common Patterns\n\n### Error Handling\n\n```typescript\ntry {\n  const { results } = await env.DB.prepare(\n    'SELECT * FROM users WHERE email = ?'\n  )\n    .bind(email)\n    .all();\n\n  return c.json(results);\n} catch (error) {\n  console.error('D1 Error:', error);\n  return c.json({ error: 'Database error' }, 500);\n}\n```\n\n### Raw Mode (Performance)\n\n```typescript\n\u002F\u002F Returns arrays instead of objects (faster)\nconst { results } = await env.DB.prepare(\n  'SELECT user_id, email FROM users'\n)\n  .raw();\n\n\u002F\u002F results = [[1, 'user1@example.com'], [2, 'user2@example.com']]\n```\n\n### COUNT Queries\n\n```typescript\nconst count = await env.DB.prepare(\n  'SELECT COUNT(*) as count FROM users'\n)\n  .first('count');  \u002F\u002F Get single column value\n\nconsole.log('Total users:', count);\n```\n\n---\n\n## SQLite Type Affinity\n\nD1 uses SQLite type affinity:\n\n| Declared Type | Affinity |\n|---------------|----------|\n| INTEGER, INT | INTEGER |\n| TEXT, VARCHAR, CHAR | TEXT |\n| REAL, FLOAT, DOUBLE | REAL |\n| BLOB | BLOB |\n| (no type) | BLOB |\n\n**Best practices:**\n- Use `INTEGER` for numbers\n- Use `TEXT` for strings (not VARCHAR)\n- Use `INTEGER` for timestamps (Date.now())\n- Use `BLOB` for binary data\n\n---\n\n## Top 5 Errors Prevented\n\n1. **SQL Injection**: Use `.bind()`, never string concatenation\n2. **Missing Indexes**: Create indexes for WHERE\u002FJOIN columns\n3. **Migration Failures**: Test locally first\n4. **Type Confusion**: Use INTEGER for timestamps\n5. **Batch Size**: Limit batch to \u003C500 statements\n\n**Load `references\u002Fbest-practices.md` for complete error prevention.**\n\n---\n\n## Secure Installation\n\nWhen installing D1 driver packages, follow supply chain security best practices:\n\n- **Block post-install scripts** — `npm config set ignore-scripts true` (or Bun: disabled by default)\n- **Cooldown period** — Wait 7 days for new package versions to be vetted by the community\n- **Audit before installing** — Run `socket package score npm \u003Cpkg>` or use `socket npm install \u003Cpkg>` to check packages\n\nLoad the `dependency-upgrade` skill for full security configuration including Socket CLI integration, cooldown setup, lockfile validation, and CI enforcement.\n\n## Official Documentation\n\n- **D1 Overview**: https:\u002F\u002Fdevelopers.cloudflare.com\u002Fd1\u002F\n- **Get Started**: https:\u002F\u002Fdevelopers.cloudflare.com\u002Fd1\u002Fget-started\u002F\n- **Client API**: https:\u002F\u002Fdevelopers.cloudflare.com\u002Fd1\u002Fbuild-with-d1\u002Fd1-client-api\u002F\n- **Read Replication**: https:\u002F\u002Fdevelopers.cloudflare.com\u002Fd1\u002Freference\u002Fread-replication\u002F\n\n---\n\n**Questions? Issues?**\n\n1. Check `references\u002Fsetup-guide.md` for setup\n2. Review `references\u002Fquery-patterns.md` for API reference\n3. See `references\u002Fread-replication.md` for global reads\n4. Load `references\u002Fbest-practices.md` for optimization\n","# Cloudflare D1 Database\n\n**Status**: Production Ready ✅ | **Last Verified**: 2025-01-15\n\n## Table of Contents\n1. [What Is D1?](#what-is-d1)\n2. [Quick Start](#quick-start-5-minutes)\n3. [Critical Rules](#critical-rules)\n4. [D1 API Methods](#d1-api-methods)\n5. [Top 5 Use Cases](#top-5-use-cases)\n6. [Migrations Best Practices](#migrations-best-practices)\n7. [Common Patterns](#common-patterns)\n8. [SQLite Type Affinity](#sqlite-type-affinity)\n9. [Top 5 Errors Prevented](#top-5-errors-prevented)\n\n---\n\n## What Is D1?\n\nCloudflare D1 is **serverless SQLite** on the edge:\n- SQL database without servers\n- Global distribution\n- Zero cold starts\n- Standard SQLite syntax\n- Read replication for global performance\n\n---\n\n## 🆕 New in 2025\n\nD1 received major updates throughout 2025:\n\n### Performance (January 2025)\n- **40-60% latency reduction** globally (P50 query times)\n- Optimized SQLite engine for edge execution\n- Reduced cold start impact for databases \u003C100 MB\n\n### Reliability (September 2025)\n- **Automatic query retries**: Read queries retry up to 2x on transient failures\n- Transparent to application code (logged in `wrangler tail`)\n\n### Scalability (April 2025)\n- **Read Replication (Public Beta)**: Deploy read replicas globally\n- Up to 2x read throughput for read-heavy workloads\n- Sessions API for read-write separation\n\n### Compliance (November 2025)\n- **Data Localization**: Specify EU\u002FUS jurisdiction for GDPR\u002Fdata sovereignty\n- Configure via `--jurisdiction` flag or wrangler.jsonc\n\n### ⚠️ Breaking Change (February 10, 2025)\n- **Free tier hard limits enforced**: 10 DBs, 500 MB each, 50 queries\u002Finvocation\n- Exceeding limits = 429 errors (previously warnings only)\n- **Action**: Review usage with `wrangler d1 list` and upgrade if needed\n\n**Full details**: Load `references\u002F2025-features.md`\n\n---\n\n## Quick Start (5 Minutes)\n\n### 1. Create Database\n\n```bash\nbunx wrangler d1 create my-database\n```\n\nSave the `database_id` from output!\n\n### 2. Configure Binding\n\nAdd to `wrangler.jsonc`:\n\n```jsonc\n{\n  \"name\": \"my-worker\",\n  \"main\": \"src\u002Findex.ts\",\n  \"compatibility_date\": \"2025-10-11\",\n  \"d1_databases\": [\n    {\n      \"binding\": \"DB\",                    \u002F\u002F env.DB\n      \"database_name\": \"my-database\",\n      \"database_id\": \"\u003CUUID>\",\n      \"preview_database_id\": \"local-db\"\n    }\n  ]\n}\n```\n\n### 3. Create Migration\n\n```bash\nbunx wrangler d1 migrations create my-database create_users\n```\n\nEdit `migrations\u002F0001_create_users.sql`:\n\n```sql\nCREATE TABLE IF NOT EXISTS users (\n  user_id INTEGER PRIMARY KEY AUTOINCREMENT,\n  email TEXT NOT NULL UNIQUE,\n  username TEXT NOT NULL,\n  created_at INTEGER NOT NULL\n);\n\nCREATE INDEX IF NOT EXISTS idx_users_email ON users(email);\n\nPRAGMA optimize;\n```\n\n### 4. Apply Migration\n\n```bash\n# Local\nbunx wrangler d1 migrations apply my-database --local\n\n# Production\nbunx wrangler d1 migrations apply my-database --remote\n```\n\n### 5. Query from Worker\n\n```typescript\nimport { Hono } from 'hono';\n\ntype Bindings = {\n  DB: D1Database;\n};\n\nconst app = new Hono\u003C{ Bindings: Bindings }>();\n\napp.get('\u002Fusers\u002F:email', async (c) => {\n  const { results } = await c.env.DB.prepare(\n    'SELECT * FROM users WHERE email = ?'\n  )\n    .bind(c.req.param('email'))\n    .all();\n\n  return c.json(results);\n});\n\nexport default app;\n```\n\n**Load `references\u002Fsetup-guide.md` for complete walkthrough.**\n\n---\n\n## Critical Rules\n\n### Always Do ✅\n\n1. **Use prepared statements** with `.bind()` (never string concatenation)\n2. **Create indexes** for WHERE\u002FJOIN\u002FORDER BY columns\n3. **Use migrations** for schema changes (never manual SQL)\n4. **Batch queries** for multiple operations (.batch())\n5. **Run PRAGMA optimize** after schema changes\n6. **Handle errors** explicitly (try\u002Fcatch)\n7. **Use INTEGER for timestamps** (Date.now())\n8. **Test locally** before deploying migrations\n9. **Use read replicas** for global read performance\n10. **Validate input** before SQL queries\n\n### Never Do ❌\n\n1. **Never concatenate** user input into SQL\n2. **Never commit database_id** to public repos\n3. **Never skip migrations** for schema changes\n4. **Never use VARCHAR** (use TEXT instead)\n5. **Never skip indexes** for filtered columns\n6. **Never ignore** SQLite type affinity rules\n7. **Never use SELECT *** without LIMIT\n8. **Never run migrations** without testing locally\n9. **Never exceed** 1MB per row\n10. **Never use DATETIME** (use INTEGER for timestamps)\n\n---\n\n## D1 API Methods\n\n### prepare() - Execute Queries\n\n```typescript\n\u002F\u002F Single result\nconst { results } = await env.DB.prepare(\n  'SELECT * FROM users WHERE email = ?'\n)\n  .bind(email)\n  .all();\n\n\u002F\u002F First result only\nconst user = await env.DB.prepare(\n  'SELECT * FROM users WHERE user_id = ?'\n)\n  .bind(userId)\n  .first();\n\n\u002F\u002F Raw results (faster)\nconst { results } = await env.DB.prepare(\n  'SELECT username FROM users'\n)\n  .raw();  \u002F\u002F Returns arrays instead of objects\n```\n\n### batch() - Multiple Queries\n\n```typescript\nconst results = await env.DB.batch([\n  env.DB.prepare('INSERT INTO users (email, username, created_at) VALUES (?, ?, ?)')\n    .bind('user1@example.com', 'user1', Date.now()),\n  env.DB.prepare('INSERT INTO users (email, username, created_at) VALUES (?, ?, ?)')\n    .bind('user2@example.com', 'user2', Date.now()),\n  env.DB.prepare('SELECT COUNT(*) as count FROM users')\n]);\n\nconsole.log('Users count:', results[2].results[0].count);\n```\n\n**All queries execute in single transaction** (all succeed or all fail).\n\n### exec() - Run SQL String\n\n```typescript\n\u002F\u002F For migrations\u002Fsetup only\nawait env.DB.exec(`\n  CREATE TABLE IF NOT EXISTS users (\n    user_id INTEGER PRIMARY KEY,\n    email TEXT NOT NULL\n  );\n  CREATE INDEX idx_email ON users(email);\n`);\n```\n\n**NEVER use for queries with user input!**\n\n**Load `references\u002Fquery-patterns.md` for complete API reference.**\n\n---\n\n## Top 5 Use Cases\n\n### Use Case 1: User CRUD\n\n```typescript\n\u002F\u002F Create\napp.post('\u002Fusers', async (c) => {\n  const { email, username } = await c.req.json();\n\n  const { results } = await c.env.DB.prepare(\n    'INSERT INTO users (email, username, created_at) VALUES (?, ?, ?) RETURNING *'\n  )\n    .bind(email, username, Date.now())\n    .all();\n\n  return c.json(results[0]);\n});\n\n\u002F\u002F Read\napp.get('\u002Fusers\u002F:id', async (c) => {\n  const user = await c.env.DB.prepare(\n    'SELECT * FROM users WHERE user_id = ?'\n  )\n    .bind(c.req.param('id'))\n    .first();\n\n  if (!user) {\n    return c.json({ error: 'Not found' }, 404);\n  }\n\n  return c.json(user);\n});\n\n\u002F\u002F Update\napp.patch('\u002Fusers\u002F:id', async (c) => {\n  const { username } = await c.req.json();\n\n  await c.env.DB.prepare(\n    'UPDATE users SET username = ?, updated_at = ? WHERE user_id = ?'\n  )\n    .bind(username, Date.now(), c.req.param('id'))\n    .run();\n\n  return c.json({ success: true });\n});\n\n\u002F\u002F Delete\napp.delete('\u002Fusers\u002F:id', async (c) => {\n  await c.env.DB.prepare(\n    'DELETE FROM users WHERE user_id = ?'\n  )\n    .bind(c.req.param('id'))\n    .run();\n\n  return c.json({ success: true });\n});\n```\n\n### Use Case 2: Batch Operations\n\n```typescript\napp.post('\u002Fusers\u002Fbulk', async (c) => {\n  const users = await c.req.json();  \u002F\u002F Array of users\n\n  const statements = users.map(user =>\n    c.env.DB.prepare(\n      'INSERT INTO users (email, username, created_at) VALUES (?, ?, ?)'\n    ).bind(user.email, user.username, Date.now())\n  );\n\n  const results = await c.env.DB.batch(statements);\n\n  return c.json({ inserted: results.length });\n});\n```\n\n### Use Case 3: Read Replication (Global Reads)\n\n```typescript\n\u002F\u002F Configure read replica (any region)\nconst session = c.env.DB.withSession({\n  preferredRegion: 'auto'  \u002F\u002F or 'weur', 'wnam', 'enam', 'apac'\n});\n\n\u002F\u002F Read from nearest replica\nconst { results } = await session.prepare(\n  'SELECT * FROM users WHERE email = ?'\n)\n  .bind(email)\n  .all();\n\n\u002F\u002F Check which region served request\nconsole.log('Served by:', results[0].served_by_region);\n```\n\n**Load `references\u002Fread-replication.md` for complete guide.**\n\n### Use Case 4: Transactions with Batch\n\n```typescript\n\u002F\u002F Transfer credits between users (atomic)\nconst results = await c.env.DB.batch([\n  c.env.DB.prepare(\n    'UPDATE users SET credits = credits - ? WHERE user_id = ?'\n  ).bind(amount, fromUserId),\n  c.env.DB.prepare(\n    'UPDATE users SET credits = credits + ? WHERE user_id = ?'\n  ).bind(amount, toUserId),\n  c.env.DB.prepare(\n    'INSERT INTO transactions (from_user, to_user, amount, created_at) VALUES (?, ?, ?, ?)'\n  ).bind(fromUserId, toUserId, amount, Date.now())\n]);\n\n\u002F\u002F All succeed or all fail (transaction)\n```\n\n### Use Case 5: Pagination\n\n```typescript\napp.get('\u002Fusers', async (c) => {\n  const page = parseInt(c.req.query('page') || '1');\n  const limit = 20;\n  const offset = (page - 1) * limit;\n\n  const { results } = await c.env.DB.prepare(\n    'SELECT * FROM users ORDER BY created_at DESC LIMIT ? OFFSET ?'\n  )\n    .bind(limit, offset)\n    .all();\n\n  return c.json({\n    users: results,\n    page,\n    limit\n  });\n});\n```\n\n---\n\n## Migrations Best Practices\n\n### 1. Always Use Migrations\n\n```bash\nbunx wrangler d1 migrations create my-database add_users_avatar\n```\n\n### 2. Make Migrations Idempotent\n\n```sql\n-- ✅ GOOD: Idempotent\nCREATE TABLE IF NOT EXISTS users (...);\nCREATE INDEX IF NOT EXISTS idx_email ON users(email);\nDROP TABLE IF EXISTS old_table;\n\n-- ❌ BAD: Fails on re-run\nCREATE TABLE users (...);\nCREATE INDEX idx_email ON users(email);\n```\n\n### 3. Test Locally First\n\n```bash\nbunx wrangler d1 migrations apply my-database --local\nbunx wrangler d1 execute my-database --local --command \"SELECT * FROM users\"\n```\n\n### 4. Add PRAGMA optimize\n\n```sql\n-- End of migration\nPRAGMA optimize;\n```\n\n**Load `templates\u002Fschema-example.sql` for complete schema template.**\n\n---\n\n## When to Load References\n\n### Load `references\u002Fsetup-guide.md` when:\n- First-time D1 setup\n- Creating first database\n- Configuring bindings\n- Applying first migration\n\n### Load `references\u002Fquery-patterns.md` when:\n- Need complete API reference\n- Complex query patterns\n- Batch operations\n- Error handling\n\n### Load `references\u002Fread-replication.md` when:\n- Setting up global reads\n- Need low latency worldwide\n- Understanding Sessions API\n- Sequential consistency required\n\n### Load `references\u002Fbest-practices.md` when:\n- Optimizing query performance\n- Schema design decisions\n- Index strategies\n- Production deployment checklist\n\n### Load `references\u002Flimits.md` when:\n- Encountering 429 errors or quota warnings\n- Planning capacity for free vs paid tiers\n- Understanding database\u002Fquery limits\n- Migrating to paid plan\n\n### Load `references\u002Fmetrics-analytics.md` when:\n- Investigating performance issues\n- Setting up monitoring and alerts\n- Using `wrangler d1 insights` command\n- Analyzing query efficiency\n\n### Load `references\u002F2025-features.md` when:\n- Upgrading from v2.x to v3.x\n- Enabling new features (auto-retry, jurisdiction, replication)\n- Understanding breaking changes (Feb 10, 2025 enforcement)\n- Migrating before deadlines\n\n### Interactive Tools\n\n**Agents** (Autonomous diagnostics):\n- **`agents\u002Fd1-debugger.md`**: 9-phase diagnostic (config, migrations, queries, bindings, errors, limits, performance, Time Travel)\n- **`agents\u002Fd1-query-optimizer.md`**: Performance analysis (slow queries, missing indexes, optimization recommendations)\n\n**Commands** (Interactive wizards):\n- **`commands\u002Fcloudflare-d1:setup.md`**: Interactive first-time setup wizard\n- **`commands\u002Fd1-create-migration.md`**: Guided migration creation with validation\n\n---\n\n## Using Bundled Resources\n\n### References (references\u002F)\n\n- **setup-guide.md** - Complete setup walkthrough\n- **query-patterns.md** - Complete API reference with examples\n- **read-replication.md** - Global read replicas setup\n- **best-practices.md** - Performance and optimization\n\n### Templates (templates\u002F)\n\n- **schema-example.sql** - Complete schema with indexes\n- **d1-worker-queries.ts** - All query patterns in Workers\n- **cloudflare-d1:setup-migration.sh** - Complete setup script\n\n---\n\n## Common Patterns\n\n### Error Handling\n\n```typescript\ntry {\n  const { results } = await env.DB.prepare(\n    'SELECT * FROM users WHERE email = ?'\n  )\n    .bind(email)\n    .all();\n\n  return c.json(results);\n} catch (error) {\n  console.error('D1 Error:', error);\n  return c.json({ error: 'Database error' }, 500);\n}\n```\n\n### Raw Mode (Performance)\n\n```typescript\n\u002F\u002F Returns arrays instead of objects (faster)\nconst { results } = await env.DB.prepare(\n  'SELECT user_id, email FROM users'\n)\n  .raw();\n\n\u002F\u002F results = [[1, 'user1@example.com'], [2, 'user2@example.com']]\n```\n\n### COUNT Queries\n\n```typescript\nconst count = await env.DB.prepare(\n  'SELECT COUNT(*) as count FROM users'\n)\n  .first('count');  \u002F\u002F Get single column value\n\nconsole.log('Total users:', count);\n```\n\n---\n\n## SQLite Type Affinity\n\nD1 uses SQLite type affinity:\n\n| Declared Type | Affinity |\n|---------------|----------|\n| INTEGER, INT | INTEGER |\n| TEXT, VARCHAR, CHAR | TEXT |\n| REAL, FLOAT, DOUBLE | REAL |\n| BLOB | BLOB |\n| (no type) | BLOB |\n\n**Best practices:**\n- Use `INTEGER` for numbers\n- Use `TEXT` for strings (not VARCHAR)\n- Use `INTEGER` for timestamps (Date.now())\n- Use `BLOB` for binary data\n\n---\n\n## Top 5 Errors Prevented\n\n1. **SQL Injection**: Use `.bind()`, never string concatenation\n2. **Missing Indexes**: Create indexes for WHERE\u002FJOIN columns\n3. **Migration Failures**: Test locally first\n4. **Type Confusion**: Use INTEGER for timestamps\n5. **Batch Size**: Limit batch to \u003C500 statements\n\n**Load `references\u002Fbest-practices.md` for complete error prevention.**\n\n---\n\n## Secure Installation\n\nWhen installing D1 driver packages, follow supply chain security best practices:\n\n- **Block post-install scripts** — `npm config set ignore-scripts true` (or Bun: disabled by default)\n- **Cooldown period** — Wait 7 days for new package versions to be vetted by the community\n- **Audit before installing** — Run `socket package score npm \u003Cpkg>` or use `socket npm install \u003Cpkg>` to check packages\n\nLoad the `dependency-upgrade` skill for full security configuration including Socket CLI integration, cooldown setup, lockfile validation, and CI enforcement.\n\n## Official Documentation\n\n- **D1 Overview**: https:\u002F\u002Fdevelopers.cloudflare.com\u002Fd1\u002F\n- **Get Started**: https:\u002F\u002Fdevelopers.cloudflare.com\u002Fd1\u002Fget-started\u002F\n- **Client API**: https:\u002F\u002Fdevelopers.cloudflare.com\u002Fd1\u002Fbuild-with-d1\u002Fd1-client-api\u002F\n- **Read Replication**: https:\u002F\u002Fdevelopers.cloudflare.com\u002Fd1\u002Freference\u002Fread-replication\u002F\n\n---\n\n**Questions? Issues?**\n\n1. Check `references\u002Fsetup-guide.md` for setup\n2. Review `references\u002Fquery-patterns.md` for API reference\n3. See `references\u002Fread-replication.md` for global reads\n4. Load `references\u002Fbest-practices.md` for optimization\n",{"name":5,"license":15,"metadata":24,"description":7},{"version":25,"keywords":26,"last_verified":59,"token_savings":60,"errors_prevented":61,"wrangler_version":62,"production_tested":63,"templates_included":64,"drizzle_orm_version":65,"references_included":66,"workers_types_version":67},"3.0.0",[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58],"d1","d1 database","cloudflare d1","wrangler d1","d1 migrations","d1 bindings","sqlite workers","edge database","d1 queries","sql cloudflare","prepared statements","batch queries","d1 api","wrangler migrations","D1_ERROR","D1_EXEC_ERROR","statement too long","database bindings","sqlite cloudflare","sql workers api","d1 indexes","query optimization","d1 schema","read replication","read replica","withSession","Sessions API","global replication","database replication","served_by_region","bookmarks","sequential consistency","2025-01-15","~58%",8,"4.50.0",true,3,"0.44.7",4,"4.20251125.0","main","c475fc64e94e803b50d14a791dfee8853fbb2c5c","integrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fcloudflare-d1\u002Fskills\u002Fcloudflare-d1","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory","https:\u002F\u002Fgithub.com\u002FElogic360","2026-11-08 22:21:22",{"source":8,"skillName":5,"commands":75,"prompt":85,"zipAvailable":63},[76,79,82],{"tool":77,"command":78},"npx","npx skills add Elogic360\u002Fsoftware-factory --skill cloudflare-d1",{"tool":80,"command":81},"bunx","bunx skills add Elogic360\u002Fsoftware-factory --skill cloudflare-d1",{"tool":83,"command":84},"pnpm","pnpm dlx skills add Elogic360\u002Fsoftware-factory --skill cloudflare-d1","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fcloudflare-d1\u002Fskills\u002Fcloudflare-d1\u002FSKILL.md",[87,93,97,101,105,109,113,117,123,127],{"path":88,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002F2025-features.md","REFERENCE","参考文档",16064,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fcloudflare-d1\u002Fskills\u002Fcloudflare-d1\u002Freferences\u002F2025-features.md",{"path":94,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fbest-practices.md",34421,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fcloudflare-d1\u002Fskills\u002Fcloudflare-d1\u002Freferences\u002Fbest-practices.md",{"path":98,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Flimits.md",12941,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fcloudflare-d1\u002Fskills\u002Fcloudflare-d1\u002Freferences\u002Flimits.md",{"path":102,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Fmetrics-analytics.md",19504,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fcloudflare-d1\u002Fskills\u002Fcloudflare-d1\u002Freferences\u002Fmetrics-analytics.md",{"path":106,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":107,"sourceHtmlUrl":108},"references\u002Fquery-patterns.md",21302,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fcloudflare-d1\u002Fskills\u002Fcloudflare-d1\u002Freferences\u002Fquery-patterns.md",{"path":110,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":111,"sourceHtmlUrl":112},"references\u002Fread-replication.md",20136,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fcloudflare-d1\u002Fskills\u002Fcloudflare-d1\u002Freferences\u002Fread-replication.md",{"path":114,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":115,"sourceHtmlUrl":116},"references\u002Fsetup-guide.md",3101,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fcloudflare-d1\u002Fskills\u002Fcloudflare-d1\u002Freferences\u002Fsetup-guide.md",{"path":118,"resourceType":119,"resourceTypeDesc":120,"sizeBytes":121,"sourceHtmlUrl":122},"templates\u002Fd1-setup-migration.sh","SCRIPT","脚本",4634,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fcloudflare-d1\u002Fskills\u002Fcloudflare-d1\u002Ftemplates\u002Fd1-setup-migration.sh",{"path":124,"resourceType":119,"resourceTypeDesc":120,"sizeBytes":125,"sourceHtmlUrl":126},"templates\u002Fd1-worker-queries.ts",16318,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fcloudflare-d1\u002Fskills\u002Fcloudflare-d1\u002Ftemplates\u002Fd1-worker-queries.ts",{"path":128,"resourceType":129,"resourceTypeDesc":130,"sizeBytes":131,"sourceHtmlUrl":132},"templates\u002Fschema-example.sql","OTHER","其他",8193,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fcloudflare-d1\u002Fskills\u002Fcloudflare-d1\u002Ftemplates\u002Fschema-example.sql",[134,142,149,156,163,170],{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":138,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":19},"01M79G206MT3J6S0GY3C45P2KV","vss-summarize-video","Use to summarize a recorded video via the LVS summarization microservice (HITL-gated) with a VLM fallback. Not for report generation or live RTSP captioning.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-summarize-video\u002FSKILL.md",[],[],{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":138,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":19},"01M79G1WN63PGRE8CKD47WEBQ5","vss-setup-video-analytics-api","Use to deploy the vss-video-analytics-api REST service standalone (config-source, data-log bind, Elasticsearch, optional Kafka). Not for full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-video-analytics-api\u002FSKILL.md",[],[],{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":138,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":19},"01M79G1S9F7VY3EF6H53PRP5AN","vss-setup-behavior-analytics","Use to deploy the vss-behavior-analytics service standalone (entrypoint, config-source, optional calibration). Not for the full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-behavior-analytics\u002FSKILL.md",[],[],{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":138,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":19},"01M79G1N1S1Y27PFZPYMNK1MTQ","vss-search-archive","Use this skill to run top-level VSS fusion search on archived video, or to ingest video files \u002F RTSP streams for search. Do NOT use for ad-hoc visual Q&A (use vss-ask-video), live captioning (use vss-deploy-dense-captioning), or video summarization and reports (use vss-summarize-video).","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-search-archive\u002FSKILL.md",[],[],{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":138,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":19},"01M79G1H6WN0Q6C0VCAXCZX6B7","vss-query-analytics","Use this skill when reading video-analytics metrics, incidents, alerts, and sensor data via the VA-MCP server (port 9901). Not for live VLM or incident-range narrative reports.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-query-analytics\u002FSKILL.md",[],[],{"skillNo":171,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":138,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":19},"01M79G1DYPNXQS7QHZ0AAF5FX5","vss-manage-video-io-storage","Use to call the VIOS REST API (sensor list, timelines, clip extraction, snapshots, add\u002Fdelete sensors and streams). Not for VLM inference or search.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-manage-video-io-storage\u002FSKILL.md",[],[]]