[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EV9A8DF8ZW6DT4HF9FKJWN":3,"skill-same:01M7EV9A8DF8ZW6DT4HF9FKJWN":46},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7EV9A8DF8ZW6DT4HF9FKJWN","database-to-magma",null,"Restore a native Magma object (CliffOrd, GrpPSL2Cliff, etc.) directly from the PostgreSQL lmfdb schema. Use whenever the user says \"restore magma object from database\", \"database to magma\", \"load native object from db\", or \"db to mag\".","tdupu\u002Fagent-skills-public","tdupu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F3440403?v=4","01M7EV32X9J0EFE5T4P8TKQTCQ","Taylor Dupuy","01M7EV32XZ1Z4MDBYAFRCJD3BP",0,"GPL-3.0","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fskills\u002Fdatabase-to-magma\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: database-to-magma\ndescription: Restore a native Magma object (CliffOrd, GrpPSL2Cliff, etc.) directly from the PostgreSQL lmfdb schema. Use whenever the user says \"restore magma object from database\", \"database to magma\", \"load native object from db\", or \"db to mag\".\n---\n\n# database-to-magma\n\n## Dependency check\n\n```bash\n# Discover conf: project root first, hecke fallback\nCONF=\"\"\nfor candidate in \\\n    \"$(git rev-parse --show-toplevel 2>\u002Fdev\u002Fnull)\u002Flmfdb-pipeline.conf\" \\\n    \"magma\u002Fscripts\u002Fdata-generation.conf\"; do\n  [ -f \"$candidate\" ] && { CONF=\"$candidate\"; break; }\ndone\nif [ -z \"$CONF\" ]; then\n  echo \"I'm sorry, I can't do that — no database pipeline conf found.\"\n  echo \"Run \u002Fconfigure-database (mathcity-lmfdb.configure-database) to create lmfdb-pipeline.conf at your project root.\"\n  echo \"(This conf holds your PostgreSQL and DATA_DIR settings for the LMFDB pipeline.)\"\n  exit 1\nfi\nsource \"$CONF\"\n```\n\n**Purpose:** Full pipeline from the lmfdb PostgreSQL schema to a live Magma object:\n\n```\ndb query → pipe-delimited string → LMFDBXxx object → native Magma object\n```\n\nThis replaces the `data-to-mag` pipeline (which reads flat files) once the database is the authoritative store.\n\n**Dependency:** `\u002Fdatabase-to-lmfdb-object` must work correctly first — the round-trip from\nDATA\u002F → postgres → pipe string → Magma object must be verified before relying on this skill.\n\n## Step 1 — Get the pipe-delimited string from the database\n\nUse `\u002Fdatabase-to-lmfdb-object` to query the lmfdb schema and emit the pipe-delimited string.\n\n```bash\n# Example: restore order with label 2.m1.m4.4.4.1.16.4.1.1\npsql clifford_bianchi_local -t -A -F '|' -c \"\n    SELECT basis, clifford_algebra, dimension, discriminant,\n           is_maximal, is_norm_euclidean, is_star_invariant, label, timing\n    FROM lmfdb.clifford_orders\n    WHERE label = '2.m1.m4.4.4.1.16.4.1.1';\n\" > \u002Ftmp\u002Forder_string.txt\n```\n\n## Step 2 — Feed the string to `\u002Fstring-to-lmfdb-object`\n\n```magma\nAttachSpec(\"hecke.spec\");\nSetLMFDBRootFolder(\".\");\n\nline := Read(\"\u002Ftmp\u002Forder_string.txt\");\nline := &cat[c : c in Split(line, \"\\n\") | #c gt 0];   \u002F\u002F strip trailing newline\n\nlmfdb_ord := load_lmfdb_clifford_order(line);          \u002F\u002F → LMFDBCliffOrd\n```\n\nOr use the `\u002Fstring-to-lmfdb-object` skill directly with the string.\n\n## Step 3 — Feed the LMFDB object to `\u002Flmfdb-object-to-magma`\n\n```magma\nO := clifford_order(lmfdb_ord);                        \u002F\u002F → CliffOrd\n```\n\nSee `\u002Flmfdb-object-to-magma` for the full intrinsic reference per object type.\n\n## Full one-liner (Python → temp file → Magma)\n\n```python\n# Python side\nimport subprocess, db_config\n\nlabel = \"2.m1.m4.4.4.1.16.4.1.1\"\nconn = db_config.get_connection()\nwith conn.cursor() as cur:\n    cur.execute(\"\"\"\n        SELECT basis, clifford_algebra, dimension, discriminant,\n               is_maximal, is_norm_euclidean, is_star_invariant, label, timing\n        FROM lmfdb.clifford_orders WHERE label = %s\n    \"\"\", (label,))\n    row = cur.fetchone()\nconn.close()\nline = \"|\".join(\"\\\\N\" if v is None else str(v) for v in row)\nwith open(\"\u002Ftmp\u002Fdb_order.txt\", \"w\") as f:\n    f.write(line + \"\\n\")\n```\n\n```magma\n\u002F\u002F Magma side\nAttachSpec(\"hecke.spec\");\nSetLMFDBRootFolder(\".\");\nline := [H : H in Split(Read(\"\u002Ftmp\u002Fdb_order.txt\"), \"\\n\") | #H gt 0][1];\nlmfdb_ord := load_lmfdb_clifford_order(line);\nO := clifford_order(lmfdb_ord);\n```\n\n## Object-type reference\n\n| Object type       | lmfdb table              | LMFDB wrapper type         | Magma intrinsic          |\n|-------------------|--------------------------|----------------------------|--------------------------|\n| Order             | `clifford_orders`        | `LMFDBCliffOrd`            | `clifford_order(X)`      |\n| SL₂(O) group      | `clifford_sl2`           | `LMFDBGrpSL2Cliff`         | `clifford_bianchi_group(X)` |\n| Gamma0 subgroup   | `clifford_gamma0`        | `LMFDBGrpSL2CliffGamma0`   | (see `\u002Flmfdb-object-to-magma`)  |\n| Low-index subgroup| `clifford_subgroups`     | `LMFDBPSL2GrpCliffSub`     | (see `\u002Flmfdb-object-to-magma`)  |\n","# database-to-magma\n\n## Dependency check\n\n```bash\n# Discover conf: project root first, hecke fallback\nCONF=\"\"\nfor candidate in \\\n    \"$(git rev-parse --show-toplevel 2>\u002Fdev\u002Fnull)\u002Flmfdb-pipeline.conf\" \\\n    \"magma\u002Fscripts\u002Fdata-generation.conf\"; do\n  [ -f \"$candidate\" ] && { CONF=\"$candidate\"; break; }\ndone\nif [ -z \"$CONF\" ]; then\n  echo \"I'm sorry, I can't do that — no database pipeline conf found.\"\n  echo \"Run \u002Fconfigure-database (mathcity-lmfdb.configure-database) to create lmfdb-pipeline.conf at your project root.\"\n  echo \"(This conf holds your PostgreSQL and DATA_DIR settings for the LMFDB pipeline.)\"\n  exit 1\nfi\nsource \"$CONF\"\n```\n\n**Purpose:** Full pipeline from the lmfdb PostgreSQL schema to a live Magma object:\n\n```\ndb query → pipe-delimited string → LMFDBXxx object → native Magma object\n```\n\nThis replaces the `data-to-mag` pipeline (which reads flat files) once the database is the authoritative store.\n\n**Dependency:** `\u002Fdatabase-to-lmfdb-object` must work correctly first — the round-trip from\nDATA\u002F → postgres → pipe string → Magma object must be verified before relying on this skill.\n\n## Step 1 — Get the pipe-delimited string from the database\n\nUse `\u002Fdatabase-to-lmfdb-object` to query the lmfdb schema and emit the pipe-delimited string.\n\n```bash\n# Example: restore order with label 2.m1.m4.4.4.1.16.4.1.1\npsql clifford_bianchi_local -t -A -F '|' -c \"\n    SELECT basis, clifford_algebra, dimension, discriminant,\n           is_maximal, is_norm_euclidean, is_star_invariant, label, timing\n    FROM lmfdb.clifford_orders\n    WHERE label = '2.m1.m4.4.4.1.16.4.1.1';\n\" > \u002Ftmp\u002Forder_string.txt\n```\n\n## Step 2 — Feed the string to `\u002Fstring-to-lmfdb-object`\n\n```magma\nAttachSpec(\"hecke.spec\");\nSetLMFDBRootFolder(\".\");\n\nline := Read(\"\u002Ftmp\u002Forder_string.txt\");\nline := &cat[c : c in Split(line, \"\\n\") | #c gt 0];   \u002F\u002F strip trailing newline\n\nlmfdb_ord := load_lmfdb_clifford_order(line);          \u002F\u002F → LMFDBCliffOrd\n```\n\nOr use the `\u002Fstring-to-lmfdb-object` skill directly with the string.\n\n## Step 3 — Feed the LMFDB object to `\u002Flmfdb-object-to-magma`\n\n```magma\nO := clifford_order(lmfdb_ord);                        \u002F\u002F → CliffOrd\n```\n\nSee `\u002Flmfdb-object-to-magma` for the full intrinsic reference per object type.\n\n## Full one-liner (Python → temp file → Magma)\n\n```python\n# Python side\nimport subprocess, db_config\n\nlabel = \"2.m1.m4.4.4.1.16.4.1.1\"\nconn = db_config.get_connection()\nwith conn.cursor() as cur:\n    cur.execute(\"\"\"\n        SELECT basis, clifford_algebra, dimension, discriminant,\n               is_maximal, is_norm_euclidean, is_star_invariant, label, timing\n        FROM lmfdb.clifford_orders WHERE label = %s\n    \"\"\", (label,))\n    row = cur.fetchone()\nconn.close()\nline = \"|\".join(\"\\\\N\" if v is None else str(v) for v in row)\nwith open(\"\u002Ftmp\u002Fdb_order.txt\", \"w\") as f:\n    f.write(line + \"\\n\")\n```\n\n```magma\n\u002F\u002F Magma side\nAttachSpec(\"hecke.spec\");\nSetLMFDBRootFolder(\".\");\nline := [H : H in Split(Read(\"\u002Ftmp\u002Fdb_order.txt\"), \"\\n\") | #H gt 0][1];\nlmfdb_ord := load_lmfdb_clifford_order(line);\nO := clifford_order(lmfdb_ord);\n```\n\n## Object-type reference\n\n| Object type       | lmfdb table              | LMFDB wrapper type         | Magma intrinsic          |\n|-------------------|--------------------------|----------------------------|--------------------------|\n| Order             | `clifford_orders`        | `LMFDBCliffOrd`            | `clifford_order(X)`      |\n| SL₂(O) group      | `clifford_sl2`           | `LMFDBGrpSL2Cliff`         | `clifford_bianchi_group(X)` |\n| Gamma0 subgroup   | `clifford_gamma0`        | `LMFDBGrpSL2CliffGamma0`   | (see `\u002Flmfdb-object-to-magma`)  |\n| Low-index subgroup| `clifford_subgroups`     | `LMFDBPSL2GrpCliffSub`     | (see `\u002Flmfdb-object-to-magma`)  |\n",{"name":5,"description":7},"main","8d13efb5e66306aeae6e3b948bc463e7e2db1b65","skills\u002Fdatabase-to-magma","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public","https:\u002F\u002Fgithub.com\u002Ftdupu","https:\u002F\u002Ftdupu.github.io\u002Findex.html","Associate Professor, Department of Mathematics and Statistics, University of Vermont --- last updated Fall 2019","2026-11-13 09:07:19",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add tdupu\u002Fagent-skills-public --skill database-to-magma",{"tool":38,"command":39},"bunx","bunx skills add tdupu\u002Fagent-skills-public --skill database-to-magma",{"tool":41,"command":42},"pnpm","pnpm dlx skills add tdupu\u002Fagent-skills-public --skill database-to-magma","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fskills\u002Fdatabase-to-magma\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M7EW4PT586KKE7VRCAD80Z9K","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fsuperpowers\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7EW4HV5V74AF3PTV8N4T0PS","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fsuperpowers\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7EW4DNKGP5CR1RAJP2J9PHA","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fsuperpowers\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7EW4BA2QP88VBFVXDVJM7XQ","using-superpowers","Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fsuperpowers\u002Fskills\u002Fusing-superpowers\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7EW47F2JG5FBESDJNP3PKMV","using-git-worktrees","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fsuperpowers\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7EW44N8556Y556NX9HJT4KP","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fsuperpowers\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[]]