Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
kubernetes-database-analyst【部署与运维】Analyzes data from databases in Kubernetes clusters by setting up port forwarding, executing SQL queries, and generating CSV reports.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
filesystem-read_file to read the task file (e.g., task.md) to understand the analytical questions and required output format.k8s-kubectl_get to list all resources in the target namespace (e.g., data). Identify the database Service (e.g., mysql-f1) and its corresponding Pod.k8s-port_forward to create a persistent port forward from a local port (e.g., 30124) to the database service's target port (e.g., 3306). Note the portForwardId to keep it alive.filesystem-list_directory to identify any template or input files in the workspace.local-python-execute to run a Python script that:
127.0.0.1, port=[LOCAL_PORT]).drivers, constructors, results, races, standings tables).local-python-execute blocks. Test them iteratively to ensure correctness.
races, standings, and dimension tables (drivers, constructors). Use window functions or subqueries with GROUP BY and MAX().local-python-execute with the csv module to write the final query results to CSV files with the exact names specified in the task (e.g., results_1.csv, results_2.csv). Ensure headers match the template format.local-python-execute with os.remove() to delete any provided template files from the workspace as instructed.filesystem-read_multiple_files to confirm the final CSV files exist and contain the expected data.local-claim_done to signal task completion.