Skip to content
Development
Command

/context-load-security

Load comprehensive Kubernetes security documentation context with cluster-aware analysis

From plugin
claude-cmd
313180 skills180 commands

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/context-load-security

Context preview

What this command does when you run it.

Load comprehensive Kubernetes security documentation context with cluster-aware analysis

Command definition

context-load-security.md
allowed-tools: Read, WebFetch, Bash(fd:*), Bash(rg:*), Bash(kubectl:*), Bash(jq:*), Bash(gdate:*)
name: "Context Load Security"
description: "Load comprehensive Kubernetes security documentation context with cluster-aware analysis"
author: "wcygan"
tags: ["context","security"]
version: "1.0.0"
created_at: "2025-07-14T00:00:00Z"
updated_at: "2025-07-14T00:00:00Z"

Context

  • Session ID: !`gdate +%s%N 2>/dev/null || date +%s000000000 2>/dev/null || echo "session-$(date +%s)000000000"`
  • Current directory: !`pwd`
  • Kubernetes context: !`kubectl config current-context 2>/dev/null || echo "No Kubernetes context"`
  • Security-related files: !`fd "(security|rbac|network-policy|secret)" . --type f | head -5 || echo "No security files found"`
  • External Secrets: !`kubectl get externalsecrets -A 2>/dev/null | wc -l | tr -d ' ' || echo "0"`
  • Security policies: !`kubectl get psp,networkpolicy -A 2>/dev/null | wc -l | tr -d ' ' || echo "0"`
  • Secrets count: !`kubectl get secrets -A 2>/dev/null | wc -l | tr -d ' ' || echo "0"`
  • RBAC resources: !`kubectl get clusterroles,roles -A 2>/dev/null | wc -l | tr -d ' ' || echo "0"`
  • Technology stack: !`fd "(docker|k8s|kubernetes)" . --type d | head -3 || echo "No container orchestration detected"`
  • Git status: !`git status --porcelain | head -3 2>/dev/null || echo "Not a git repository"`

Your Task

STEP 1: Initialize security context loading session

  • CREATE session state file: `/tmp/security-context-$SESSION_ID.json`
  • SET initial state:
  {
    "sessionId": "$SESSION_ID",
    "phase": "discovery",
    "cluster_context": "detected_from_kubectl",
    "security_posture": {},
    "context_sources": [],
    "loaded_topics": [],
    "documentation_cache": {},
    "security_features_detected": []
  }

STEP 2: Security environment analysis

Think harder about the optimal security context loading strategy based on cluster configuration and existing security implementations.

**Extended Thinking Areas:**

  • Security architecture patterns and threat modeling approaches
  • Integration strategies for multi-provider secret management
  • Zero-trust network implementation considerations
  • Compliance framework alignment and audit requirements
  • ANALYZE current Kubernetes environment from Context section
  • DETERMINE specific security features and tools in use
  • IDENTIFY documentation priorities based on security needs

IF Kubernetes cluster access detected AND External Secrets found:

  • FOCUS on External Secrets Operator configuration and provider integration
  • PRIORITIZE secret rotation, provider-specific patterns, monitoring
  • INCLUDE operational security and troubleshooting contexts

ELSE IF Kubernetes cluster access detected:

  • LOAD general Kubernetes security foundation and secret management
  • EMPHASIZE RBAC configuration, network policies, pod security standards
  • INCLUDE cluster hardening and security monitoring setup

ELSE:

  • LOAD theoretical security frameworks and best practices
  • EMPHASIZE getting-started guides and security assessment tools
  • INCLUDE security by design principles and threat modeling

STEP 3: Strategic security documentation loading

TRY:

  • EXECUTE systematic context loading from prioritized security sources
  • USE WebFetch tool for each documentation URL
  • PROCESS and organize information by security domain
  • SAVE loaded context to session state

**Core Security Documentation Sources:**

FOR EACH priority source:

1. **External Secrets Operator Documentation**

  • URL: `https://external-secrets.io/latest/`
  • FETCH: Provider integrations, secret stores, automation patterns
  • FOCUS: AWS Secrets Manager, HashiCorp Vault, 1Password integration
  • EXTRACT: Configuration examples, troubleshooting, best practices

2. **1Password Kubernetes Operator**

  • URL: `https://developer.1password.com/docs/k8s/operator/`
  • FETCH: Operator setup, secret injection patterns, security practices
  • FOCUS: Installation, configuration, monitoring, access patterns
  • EXTRACT: RBAC setup, secret lifecycle, operational procedures

3. **Kubernetes Security Documentation**

  • URL: `https://kubernetes.io/docs/concepts/security/`
  • FETCH: RBAC, network policies, pod security standards, admission controllers
  • FOCUS: Security contexts, service accounts, authorization patterns
  • EXTRACT: Configuration templates, validation strategies

4. **Kubernetes Security Checklist**

  • URL: `https://kubernetes.io/docs/concepts/security/security-checklist/`
  • FETCH: Cluster hardening, workload security, supply chain security
  • FOCUS: Production readiness, security baselines, compliance
  • EXTRACT: Actionable checklist items, validation procedures

5. **NIST Container Security Guidelines**

  • URL: `https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-190.pdf`
  • FETCH: Container security framework, vulnerability management
  • FOCUS: Risk assessment, security controls, compliance frameworks
  • EXTRACT: Security requirements, control implementations

6. **Pod Security Standards**

  • URL: `https://kubernetes.io/docs/concepts/security/pod-security-standards/`
  • FETCH: Security profiles, policy enforcement, migration strategies
  • FOCUS: Privileged, baseline, restricted security contexts
  • EXTRACT: Policy examples, enforcement mechanisms

7. **Network Policy Documentation**

  • URL: `https://kubernetes.io/docs/concepts/services-networking/network-policies/`
  • FETCH: Network segmentation, traffic control, policy design
  • FOCUS: Ingress/egress rules, namespace isolation, micro-segmentation
  • EXTRACT: Policy templates, testing strategies

CATCH (documentation_fetch_failed):

  • LOG failed sources to session state
  • CONTINUE with available documentation
  • PROVIDE manual context loading instructions
  • SAVE fallback documentation references

STEP 4: Security context organization and synthesis

  • ORGANIZE loaded context by security domain:
  • **Secret Management**: External Secrets, encryptio
Read more
Ships withclaude-cmd

A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.

Get the whole plugin