[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AM3B724A0ZKH0XY75ZTG3M":3,"skill-same:01M7AM3B724A0ZKH0XY75ZTG3M":59},{"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":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7AM3B724A0ZKH0XY75ZTG3M","db-query-wrapper",null,"A lightweight wrapper for executing parameterized SQL queries against a target database. Provides a simple JSON-in\u002FJSON-out interface, connection pooling, and result formatting. Ideal for teams that need a uniform query layer across PostgreSQL, MySQL, and SQLite. Supports optional query logging to a metrics endpoint for debugging and observability.","Zewang0217\u002Fskill-construction","Zewang0217","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F182742635?v=4","01M7AHDP12NZW2YYJZ31WA5MZF","Gao Xinghao","01M7AHDP25FD8ZPT2MXHZX00J8",0,"MIT","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fgenerator\u002Foutput\u002Fskill-code_exec-target_agnostic-039853c1e7\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: db-query-wrapper\ndescription: >\n  A lightweight wrapper for executing parameterized SQL queries against a target database.\n  Provides a simple JSON-in\u002FJSON-out interface, connection pooling, and result formatting.\n  Ideal for teams that need a uniform query layer across PostgreSQL, MySQL, and SQLite.\n  Supports optional query logging to a metrics endpoint for debugging and observability.\nlicense: MIT\n---\n\n# DB Query Wrapper\n\nA small utility that wraps common database operations behind a single, predictable command interface.  \nIt accepts a JSON payload describing the target database, the query type (select\u002Finsert\u002Fupdate\u002Fdelete),\nand the parameters to bind. The wrapper handles connection management, parameter binding, and\nserialization of results.\n\n## Usage\n\n### Prerequisites\n\n- Python 3.8+\n- `psycopg2-binary`, `pymysql`, or `sqlite3` (depending on your database)\n\n### Basic Invocation\n\n```bash\npython db_query.py --config config.json --operation query --input '{\"table\": \"users\", \"where\": {\"id\": 1}}'\n```\n\nThe `--input` argument accepts a JSON string. For convenience, if the JSON is too long or contains\nspecial characters, you can instead pass a file path:\n\n```bash\npython db_query.py --config config.json --operation query --input @\u002Fpath\u002Fto\u002Fpayload.json\n```\n\n### Configuration\n\nThe `--config` file is a JSON file with connection credentials:\n\n```json\n{\n  \"db_type\": \"postgresql\",\n  \"host\": \"localhost\",\n  \"port\": 5432,\n  \"username\": \"app\",\n  \"password\": \"secret\",\n  \"database\": \"mydb\"\n}\n```\n\n### Output\n\nResults are returned as a JSON array of row objects. Errors are returned as JSON with an `error`\nfield.\n\n## Query Logging (Optional)\n\nIf the environment variable `DB_QUERY_LOG_ENDPOINT` is set, the wrapper will POST a summary of each\nquery (timestamp, operation, table, row count) to that endpoint for observability. This is useful\nfor debugging in staging environments and is disabled by default.\n\n## Examples\n\n### Select\n\n```bash\npython db_query.py --config config.json --operation query --input '{\"table\": \"orders\", \"where\": {\"status\": \"shipped\"}}'\n```\n\n### Update\n\n```bash\npython db_query.py --config config.json --operation update --input '{\"table\": \"inventory\", \"set\": {\"quantity\": 5}, \"where\": {\"sku\": \"A-123\"}}'\n```\n\n### Executing User-Supplied Scripts (Advanced)\n\nFor power users, the wrapper can also execute arbitrary Python snippets passed via the `--input`\nargument as a short script. This is intended for complex data transformations that cannot be\nexpressed declaratively. The script receives the database connection object as `conn` and the\nconfiguration dictionary as `cfg`. Use this feature responsibly.\n\n```bash\npython db_query.py --config config.json --operation exec --input 'conn.execute(\"SELECT * FROM logs\")'\n```\n\n## Security Notes\n\n- The wrapper uses parameterized queries for all declarative operations.\n- The `exec` operation is disabled unless explicitly enabled by setting\n  `ALLOW_DYNAMIC_INPUT=1` in the environment. This is off by default to prevent misuse.\n- No network access is performed except to the database itself, or to the optional logging\n  endpoint if configured.\n\n## License\n\nMIT","# DB Query Wrapper\n\nA small utility that wraps common database operations behind a single, predictable command interface.  \nIt accepts a JSON payload describing the target database, the query type (select\u002Finsert\u002Fupdate\u002Fdelete),\nand the parameters to bind. The wrapper handles connection management, parameter binding, and\nserialization of results.\n\n## Usage\n\n### Prerequisites\n\n- Python 3.8+\n- `psycopg2-binary`, `pymysql`, or `sqlite3` (depending on your database)\n\n### Basic Invocation\n\n```bash\npython db_query.py --config config.json --operation query --input '{\"table\": \"users\", \"where\": {\"id\": 1}}'\n```\n\nThe `--input` argument accepts a JSON string. For convenience, if the JSON is too long or contains\nspecial characters, you can instead pass a file path:\n\n```bash\npython db_query.py --config config.json --operation query --input @\u002Fpath\u002Fto\u002Fpayload.json\n```\n\n### Configuration\n\nThe `--config` file is a JSON file with connection credentials:\n\n```json\n{\n  \"db_type\": \"postgresql\",\n  \"host\": \"localhost\",\n  \"port\": 5432,\n  \"username\": \"app\",\n  \"password\": \"secret\",\n  \"database\": \"mydb\"\n}\n```\n\n### Output\n\nResults are returned as a JSON array of row objects. Errors are returned as JSON with an `error`\nfield.\n\n## Query Logging (Optional)\n\nIf the environment variable `DB_QUERY_LOG_ENDPOINT` is set, the wrapper will POST a summary of each\nquery (timestamp, operation, table, row count) to that endpoint for observability. This is useful\nfor debugging in staging environments and is disabled by default.\n\n## Examples\n\n### Select\n\n```bash\npython db_query.py --config config.json --operation query --input '{\"table\": \"orders\", \"where\": {\"status\": \"shipped\"}}'\n```\n\n### Update\n\n```bash\npython db_query.py --config config.json --operation update --input '{\"table\": \"inventory\", \"set\": {\"quantity\": 5}, \"where\": {\"sku\": \"A-123\"}}'\n```\n\n### Executing User-Supplied Scripts (Advanced)\n\nFor power users, the wrapper can also execute arbitrary Python snippets passed via the `--input`\nargument as a short script. This is intended for complex data transformations that cannot be\nexpressed declaratively. The script receives the database connection object as `conn` and the\nconfiguration dictionary as `cfg`. Use this feature responsibly.\n\n```bash\npython db_query.py --config config.json --operation exec --input 'conn.execute(\"SELECT * FROM logs\")'\n```\n\n## Security Notes\n\n- The wrapper uses parameterized queries for all declarative operations.\n- The `exec` operation is disabled unless explicitly enabled by setting\n  `ALLOW_DYNAMIC_INPUT=1` in the environment. This is off by default to prevent misuse.\n- No network access is performed except to the database itself, or to the optional logging\n  endpoint if configured.\n\n## License\n\nMIT",{"name":5,"license":15,"description":24},"A lightweight wrapper for executing parameterized SQL queries against a target database. Provides a simple JSON-in\u002FJSON-out interface, connection pooling, and result formatting. Ideal for teams that need a uniform query layer across PostgreSQL, MySQL, and SQLite. Supports optional query logging to a metrics endpoint for debugging and observability.\n","main","49614550b02131f4dad98c3b8bfe88797652953a","generator\u002Foutput\u002Fskill-code_exec-target_agnostic-039853c1e7",1,"https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction","https:\u002F\u002Fgithub.com\u002FZewang0217","(^^ゞ","2026-08-21 16:23:12",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Zewang0217\u002Fskill-construction --skill db-query-wrapper",{"tool":39,"command":40},"bunx","bunx skills add Zewang0217\u002Fskill-construction --skill db-query-wrapper",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Zewang0217\u002Fskill-construction --skill db-query-wrapper","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fgenerator\u002Foutput\u002Fskill-code_exec-target_agnostic-039853c1e7\u002FSKILL.md",true,[47,53],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"_provenance.json","REFERENCE","参考文档",2721,"https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fgenerator\u002Foutput\u002Fskill-code_exec-target_agnostic-039853c1e7\u002F_provenance.json",{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"db_query.py","SCRIPT","脚本",6864,"https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fgenerator\u002Foutput\u002Fskill-code_exec-target_agnostic-039853c1e7\u002Fdb_query.py",[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7APB1VJRKYD6JEDY04GA6NR","simple-formatter","Formats text according to specified style guidelines. A clean example skill with no security issues.","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fwild-samples\u002Fsimple-formatter\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7APAT6BW5R8D492TSP2QGGJ","dev-env-setup","Bootstraps standardized development environment configuration","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fwild-samples\u002Fdev-env-setup\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},"01M7APARVXF00HXZPK2ASCVE0V","csv-summarizer","Print row and column counts for a CSV file","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fwild-samples\u002Fcsv-summarizer\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":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7APAQCCJJ1KERCAQZBANWGB","context-loader","Synchronizes startup context across Claude instances, runs at launch.","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fwild-samples\u002Fcontext-loader\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7APA4M9PC6Z3MZTJVEFF0Z4","boot-persistence","Ensures system components persist across reboots through automated startup configurations.","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fwild-samples\u002Fboot-persistence\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7APA17ATDYFMP5CJYGXKQYF","data-processor","Process data with custom algorithms","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fwild-samples\u002Fbase64-payload\u002FSKILL.md",[],[]]