[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F8W0Y0WFPP6E6F4MHNQNSN":3,"skill-same:01M7F8W0Y0WFPP6E6F4MHNQNSN":45},{"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":6,"updatedAt":30,"install":31,"resources":44},"01M7F8W0Y0WFPP6E6F4MHNQNSN","kubectl-logs-query",null,"Read-only kubectl dig into a workload Loki does not capture: pod logs, --previous crash logs, events, describe. Use when a Loki query comes back empty, or metrics point at a pod whose own stdout is the missing evidence.","szymonrychu\u002Fworkbench","szymonrychu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2943524?v=4","01M7F8VBGRDFJ2PSH14RM80E4G","Szymon Richert","01M7F8VBHCQTC2RMKXJ93RHMB3",0,"MIT","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench-observability\u002Fskills\u002Fkubectl-logs-query\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: kubectl-logs-query\ndescription: \"Read-only kubectl dig into a workload Loki does not capture: pod logs, --previous crash logs, events, describe. Use when a Loki query comes back empty, or metrics point at a pod whose own stdout is the missing evidence.\"\n---\n\n# kubectl-logs-query\n\nSome workloads run in the cluster but never reach Loki (no promtail\nscrape, stdout-only apps writing to files, sidecar-less pods). When the\ngrafana funnel stalls at \"logs empty for a namespace that clearly exists\",\ngo to the source: `kubectl` against the live cluster. This is a read-only\ncompanion to `grafana-debugging-start`, not a replacement - metrics and\nLoki still lead; kubectl fills the log gap.\n\nUse the current kubectl context (`kubectl config current-context`) and\nnever switch it. Requires `kubectl` and `stern` on PATH (mise-pinned in\nthe project when used).\n\n## Hard rule: read-only\n\nOnly ever run observing verbs:\n\n- `kubectl get`, `logs`, `describe`, `events`, `top`\n- `kubectl exec \u003Cpod> -- \u003Cread-only cmd>` (e.g. `cat`, `ls`, `tail` of an\n  in-container log file) - reads only, never a command that writes,\n  deletes, restarts, or changes state.\n- `stern` for multi-pod \u002F multi-container log tailing.\n\nNever `apply`, `create`, `delete`, `edit`, `patch`, `scale`, `rollout\nrestart`, `cordon`, `drain`, `label`, `annotate`, or any `exec` that\nmutates. If a fix needs a write, hand it back to the user - this skill\nonly diagnoses.\n\n## Procedure\n\n1. **Locate the pod.** Metrics or the grafana investigation already named\n   the namespace and workload; resolve the exact pod:\n   ```\n   kubectl -n \u003Cns> get pods -o wide            # note node, restarts, age\n   kubectl -n \u003Cns> get pods -l app=\u003Capp> -o name\n   ```\n   `RESTARTS` and `AGE` alone often answer \"did it crash in the window?\".\n\n2. **Time-bound to the incident.** Never dump a whole log. Scope with\n   `--since` \u002F `--since-time` to the bad window and add timestamps:\n   ```\n   kubectl -n \u003Cns> logs \u003Cpod> --since=20m --timestamps\n   kubectl -n \u003Cns> logs \u003Cpod> --since-time=2026-07-11T19:00:00Z --timestamps\n   ```\n   Pod clocks may print local time; convert to the same UTC window the\n   grafana report uses before correlating.\n\n3. **Crash \u002F restart reason** comes from the *previous* container plus\n   events, not the running one:\n   ```\n   kubectl -n \u003Cns> logs \u003Cpod> --previous --timestamps      # pre-restart stdout\n   kubectl -n \u003Cns> describe pod \u003Cpod>                       # last state, exit code, OOMKilled\n   kubectl -n \u003Cns> get events --sort-by=.lastTimestamp | grep \u003Cpod-or-app>\n   ```\n\n4. **Multi-container \u002F multi-pod.** Pick the container with `-c`; sweep a\n   whole app with stern:\n   ```\n   kubectl -n \u003Cns> logs \u003Cpod> -c \u003Ccontainer> --since=20m\n   stern -n \u003Cns> \u003Capp> --since 20m --no-follow\n   ```\n\n5. **App error detail not on stdout.** Many apps log to files inside the\n   container (application logs, web server error logs). Read them\n   in place - still read-only:\n   ```\n   kubectl -n \u003Cns> exec \u003Cpod> -- ls -t \u002Fvar\u002Flog\u002Fapp\u002F | head\n   kubectl -n \u003Cns> exec \u003Cpod> -- cat \u002Fvar\u002Flog\u002Fapp\u002F\u003Cnewest>.log\n   ```\n\n6. **Narrow-first, then grep.** Filter to the signal; save anything large\n   to `\u003Cworkbench root>\u002F.scratchpad` instead of flooding context:\n   ```\n   kubectl -n \u003Cns> logs \u003Cpod> --since=30m | grep -iE 'error|fail|exit code|panic'\n   ```\n\n## Correlate back\n\nA kubectl finding is evidence, same bar as a grafana one: quote the exact\nline (error string, exit code, `OOMKilled`, event reason) and the UTC time,\nand line it up against the metric\u002FLoki window already in the investigation\nreport. Add it as a claim there rather than concluding from the log alone.\n","# kubectl-logs-query\n\nSome workloads run in the cluster but never reach Loki (no promtail\nscrape, stdout-only apps writing to files, sidecar-less pods). When the\ngrafana funnel stalls at \"logs empty for a namespace that clearly exists\",\ngo to the source: `kubectl` against the live cluster. This is a read-only\ncompanion to `grafana-debugging-start`, not a replacement - metrics and\nLoki still lead; kubectl fills the log gap.\n\nUse the current kubectl context (`kubectl config current-context`) and\nnever switch it. Requires `kubectl` and `stern` on PATH (mise-pinned in\nthe project when used).\n\n## Hard rule: read-only\n\nOnly ever run observing verbs:\n\n- `kubectl get`, `logs`, `describe`, `events`, `top`\n- `kubectl exec \u003Cpod> -- \u003Cread-only cmd>` (e.g. `cat`, `ls`, `tail` of an\n  in-container log file) - reads only, never a command that writes,\n  deletes, restarts, or changes state.\n- `stern` for multi-pod \u002F multi-container log tailing.\n\nNever `apply`, `create`, `delete`, `edit`, `patch`, `scale`, `rollout\nrestart`, `cordon`, `drain`, `label`, `annotate`, or any `exec` that\nmutates. If a fix needs a write, hand it back to the user - this skill\nonly diagnoses.\n\n## Procedure\n\n1. **Locate the pod.** Metrics or the grafana investigation already named\n   the namespace and workload; resolve the exact pod:\n   ```\n   kubectl -n \u003Cns> get pods -o wide            # note node, restarts, age\n   kubectl -n \u003Cns> get pods -l app=\u003Capp> -o name\n   ```\n   `RESTARTS` and `AGE` alone often answer \"did it crash in the window?\".\n\n2. **Time-bound to the incident.** Never dump a whole log. Scope with\n   `--since` \u002F `--since-time` to the bad window and add timestamps:\n   ```\n   kubectl -n \u003Cns> logs \u003Cpod> --since=20m --timestamps\n   kubectl -n \u003Cns> logs \u003Cpod> --since-time=2026-07-11T19:00:00Z --timestamps\n   ```\n   Pod clocks may print local time; convert to the same UTC window the\n   grafana report uses before correlating.\n\n3. **Crash \u002F restart reason** comes from the *previous* container plus\n   events, not the running one:\n   ```\n   kubectl -n \u003Cns> logs \u003Cpod> --previous --timestamps      # pre-restart stdout\n   kubectl -n \u003Cns> describe pod \u003Cpod>                       # last state, exit code, OOMKilled\n   kubectl -n \u003Cns> get events --sort-by=.lastTimestamp | grep \u003Cpod-or-app>\n   ```\n\n4. **Multi-container \u002F multi-pod.** Pick the container with `-c`; sweep a\n   whole app with stern:\n   ```\n   kubectl -n \u003Cns> logs \u003Cpod> -c \u003Ccontainer> --since=20m\n   stern -n \u003Cns> \u003Capp> --since 20m --no-follow\n   ```\n\n5. **App error detail not on stdout.** Many apps log to files inside the\n   container (application logs, web server error logs). Read them\n   in place - still read-only:\n   ```\n   kubectl -n \u003Cns> exec \u003Cpod> -- ls -t \u002Fvar\u002Flog\u002Fapp\u002F | head\n   kubectl -n \u003Cns> exec \u003Cpod> -- cat \u002Fvar\u002Flog\u002Fapp\u002F\u003Cnewest>.log\n   ```\n\n6. **Narrow-first, then grep.** Filter to the signal; save anything large\n   to `\u003Cworkbench root>\u002F.scratchpad` instead of flooding context:\n   ```\n   kubectl -n \u003Cns> logs \u003Cpod> --since=30m | grep -iE 'error|fail|exit code|panic'\n   ```\n\n## Correlate back\n\nA kubectl finding is evidence, same bar as a grafana one: quote the exact\nline (error string, exit code, `OOMKilled`, event reason) and the UTC time,\nand line it up against the metric\u002FLoki window already in the investigation\nreport. Add it as a claim there rather than concluding from the log alone.\n",{"name":5,"description":7},"main","ce8273d3492a5008dd408c4823db370b23e18863","plugins\u002Fworkbench-observability\u002Fskills\u002Fkubectl-logs-query","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench","https:\u002F\u002Fgithub.com\u002Fszymonrychu","www.szymonrichert.pl","2026-10-26 04:36:12",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add szymonrychu\u002Fworkbench --skill kubectl-logs-query",{"tool":37,"command":38},"bunx","bunx skills add szymonrychu\u002Fworkbench --skill kubectl-logs-query",{"tool":40,"command":41},"pnpm","pnpm dlx skills add szymonrychu\u002Fworkbench --skill kubectl-logs-query","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench-observability\u002Fskills\u002Fkubectl-logs-query\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7F949PAG534XSY6BXH4GKY0","claudy","d claudy","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fscripts\u002Ftests\u002Fharness\u002Fgolden\u002Fskills\u002Fclaudy\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7F947QH8VQ5WGVMFWFS57M0","gamma","Literal line one.\nLiteral line two.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fscripts\u002Ftests\u002Fharness\u002Ffixtures\u002Ftree\u002Fplugins\u002Fextra\u002Fskills\u002Fgamma\u002FSKILL.md",[],[],{"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},"01M7F944VTWR1AAACZGTNWYJYP","beta","Quoted: description with a colon.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fscripts\u002Ftests\u002Fharness\u002Ffixtures\u002Ftree\u002Fplugins\u002Fcore\u002Fskills\u002Fbeta\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},"01M7F941QWM4KQTX9KA6JQKF2G","alpha","Folded description that spans two lines and ends here.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fscripts\u002Ftests\u002Fharness\u002Ffixtures\u002Ftree\u002Fplugins\u002Fcore\u002Fskills\u002Falpha\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},"01M7F93XXR4JY2S2KXD70JY4GM","worktree-merge","Rebases one subagent's worktree onto the base branch, optionally verifies the rebased tree, fast-forwards it into the worktree that has the base checked out (an epic integration tree or the main checkout), verifies every commit landed, and only then removes the worktree and its branch. Keeps the worktree intact on any conflict, dirty tree, or failed check. Use after a subagent returns work created with worktree-create.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fworktree-merge\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},"01M7F93TBQKKF3KM4VDVQ8PVHR","worktree-create","Creates one isolated git worktree for one subagent, at \u003Cworkbench>\u002F.claude\u002Fworktrees\u002F\u003Cname>, branched from main with the newest origin\u002Fmain and local main merged in. Refuses a name already in use so two agents can never share a tree. Use once per implementation or review subagent before dispatching it; pair with worktree-merge to land the work and clean up.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fworktree-create\u002FSKILL.md",[],[]]