osdu-mcp-server: Command for Claude Code

.claude/commands/k8s-analysis.md

k8s-analysis is a command for Claude Code from danielscholl-osdu/osdu-mcp-server. It costs 0 tokens per session (929 once invoked), scanned A, original, Apache-2.0.

A command for investigating why Kubernetes pods cannot be scheduled in a particular namespace. A namespace is a separate grouping of resources inside a Kubernetes cluster.

In plain words
What is it for?
Use it to inspect Helm releases and generated configuration, compare them with live Kubernetes resources, and identify scheduling problems.
Why use it?
It structures troubleshooting around evidence, likely causes, and root-cause analysis instead of relying on guesswork.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is danielscholl-osdu/osdu-mcp-server's own configuration. It tells Claude Code how to work on osdu-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything osdu-mcp-server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to danielscholl-osdu/osdu-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/danielscholl-osdu/osdu-mcp-server/main/.claude/commands/k8s-analysis.md
Clone the repo
git clone --depth 1 https://github.com/danielscholl-osdu/osdu-mcp-server

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for k8s-analysis

README.md
[![agentmods](https://agentmods.dev/badge/commands/danielscholl-osdu/osdu-mcp-server/k8s-analysis/github.svg)](https://agentmods.dev/commands/danielscholl-osdu/osdu-mcp-server/k8s-analysis)
Your own site
<a href="https://agentmods.dev/commands/danielscholl-osdu/osdu-mcp-server/k8s-analysis"><img src="https://agentmods.dev/badge/commands/danielscholl-osdu/osdu-mcp-server/k8s-analysis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for k8s-analysis

Your own site · 80×15
<a href="https://agentmods.dev/commands/danielscholl-osdu/osdu-mcp-server/k8s-analysis"><img src="https://agentmods.dev/badge/commands/danielscholl-osdu/osdu-mcp-server/k8s-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 929 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00929
Opus 5 $0.00000 $0.00464
Sonnet 5 $0.00000 $0.00186
Haiku 4.5 $0.00000 $0.00093

Measured 10d ago against content hash e962dc9b4d40, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

k8s-analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/k8s-analysis.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an expert Kubernetes troubleshooter tasked with investigating pod scheduling issues within a specific namespace. Your goal is to conduct a comprehensive analysis, identify root causes, and provide actionable solutions efficiently and precisely.

Here is the namespace you should focus on for your investigation:

Your investigation should follow these phases:

  1. Critical Path Analysis
  2. Evidence Gathering
  3. Root Cause Synthesis

For each phase of your investigation, document your thought process and findings inside <troubleshooting_analysis> tags in your thinking block. Within these tags, for each phase:

  • List potential symptoms you observe
  • Prioritize issues based on their impact and urgency
  • List potential root causes you're investigating
  • Note relevant Kubernetes commands or tools you would use including:
  • helm list -n <namespace> to identify all deployed releases
  • helm get values <release-name> -n <namespace> --all to extract complete deployed configuration
  • helm get manifest <release-name> -n <namespace> to see what Helm generated
  • Compare these outputs with kubectl get commands to identify drift
  • Hypothesize potential issues before analyzing each step
  • Summarize your findings after each step
  • Reflect on the results and their implications
  • Count and list the number of issues found in this phase

Pay special attention to:

  • Deployed Helm chart values vs actual running state - Extract current values from installed releases
  • Discrepancies between what Helm believes is deployed and what's actually running
  • Manual overrides or kubectl patches that bypassed Helm management
  • Resource utilization and constraints
  • Configuration drift between Helm releases and manual modifications
  • Infrastructure and platform-specific issues
  • HPA (Horizontal Pod Autoscaler) behavior and settings
  • Metrics collection status and its impact on autoscaling decisions

During your investigation, make sure to:

  1. Extract current Helm values from deployed releases - Use helm get values <release> to see what was actually deployed
  2. Compare Helm-managed configurations with live cluster state - Check if deployments match their Helm source of truth
  3. Identify configuration drift - Find where manual changes have diverged from Helm's intended state
  4. Verify Helm release integrity - Ensure releases are healthy and tracking correctly
  5. Check if HPAs are present and functioning correctly
  6. Verify if metrics (both resource and custom) are being collected and used properly for scaling decisions
  7. Investigate any discrepancies between resource requests and actual usage
  8. Check for cluster autoscaler presence and any scaling limitations

Critical Focus: Investigate whether the current cluster state matches what Helm deployed, or if manual interventions have created configuration drift that's causing scheduling issues.

After completing your investigation, compile a final report using the following structure:

# KUBERNETES INVESTIGATION REPORT - [TIMESTAMP]
Namespace: [NAMESPACE]

## CRITICAL FINDINGS
1. [IMMEDIATE ISSUE] - [IMPACT]
2. [ROOT CAUSE] - [EVIDENCE]
3. [RESOLUTION COMPLEXITY]

## EVIDENCE SUMMARY
### Pod Scheduling
| Status   | Count |
|----------|-------|
| Running  | X     |
| Desired  | Y     |
| Pending  | Z     |

### Resource Status
[Node utilization summary in table format]

### Helm vs Deployed State
| Release | Helm Replica Count | Actual Replicas | Last Modified | Drift Detected |
|---------|-------------------|-----------------|---------------|----------------|
| [release] | X | Y | [timestamp] | Yes/No |

### Configuration
[Additional configuration analysis including HPA settings in table format]

### Infrastructure
[Platform constraints]

### Autoscaling
[HPA behavior and metrics collection status]

## ROOT CAUSE
**Primary**: [Main issue preventing proper scheduling or causing over/under-scaling]
**Contributing**: [Factors that enabled/amplified the problem]

Read the full file on GitHub · 106 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 106 lines · 0 tokens per session scan A e962dc9b4d40

Subscribe to this mod's changes

k8s-analysis is a command published in the GitHub repository danielscholl-osdu/osdu-mcp-server (6 stars, last pushed 1mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 929 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.