[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74ER0RXTFW2P85DFZM9V85X":3,"skill-same:01M74ER0RXTFW2P85DFZM9V85X":56},{"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":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M74ER0RXTFW2P85DFZM9V85X","timestamptz-standardization",null,"Timestamp Standardization (timestamptz)","CarlosCaPe\u002Foctorato","CarlosCaPe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F39838249?v=4","01M72WXX4ZRR8MBH1EP1QND2FQ","dataqbs","01M72WXX5NA7YCKRSJ54GW1GQ8",18,"MIT","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Ftimestamptz-standardization\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: timestamptz-standardization\ndescription: \"Timestamp Standardization (timestamptz)\"\nmetadata:\n  short-description: \"Timestamp Standardization (timestamptz)\"\n  original-index: 26\n---\n\n# Timestamp Standardization (timestamptz)\n\n> Source: [PostgreSQL Best Practices](..\u002FDOCUMENTS\u002FPostgreSQL_BestPractices_Azure.md)\n> -- \"Use timestamptz (UTC). Avoid timezone-naive types.\"\n\n## What\n\nConverting all `timestamp without time zone` columns to `timestamptz`\n(timestamp with time zone) and ensuring UTC semantics across the schema.\n\n## Why\n\n`timestamp without time zone` stores a bare datetime with **no timezone\ninformation**. PostgreSQL interprets it differently depending on the session's\n`TimeZone` setting. This causes:\n- Ambiguous time values across servers, clients, and time zones\n- Wrong results in scheduled jobs that cross DST boundaries\n- Incorrect ordering\u002Ffiltering when Azure servers default to UTC but\n  clients assume local time\n- Silent data corruption when aggregating timestamps from multiple zones\n\n`timestamptz` stores the value in UTC internally and converts for display\nbased on the session timezone. This eliminates all ambiguity.\n\n**Official PG 16 specification** (datatype-datetime.html):\n- Both `timestamp` and `timestamptz` use **8 bytes**, microsecond precision\n- `timestamptz` is stored internally as UTC\n- On output, the value is converted from UTC to the session's `TimeZone`\n- The SQL standard requires plain `timestamp` to mean `timestamp without\n  time zone` -- always spell out `timestamptz` explicitly\n\n## How\n\n### Step 1: Assess scope\n```sql\n-- Find all timestamp columns that are NOT timestamptz\nSELECT table_name, column_name, data_type\nFROM information_schema.columns\nWHERE table_schema = 'public'\n  AND data_type = 'timestamp without time zone'\nORDER BY table_name, ordinal_position;\n```\n\n### Step 2: Convert with explicit UTC reinterpretation\n```sql\nALTER TABLE public.\"MyTable\"\n    ALTER COLUMN \"CreatedDate\" TYPE timestamptz\n    USING \"CreatedDate\" AT TIME ZONE 'UTC';\n```\n\nThe `AT TIME ZONE 'UTC'` clause tells PostgreSQL: \"these existing values\nwere meant to be UTC -- store them as UTC timestamptz.\"\n\n### Step 3: Handle dependent views\nViews that SELECT timestamp columns will break if the underlying type\nchanges. Drop and recreate them:\n```sql\n-- Save view definition\nSELECT pg_get_viewdef('public.\"MyView\"'::regclass, true);\n\n-- Drop view\nDROP VIEW IF EXISTS public.\"MyView\";\n\n-- Alter column type\nALTER TABLE public.\"MyTable\"\n    ALTER COLUMN \"CreatedDate\" TYPE timestamptz\n    USING \"CreatedDate\" AT TIME ZONE 'UTC';\n\n-- Recreate view\nCREATE VIEW public.\"MyView\" AS ...;\n```\n\n### Step 4: Set default for new rows\n```sql\nALTER TABLE public.\"MyTable\"\n    ALTER COLUMN \"CreatedDate\" SET DEFAULT now();\n    -- now() returns timestamptz, not timestamp\n```\n\n## Decision Matrix\n\n| Scenario | Use |\n|----------|-----|\n| Any new column storing \"when something happened\" | `timestamptz NOT NULL DEFAULT now()` |\n| Columns storing a user-entered date only (no time) | `date` |\n| Columns storing a duration or interval | `interval` |\n| Legacy column with `timestamp without time zone` | Convert to `timestamptz` |\n\n## Key PostgreSQL Behavior\n\n```sql\n-- Session timezone affects display, NOT storage\nSET timezone = 'America\u002FLos_Angeles';\nSELECT now();  -- displays in Pacific time\nSELECT now() AT TIME ZONE 'UTC';  -- displays in UTC\n\n-- timestamptz stores in UTC regardless of session\nINSERT INTO t (ts) VALUES ('2026-03-04 10:00:00-05');\n-- Stored as: 2026-03-04 15:00:00+00 (UTC)\n```\n\n## When to Use\n\n- Every table audit that finds `timestamp without time zone` columns\n- Every new table definition (always use `timestamptz`)\n- After audit findings flag timestamp type inconsistencies\n\n## Where We Used It\n\n- ****: Converted ALL Scribe tables to timestamptz (original ticket)\n- ****: Standardized AuditLog\u002FErrorLog timestamps\n- ****: Migrated 15 Feature Flag columns to timestamptz\n- ****: Converted 65 myapp columns to timestamptz\n- **scheduling Audit**: Finding #2 flagged 28 columns across 12 tables\n\n## Related Skills\n\n- **Skill #07** (Backward Compatibility) -- app code may assume naive timestamps\n- **Skill #04** (Idempotent Design) -- check column type before converting\n\n## References\n\n- [PostgreSQL Best Practices](..\u002FDOCUMENTS\u002FPostgreSQL_BestPractices_Azure.md)\n  -- \"Schema design and data types\" and Backlog #2\n- [scheduling Audit TDD](..\u002FDOCUMENTS\u002Fscheduling_DB_Audit_TDD.md)\n  -- Finding #2\n\n## Gotchas\n\n- `ALTER COLUMN TYPE timestamptz` rewrites the table -- locks it briefly;\n  on very large tables, plan for downtime or use a staged approach\n- Views that reference the column must be dropped first and recreated after\n- If the server timezone is NOT UTC, `AT TIME ZONE 'UTC'` is critical --\n  without it, PostgreSQL assumes the session timezone\n- Application code that formats timestamps without timezone info may display\n  differently after conversion\n- `created_at` defaults should use `now()` (returns timestamptz), not\n  `CURRENT_TIMESTAMP` (same, but `now()` is more portable in PL\u002FpgSQL)\n\n---\n\n*Category: DDL | Origin: , , , *\n","# Timestamp Standardization (timestamptz)\n\n> Source: [PostgreSQL Best Practices](..\u002FDOCUMENTS\u002FPostgreSQL_BestPractices_Azure.md)\n> -- \"Use timestamptz (UTC). Avoid timezone-naive types.\"\n\n## What\n\nConverting all `timestamp without time zone` columns to `timestamptz`\n(timestamp with time zone) and ensuring UTC semantics across the schema.\n\n## Why\n\n`timestamp without time zone` stores a bare datetime with **no timezone\ninformation**. PostgreSQL interprets it differently depending on the session's\n`TimeZone` setting. This causes:\n- Ambiguous time values across servers, clients, and time zones\n- Wrong results in scheduled jobs that cross DST boundaries\n- Incorrect ordering\u002Ffiltering when Azure servers default to UTC but\n  clients assume local time\n- Silent data corruption when aggregating timestamps from multiple zones\n\n`timestamptz` stores the value in UTC internally and converts for display\nbased on the session timezone. This eliminates all ambiguity.\n\n**Official PG 16 specification** (datatype-datetime.html):\n- Both `timestamp` and `timestamptz` use **8 bytes**, microsecond precision\n- `timestamptz` is stored internally as UTC\n- On output, the value is converted from UTC to the session's `TimeZone`\n- The SQL standard requires plain `timestamp` to mean `timestamp without\n  time zone` -- always spell out `timestamptz` explicitly\n\n## How\n\n### Step 1: Assess scope\n```sql\n-- Find all timestamp columns that are NOT timestamptz\nSELECT table_name, column_name, data_type\nFROM information_schema.columns\nWHERE table_schema = 'public'\n  AND data_type = 'timestamp without time zone'\nORDER BY table_name, ordinal_position;\n```\n\n### Step 2: Convert with explicit UTC reinterpretation\n```sql\nALTER TABLE public.\"MyTable\"\n    ALTER COLUMN \"CreatedDate\" TYPE timestamptz\n    USING \"CreatedDate\" AT TIME ZONE 'UTC';\n```\n\nThe `AT TIME ZONE 'UTC'` clause tells PostgreSQL: \"these existing values\nwere meant to be UTC -- store them as UTC timestamptz.\"\n\n### Step 3: Handle dependent views\nViews that SELECT timestamp columns will break if the underlying type\nchanges. Drop and recreate them:\n```sql\n-- Save view definition\nSELECT pg_get_viewdef('public.\"MyView\"'::regclass, true);\n\n-- Drop view\nDROP VIEW IF EXISTS public.\"MyView\";\n\n-- Alter column type\nALTER TABLE public.\"MyTable\"\n    ALTER COLUMN \"CreatedDate\" TYPE timestamptz\n    USING \"CreatedDate\" AT TIME ZONE 'UTC';\n\n-- Recreate view\nCREATE VIEW public.\"MyView\" AS ...;\n```\n\n### Step 4: Set default for new rows\n```sql\nALTER TABLE public.\"MyTable\"\n    ALTER COLUMN \"CreatedDate\" SET DEFAULT now();\n    -- now() returns timestamptz, not timestamp\n```\n\n## Decision Matrix\n\n| Scenario | Use |\n|----------|-----|\n| Any new column storing \"when something happened\" | `timestamptz NOT NULL DEFAULT now()` |\n| Columns storing a user-entered date only (no time) | `date` |\n| Columns storing a duration or interval | `interval` |\n| Legacy column with `timestamp without time zone` | Convert to `timestamptz` |\n\n## Key PostgreSQL Behavior\n\n```sql\n-- Session timezone affects display, NOT storage\nSET timezone = 'America\u002FLos_Angeles';\nSELECT now();  -- displays in Pacific time\nSELECT now() AT TIME ZONE 'UTC';  -- displays in UTC\n\n-- timestamptz stores in UTC regardless of session\nINSERT INTO t (ts) VALUES ('2026-03-04 10:00:00-05');\n-- Stored as: 2026-03-04 15:00:00+00 (UTC)\n```\n\n## When to Use\n\n- Every table audit that finds `timestamp without time zone` columns\n- Every new table definition (always use `timestamptz`)\n- After audit findings flag timestamp type inconsistencies\n\n## Where We Used It\n\n- ****: Converted ALL Scribe tables to timestamptz (original ticket)\n- ****: Standardized AuditLog\u002FErrorLog timestamps\n- ****: Migrated 15 Feature Flag columns to timestamptz\n- ****: Converted 65 myapp columns to timestamptz\n- **scheduling Audit**: Finding #2 flagged 28 columns across 12 tables\n\n## Related Skills\n\n- **Skill #07** (Backward Compatibility) -- app code may assume naive timestamps\n- **Skill #04** (Idempotent Design) -- check column type before converting\n\n## References\n\n- [PostgreSQL Best Practices](..\u002FDOCUMENTS\u002FPostgreSQL_BestPractices_Azure.md)\n  -- \"Schema design and data types\" and Backlog #2\n- [scheduling Audit TDD](..\u002FDOCUMENTS\u002Fscheduling_DB_Audit_TDD.md)\n  -- Finding #2\n\n## Gotchas\n\n- `ALTER COLUMN TYPE timestamptz` rewrites the table -- locks it briefly;\n  on very large tables, plan for downtime or use a staged approach\n- Views that reference the column must be dropped first and recreated after\n- If the server timezone is NOT UTC, `AT TIME ZONE 'UTC'` is critical --\n  without it, PostgreSQL assumes the session timezone\n- Application code that formats timestamps without timezone info may display\n  differently after conversion\n- `created_at` defaults should use `now()` (returns timestamptz), not\n  `CURRENT_TIMESTAMP` (same, but `now()` is more portable in PL\u002FpgSQL)\n\n---\n\n*Category: DDL | Origin: , , , *\n",{"name":5,"metadata":24,"description":7},{"original-index":25,"short-description":7},26,"master","b4414608cd5a3f87d1525b518f1c6add8363540d","skills\u002Ftimestamptz-standardization",6,"https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato","https:\u002F\u002Fwww.dataqbs.com\u002Foctorato","https:\u002F\u002Fgithub.com\u002FCarlosCaPe","www.dataqbs.com"," AI-powered data engineering\r\n& consulting\r\n\r\nWe build data platforms that turn complexity into clarity — from cloud architecture and ETL pipelines to AI-driven","2026-11-14 00:21:00",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add CarlosCaPe\u002Foctorato --skill timestamptz-standardization",{"tool":42,"command":43},"bunx","bunx skills add CarlosCaPe\u002Foctorato --skill timestamptz-standardization",{"tool":45,"command":46},"pnpm","pnpm dlx skills add CarlosCaPe\u002Foctorato --skill timestamptz-standardization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Ftimestamptz-standardization\u002FSKILL.md",true,[50],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"skill.json","REFERENCE","参考文档",165,"https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Ftimestamptz-standardization\u002Fskill.json",[57,66,74,81,89,97],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":62,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M74EVAA4A4B4AKR5TT732GP4","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":70,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M74EV4WMRDKP2NQS4YWR8PXH","wrangler","Cloudflare Workers CLI for deploying, developing, and managing Workers, KV, R2, D1, Vectorize, Hyperdrive, Workers AI, Containers, Queues, Workflows, Pipelines, and Secrets Store. Load before running wrangler commands to ensure correct syntax and best practices. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fwrangler\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fwrangler\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M74EV05MHTXKEXD4B2QJEYTF","workspace-skill-discovery","Discover and include ALL skills across the workspace — not just global ones. Use at the start of every session or when the user asks about available skills. Ensures project-level skills (under .claude\u002Fskills\u002F or skills\u002F in any repo) are never missed.","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fworkspace-skill-discovery\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":85,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M74ETV78525B4VP2F28Z6NRD","workers-best-practices","Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from Cloudflare docs over pre-trained knowledge.","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fworkers-best-practices\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fworkers-best-practices\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":93,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M74ETR75NF67WGVEN7288ACV","winui-app","Create, build and design WinUI 3 desktop apps with C# and the Windows App SDK following Microsoft's official guidance and CommunityToolkit. Covers XAML, navigation, theming, accessibility and deployment.","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fwinui-app\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fwinui-app\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M74ETJFRNPPNSQZ36C6HD6CW","windows-brain-script-portability","Scripts in ~\u002F.claude\u002Fscripts\u002F that run on a Windows brain: use the python3.cmd shim and not bare python3, and reconfigure stdout to UTF-8 if you print symbols. Use it when writing a brain script or triaging a Windows-only crash.","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fwindows-brain-script-portability\u002FSKILL.md",[],[]]