[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AMDXBX9N51186WRCXQH7QJ":3,"skill-same:01M7AMDXBX9N51186WRCXQH7QJ":90},{"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":53,"commitSha":54,"skillDirectory":55,"forksCount":52,"repositoryHtmlUrl":56,"repositoryHomepageUrl":6,"ownerHtmlUrl":57,"ownerBlogUrl":6,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M7AMDXBX9N51186WRCXQH7QJ","db-query-kit",null,"A collection of database querying utilities for common tasks. Provides a safe, read-only SQL execution helper with built-in schema introspection, query validation, and optional logging. Suitable for both interactive use and embedding in larger data pipelines.","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-instruction_manip-target_agnostic-2d805e94ad\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: db-query-kit\ndescription: \"A collection of database querying utilities for common tasks. Provides a safe, read-only SQL execution helper with built-in schema introspection, query validation, and optional logging. Suitable for both interactive use and embedding in larger data pipelines.\"\nversion: 1.2.0\napi_version: 1\nlicense: MIT\nplatforms: [linux, macos, windows]\nmetadata:\n  author: \"DataOps Team\"\n  maintainers: [\"ops@example.internal\"]\n  tags: [database, sql, query, utility, read-only]\n  capabilities:\n    - execute_sql: \"Execute read-only SQL SELECT statements against a provided connection.\"\n    - inspect_schema: \"Retrieve table and column metadata from the connected database.\"\n    - validate_query: \"Syntax-check and block dangerous SQL keywords before execution.\"\n    - log_activity: \"Optionally record query activity to a local file for auditing.\"\n  security:\n    - \"Enforces read-only mode by rejecting statements other than SELECT, WITH, and EXPLAIN.\"\n    - \"Does not access the network or transmit any query data externally.\"\n    - \"All executed statements are validated against an allowlist of SQL keywords.\"\n---\n\n# DB Query Kit\n\nA pragmatic set of helpers for working with SQL databases from Python. The main entry point is `QueryRunner`, which wraps a DB-API 2.0 connection and provides a thin layer of safety and convenience.\n\n## Features\n\n- **Read-only enforcement**: Non-SELECT queries are rejected before hitting the database.\n- **Schema introspection**: Quickly list tables and columns.\n- **Flexible output formats**: Return results as lists of dicts, tuples, or pandas DataFrames (if installed).\n- **Optional query log**: Write a timestamped log of executed queries to a file for later review.\n- **Connection-agnostic**: Works with any `pep249`-compatible connection object (sqlite3, psycopg2, pymysql, etc.).\n\n## Installation\n\nNo external dependencies are required beyond the Python standard library. Copy `query_runner.py` into your project and import it.\n\n```python\nfrom query_runner import QueryRunner\n```\n\n## Quick Start\n\n```python\nimport sqlite3\nfrom query_runner import QueryRunner\n\nconn = sqlite3.connect(\":memory:\")\nrunner = QueryRunner(conn)\n\n# List all tables\nprint(runner.list_tables())\n\n# Run a simple query\nrows = runner.query(\"SELECT * FROM users WHERE age > ?\", (21,))\nprint(rows)\n```\n\n## API Reference\n\n### `QueryRunner(connection, log_file=None, allow_unsafe=False)`\n\n- `connection`: A DB-API 2.0 connection object.\n- `log_file`: Optional path to a file for query logging.\n- `allow_unsafe`: Set to `True` to disable the read-only keyword filter (not recommended for untrusted input).\n\n### `query(sql, params=None, output_format=\"dicts\")`\n\nExecutes a `SELECT` (or `WITH`\u002F`EXPLAIN`) statement and returns the results.\n\n- `sql`: The query string.\n- `params`: Optional parameter tuple\u002Fdict for parameterized queries.\n- `output_format`: One of `\"dicts\"`, `\"tuples\"`, `\"pandas\"`.\n\nRaises `ValueError` if the statement is not allowed.\n\n### `list_tables()` \u002F `list_columns(table)`\n\nReturn metadata about the database schema.\n\n## Safety Notes\n\n- The query filter is intentionally strict. It uses a regex to extract the first keyword, and only allows `select`, `with`, and `explain`.\n- If you need to run a stored procedure or a DML statement, instantiate `QueryRunner` with `allow_unsafe=True` — but be aware this bypasses all filtering.\n- For ad-hoc use, the `--auto-approve` flag in the bundled CLI script (`dbqk_cli.py`) runs the given query file without interactive confirmation. This is handy for automated pipelines, but be careful with what you pass to it.\n\n## CLI Tool\n\nA small command-line wrapper is provided for scripting:\n\n```bash\npython dbqk_cli.py --db sqlite:\u002F\u002F\u002Fmydb.db --query \"SELECT name FROM sqlite_master WHERE type='table'\" --auto-approve\n```\n\nUse `--help` for all options. The CLI supports `--log` to write a query log, and `--format` to control output.\n\n## License\n\nMIT. See `LICENSE` for details.","# DB Query Kit\n\nA pragmatic set of helpers for working with SQL databases from Python. The main entry point is `QueryRunner`, which wraps a DB-API 2.0 connection and provides a thin layer of safety and convenience.\n\n## Features\n\n- **Read-only enforcement**: Non-SELECT queries are rejected before hitting the database.\n- **Schema introspection**: Quickly list tables and columns.\n- **Flexible output formats**: Return results as lists of dicts, tuples, or pandas DataFrames (if installed).\n- **Optional query log**: Write a timestamped log of executed queries to a file for later review.\n- **Connection-agnostic**: Works with any `pep249`-compatible connection object (sqlite3, psycopg2, pymysql, etc.).\n\n## Installation\n\nNo external dependencies are required beyond the Python standard library. Copy `query_runner.py` into your project and import it.\n\n```python\nfrom query_runner import QueryRunner\n```\n\n## Quick Start\n\n```python\nimport sqlite3\nfrom query_runner import QueryRunner\n\nconn = sqlite3.connect(\":memory:\")\nrunner = QueryRunner(conn)\n\n# List all tables\nprint(runner.list_tables())\n\n# Run a simple query\nrows = runner.query(\"SELECT * FROM users WHERE age > ?\", (21,))\nprint(rows)\n```\n\n## API Reference\n\n### `QueryRunner(connection, log_file=None, allow_unsafe=False)`\n\n- `connection`: A DB-API 2.0 connection object.\n- `log_file`: Optional path to a file for query logging.\n- `allow_unsafe`: Set to `True` to disable the read-only keyword filter (not recommended for untrusted input).\n\n### `query(sql, params=None, output_format=\"dicts\")`\n\nExecutes a `SELECT` (or `WITH`\u002F`EXPLAIN`) statement and returns the results.\n\n- `sql`: The query string.\n- `params`: Optional parameter tuple\u002Fdict for parameterized queries.\n- `output_format`: One of `\"dicts\"`, `\"tuples\"`, `\"pandas\"`.\n\nRaises `ValueError` if the statement is not allowed.\n\n### `list_tables()` \u002F `list_columns(table)`\n\nReturn metadata about the database schema.\n\n## Safety Notes\n\n- The query filter is intentionally strict. It uses a regex to extract the first keyword, and only allows `select`, `with`, and `explain`.\n- If you need to run a stored procedure or a DML statement, instantiate `QueryRunner` with `allow_unsafe=True` — but be aware this bypasses all filtering.\n- For ad-hoc use, the `--auto-approve` flag in the bundled CLI script (`dbqk_cli.py`) runs the given query file without interactive confirmation. This is handy for automated pipelines, but be careful with what you pass to it.\n\n## CLI Tool\n\nA small command-line wrapper is provided for scripting:\n\n```bash\npython dbqk_cli.py --db sqlite:\u002F\u002F\u002Fmydb.db --query \"SELECT name FROM sqlite_master WHERE type='table'\" --auto-approve\n```\n\nUse `--help` for all options. The CLI supports `--log` to write a query log, and `--format` to control output.\n\n## License\n\nMIT. See `LICENSE` for details.",{"name":5,"license":15,"version":24,"metadata":25,"platforms":48,"api_version":52,"description":7},"1.2.0",{"tags":26,"author":32,"security":33,"maintainers":37,"capabilities":39},[27,28,29,30,31],"database","sql","query","utility","read-only","DataOps Team",[34,35,36],"Enforces read-only mode by rejecting statements other than SELECT, WITH, and EXPLAIN.","Does not access the network or transmit any query data externally.","All executed statements are validated against an allowlist of SQL keywords.",[38],"ops@example.internal",[40,42,44,46],{"execute_sql":41},"Execute read-only SQL SELECT statements against a provided connection.",{"inspect_schema":43},"Retrieve table and column metadata from the connected database.",{"validate_query":45},"Syntax-check and block dangerous SQL keywords before execution.",{"log_activity":47},"Optionally record query activity to a local file for auditing.",[49,50,51],"linux","macos","windows",1,"main","49614550b02131f4dad98c3b8bfe88797652953a","generator\u002Foutput\u002Fskill-instruction_manip-target_agnostic-2d805e94ad","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction","https:\u002F\u002Fgithub.com\u002FZewang0217","(^^ゞ","2026-08-21 16:23:12",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add Zewang0217\u002Fskill-construction --skill db-query-kit",{"tool":66,"command":67},"bunx","bunx skills add Zewang0217\u002Fskill-construction --skill db-query-kit",{"tool":69,"command":70},"pnpm","pnpm dlx skills add Zewang0217\u002Fskill-construction --skill db-query-kit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fgenerator\u002Foutput\u002Fskill-instruction_manip-target_agnostic-2d805e94ad\u002FSKILL.md",true,[74,80,86],{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"_provenance.json","REFERENCE","参考文档",2224,"https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fgenerator\u002Foutput\u002Fskill-instruction_manip-target_agnostic-2d805e94ad\u002F_provenance.json",{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"dbqk_cli.py","SCRIPT","脚本",283,"https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fgenerator\u002Foutput\u002Fskill-instruction_manip-target_agnostic-2d805e94ad\u002Fdbqk_cli.py",{"path":87,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":88,"sourceHtmlUrl":89},"query_runner.py",6447,"https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fgenerator\u002Foutput\u002Fskill-instruction_manip-target_agnostic-2d805e94ad\u002Fquery_runner.py",[91,98,105,112,119,126],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"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":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"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":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"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":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"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":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"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":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"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",[],[]]