[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EV945NXW1D8E6G87A7C2F4":3,"skill-same:01M7EV945NXW1D8E6G87A7C2F4":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},"01M7EV945NXW1D8E6G87A7C2F4","database-to-lmfdb-object",null,"Restore an LMFDB wrapper object from PostgreSQL instead of a flat file. Use whenever the user says \"restore from database\", \"load from postgres\", \"get [order\u002Fsl2\u002Fgamma0\u002Fsubgroup] from db\", or wants to reconstruct a Magma LMFDB wrapper object from the lmfdb schema rather than from DATA\u002F files.","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-lmfdb-object\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: database-to-lmfdb-object\ndescription: Restore an LMFDB wrapper object from PostgreSQL instead of a flat file. Use whenever the user says \"restore from database\", \"load from postgres\", \"get [order\u002Fsl2\u002Fgamma0\u002Fsubgroup] from db\", or wants to reconstruct a Magma LMFDB wrapper object from the lmfdb schema rather than from DATA\u002F files.\n---\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## New: uniform `LookUpLMFDB` \u002F `SearchLMFDB` (package-database)\n\n```magma\nZ := Integers(); Q := Rationals();\nAttachSpec(\"hecke.spec\");\nSetLMFDBRootFolder(\".\");\n\ndb := OpenDB(\"clifford_bianchi_local\");\n\n\u002F\u002F Lookup by label — returns typed LMFDB object:\nX := LookUpLMFDB(db, \"LMFDBCliffOrd\",           \"2.1.m4.1.2.1.1.2.1.1\");\nX := LookUpLMFDB(db, \"LMFDBGrpSL2Cliff\",        \"2.1.m4.1.2.1.1.2.1.1\");\nX := LookUpLMFDB(db, \"LMFDBGrpSL2CliffGamma0\",  \"2.1.m4.1.2.1.1.2.1.1.4w74vb\");\nX := LookUpLMFDB(db, \"LMFDBPSL2GrpCliffSub\",    \"2.1.m4.1.2.1.1.2.1.1.1\");\n\n\u002F\u002F Search with filter — returns sequence of typed objects:\nq := AssociativeArray(); q[\"order_label\"] := \"2.1.m4.1.2.1.1.2.1.1\";\nsubs := SearchLMFDB(db, \"LMFDBPSL2GrpCliffSub\", q);\n\n\u002F\u002F Fetch one field subset:\nX := LookUpLMFDB(db, \"LMFDBCliffOrd\", label : output_attr := [\"label\", \"timing\"]);\n```\n\nNo need to know column ordering, table names, or run a `psql` command. The `DB0` layer handles schema qualification and JSONL parsing internally.\n\nUse the legacy `psql` approach below only when debugging schema issues or when `package-database.mag` is not available on the current branch.\n\n---\n\n# database-to-lmfdb-object\n\n**Purpose:** Query `lmfdb.clifford_*` tables for a given label, emit a pipe-delimited string in\nthe correct `*_ATTRS` column order, then pass that string to `\u002Fstring-to-lmfdb-object`.\n\n**Dependency:** Requires the lmfdb schema tables to be populated (run `\u002Ftextfile-to-database` first).\nColumn ordering in the SELECT must exactly match the alphabetical `*_ATTRS` order from\n`package-LMFDB.mag`, with `order_label` mapped back to `order`.\n\n## Step 1 — Query the lmfdb table\n\nChoose the query for the object type. All SELECTs return columns in `*_ATTRS` alphabetical order.\n\n### Orders (`LMFDBCliffOrd_ATTRS`)\n\n```sql\nSELECT\n    basis, clifford_algebra, dimension, discriminant,\n    is_maximal, is_norm_euclidean, is_star_invariant, label, timing\nFROM lmfdb.clifford_orders\nWHERE label = '\u003Corder_label>';\n```\n\n### SL₂(O) groups (`LMFDBGrpSL2Cliff_ATTRS`)\n\n```sql\nSELECT\n    label, matrix_generators, matrix_to_fpgroup,\n    order_label AS \"order\", relations, timing\nFROM lmfdb.clifford_sl2\nWHERE label = '\u003Csl2_label>';\n```\n\n### Gamma0 subgroups (`LMFDBGrpSL2CliffGamma0_ATTRS`)\n\n```sql\nSELECT\n    abelianization, defining_element, defining_element_label,\n    fp_coset_representatives, fp_generators, index, label, level_norm,\n    matrix_coset_representatives, matrix_generators,\n    order_label AS \"order\", rank, relations, timing\nFROM lmfdb.clifford_gamma0\nWHERE label = '\u003Cgamma0_label>';\n```\n\n### Low-index subgroups (`LMFDBPSL2GrpCliffSub_ATTRS`)\n\n```sql\nSELECT\n    abelian_rank, coset_table, cusp_representatives, generators_fp, generators_matrix,\n    homological_rank, index, known_conjugate_intersection, known_gamma0_level,\n    known_level_pdet, label, low_index_number, manin_rank, num_cusps,\n    order_label AS \"order\", prelabel, provisional_ordinals, relations,\n    right_transversal_fp, right_transversal_matrix, timing, torsion\nFROM lmfdb.clifford_subgroups\nWHERE label = '\u003Csubgroup_label>';\n```\n\n## Step 2 — Emit as a pipe-delimited string\n\nUse `psql` with `-t` (tuples only) and `-A` (unaligned) to get raw pipe-delimited output:\n\n```bash\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\"\n```\n\nOr via Python:\n```python\nimport db_config, json\n\ndef db_to_pipe_string(label, obj_type):\n    conn = db_config.get_connection()\n    queries = {\n        \"order\": (\"lmfdb.clifford_orders\",\n                  \"basis,clifford_algebra,dimension,discriminant,\"\n                  \"is_maximal,is_norm_euclidean,is_star_invariant,label,timing\"),\n        \"sl2\":   (\"lmfdb.clifford_sl2\",\n                  \"label,matrix_generators,matrix_to_fpgroup,\"\n                  \"order_label AS \\\"order\\\",relations,timing\"),\n        # ... (gamma0, subgroup analogously)\n    }\n    table, cols = queries[obj_type]\n    with conn.cursor() as cur:\n        cur.execute(f\"SELECT {cols} FROM {table} WHERE label = %s\", (label,))\n        row = cur.fetchone()\n    conn.close()\n    return \"|\".join(\"\\\\N\" if v is None else str(v) for v in row)\n```\n\n## Step 3 — Feed to `\u002Fstring-to-lmfdb-object`\n\nPass the resulting pipe-delimited string to the `\u002Fstring-to-lmfdb-object` skill, specifying the object type.\n\n## Column-order mapping note\n\nThe lmfdb schema uses `order_label` (not `order`) to avoid the SQL reserved word. When emitting\nthe pipe-delimited string, alias it back to `order` in the SELECT, or document the mapping clearly\nbefore passing to `string-to-lmfdb-object`.\n\n## Blocking condition\n\nThis skill requires that the `*_ATTRS` ↔ lmfdb column mapping round-trips correctly:\nwrite to DATA\u002F → load into staging → promote to lmfdb → query back → reconstruct Magma object →\nverify invariants (label, index, abelianization) match the original.\n\nDo not rely on this skill until that round-trip is verified on at least one order and one subgroup.\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## New: uniform `LookUpLMFDB` \u002F `SearchLMFDB` (package-database)\n\n```magma\nZ := Integers(); Q := Rationals();\nAttachSpec(\"hecke.spec\");\nSetLMFDBRootFolder(\".\");\n\ndb := OpenDB(\"clifford_bianchi_local\");\n\n\u002F\u002F Lookup by label — returns typed LMFDB object:\nX := LookUpLMFDB(db, \"LMFDBCliffOrd\",           \"2.1.m4.1.2.1.1.2.1.1\");\nX := LookUpLMFDB(db, \"LMFDBGrpSL2Cliff\",        \"2.1.m4.1.2.1.1.2.1.1\");\nX := LookUpLMFDB(db, \"LMFDBGrpSL2CliffGamma0\",  \"2.1.m4.1.2.1.1.2.1.1.4w74vb\");\nX := LookUpLMFDB(db, \"LMFDBPSL2GrpCliffSub\",    \"2.1.m4.1.2.1.1.2.1.1.1\");\n\n\u002F\u002F Search with filter — returns sequence of typed objects:\nq := AssociativeArray(); q[\"order_label\"] := \"2.1.m4.1.2.1.1.2.1.1\";\nsubs := SearchLMFDB(db, \"LMFDBPSL2GrpCliffSub\", q);\n\n\u002F\u002F Fetch one field subset:\nX := LookUpLMFDB(db, \"LMFDBCliffOrd\", label : output_attr := [\"label\", \"timing\"]);\n```\n\nNo need to know column ordering, table names, or run a `psql` command. The `DB0` layer handles schema qualification and JSONL parsing internally.\n\nUse the legacy `psql` approach below only when debugging schema issues or when `package-database.mag` is not available on the current branch.\n\n---\n\n# database-to-lmfdb-object\n\n**Purpose:** Query `lmfdb.clifford_*` tables for a given label, emit a pipe-delimited string in\nthe correct `*_ATTRS` column order, then pass that string to `\u002Fstring-to-lmfdb-object`.\n\n**Dependency:** Requires the lmfdb schema tables to be populated (run `\u002Ftextfile-to-database` first).\nColumn ordering in the SELECT must exactly match the alphabetical `*_ATTRS` order from\n`package-LMFDB.mag`, with `order_label` mapped back to `order`.\n\n## Step 1 — Query the lmfdb table\n\nChoose the query for the object type. All SELECTs return columns in `*_ATTRS` alphabetical order.\n\n### Orders (`LMFDBCliffOrd_ATTRS`)\n\n```sql\nSELECT\n    basis, clifford_algebra, dimension, discriminant,\n    is_maximal, is_norm_euclidean, is_star_invariant, label, timing\nFROM lmfdb.clifford_orders\nWHERE label = '\u003Corder_label>';\n```\n\n### SL₂(O) groups (`LMFDBGrpSL2Cliff_ATTRS`)\n\n```sql\nSELECT\n    label, matrix_generators, matrix_to_fpgroup,\n    order_label AS \"order\", relations, timing\nFROM lmfdb.clifford_sl2\nWHERE label = '\u003Csl2_label>';\n```\n\n### Gamma0 subgroups (`LMFDBGrpSL2CliffGamma0_ATTRS`)\n\n```sql\nSELECT\n    abelianization, defining_element, defining_element_label,\n    fp_coset_representatives, fp_generators, index, label, level_norm,\n    matrix_coset_representatives, matrix_generators,\n    order_label AS \"order\", rank, relations, timing\nFROM lmfdb.clifford_gamma0\nWHERE label = '\u003Cgamma0_label>';\n```\n\n### Low-index subgroups (`LMFDBPSL2GrpCliffSub_ATTRS`)\n\n```sql\nSELECT\n    abelian_rank, coset_table, cusp_representatives, generators_fp, generators_matrix,\n    homological_rank, index, known_conjugate_intersection, known_gamma0_level,\n    known_level_pdet, label, low_index_number, manin_rank, num_cusps,\n    order_label AS \"order\", prelabel, provisional_ordinals, relations,\n    right_transversal_fp, right_transversal_matrix, timing, torsion\nFROM lmfdb.clifford_subgroups\nWHERE label = '\u003Csubgroup_label>';\n```\n\n## Step 2 — Emit as a pipe-delimited string\n\nUse `psql` with `-t` (tuples only) and `-A` (unaligned) to get raw pipe-delimited output:\n\n```bash\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\"\n```\n\nOr via Python:\n```python\nimport db_config, json\n\ndef db_to_pipe_string(label, obj_type):\n    conn = db_config.get_connection()\n    queries = {\n        \"order\": (\"lmfdb.clifford_orders\",\n                  \"basis,clifford_algebra,dimension,discriminant,\"\n                  \"is_maximal,is_norm_euclidean,is_star_invariant,label,timing\"),\n        \"sl2\":   (\"lmfdb.clifford_sl2\",\n                  \"label,matrix_generators,matrix_to_fpgroup,\"\n                  \"order_label AS \\\"order\\\",relations,timing\"),\n        # ... (gamma0, subgroup analogously)\n    }\n    table, cols = queries[obj_type]\n    with conn.cursor() as cur:\n        cur.execute(f\"SELECT {cols} FROM {table} WHERE label = %s\", (label,))\n        row = cur.fetchone()\n    conn.close()\n    return \"|\".join(\"\\\\N\" if v is None else str(v) for v in row)\n```\n\n## Step 3 — Feed to `\u002Fstring-to-lmfdb-object`\n\nPass the resulting pipe-delimited string to the `\u002Fstring-to-lmfdb-object` skill, specifying the object type.\n\n## Column-order mapping note\n\nThe lmfdb schema uses `order_label` (not `order`) to avoid the SQL reserved word. When emitting\nthe pipe-delimited string, alias it back to `order` in the SELECT, or document the mapping clearly\nbefore passing to `string-to-lmfdb-object`.\n\n## Blocking condition\n\nThis skill requires that the `*_ATTRS` ↔ lmfdb column mapping round-trips correctly:\nwrite to DATA\u002F → load into staging → promote to lmfdb → query back → reconstruct Magma object →\nverify invariants (label, index, abelianization) match the original.\n\nDo not rely on this skill until that round-trip is verified on at least one order and one subgroup.\n",{"name":5,"description":7},"main","8d13efb5e66306aeae6e3b948bc463e7e2db1b65","skills\u002Fdatabase-to-lmfdb-object","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-lmfdb-object",{"tool":38,"command":39},"bunx","bunx skills add tdupu\u002Fagent-skills-public --skill database-to-lmfdb-object",{"tool":41,"command":42},"pnpm","pnpm dlx skills add tdupu\u002Fagent-skills-public --skill database-to-lmfdb-object","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fskills\u002Fdatabase-to-lmfdb-object\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",[],[]]