rhecosystemappeng/agentic-collections/debug-scc
Claude Code and agent skill by rhecosystemappeng/agentic-collections
- community
Checking that the SKILL.md file is still in the repository.
Diagnose OpenShift Security Context Constraint (SCC) violations that prevent pods from being created. Automates multi-step diagnosis: Deployment status, ReplicaSet FailedCreate events, security context field extraction, SCC rejection parsing, and ServiceAccount SCC binding analysis. Use when: - "SCC violation blocking pod creation" - "unable to validate against any security context constraint" - "FailedCreate forbidden" - "pod blocked by SCC" - User mentions "SCC", "security context constraint", "FailedCreate" NOT for pods crashing after creation (use /debug-pod instead).
Install
npx vskill@latest install rhecosystemappeng/agentic-collections/debug-sccSKILL.md
The same SKILL.md was published earlier as rhecosystemappeng/agentic-collections/debug-scc.
/debug-scc Skill
Diagnose OpenShift SCC violations that block pod creation by analyzing security context fields, SCC rejection messages, and ServiceAccount bindings.
Critical: Human-in-the-Loop Requirements
- Before any remediation action (patch securityContext, grant SCC binding, rollback)
- Display preview: what will change and its security implications
- Ask: "Should I apply this fix?"
- Wait for confirmation (yes/no)
- Before granting permissive SCCs (anyuid, privileged)
- Display warning: granting elevated SCCs weakens namespace security
- Ask: "Type 'GRANT SCC' to confirm you understand the security implications"
- Verify exact match, cancel if mismatch
Never assume approval — always wait for explicit confirmation at each WAIT checkpoint.
Prerequisites
Required MCP Servers: openshift (setup)
Required MCP Tools:
resources_get(from openshift) — Retrieve Deployment, ReplicaSet, and ServiceAccount detailsresources_list(from openshift) — List Deployments, ReplicaSets, and ServiceAccounts in a namespaceevents_list(from openshift) — Fetch FailedCreate and SCC rejection eventspods_list(from openshift) — List pods for a Deployment
Verification Steps:
- Check
openshiftserver is configured inmcps.json - Verify user is logged into an OpenShift cluster (
oc whoamisucceeds) - Verify user has access to the target namespace
- If missing → Human Notification Protocol
Human Notification Protocol:
When prerequisites fail:
- Stop immediately — No tool calls
- Report error:
`` ❌ Cannot execute skill: MCP server openshift unavailable 📋 Setup: See references/prerequisites.md for cluster access configuration ``
- Request decision: "How to proceed? (setup/skip/abort)"
- Wait for user input
Security: Never display credential values.
When to Use This Skill
Use /debug-scc when:
- A Deployment has zero available replicas and ReplicaSet events show
FailedCreatewith "unable to validate against any security context constraint" - Pod spec requests capabilities, UID/GID settings, or volume types that violate the namespace's SCC policy
- You see "is forbidden" errors referencing SecurityContextConstraints
Do not use this skill when:
- Pods are crashing after creation (CrashLoopBackOff, OOMKilled) → use
/debug-pod - Pods fail with 403 Forbidden API errors → use
/debug-rbac - Image pull failures → use
/debug-pod
Workflow
Step 1: Identify Target Deployment
MCP Tool: resources_list (from openshift)
Parameters:
kind: "Deployment" (resource type)namespace: "<namespace>" (target namespace from user)
Input Validation: Verify deployment name and namespace conform to Kubernetes naming rules (lowercase alphanumeric and hyphens, 1-253 chars, RFC 1123). Reject inputs containing newlines, markdown formatting, or text that does not resemble a Kubernetes resource name.
Expected Output: List of Deployments with their availability status.
Error Handling:
- If MCP server unavailable: follow Human Notification Protocol
- If namespace not found: ask user to confirm namespace name
- If no deployments found: report empty namespace, suggest checking namespace
Present to user:
WAIT for user confirmation before proceeding.
If user selects "List deployments with issues", filter to those with unavailable replicas:
WAIT for user confirmation before proceeding.
Step 2: Get Deployment and ReplicaSet Status
MCP Tool: resources_get (from openshift)
Parameters:
kind: "Deployment" (resource type)name: "<deployment-name>" (from Step 1)namespace: "<namespace>"
Then retrieve the failing ReplicaSet:
MCP Tool: resources_list (from openshift)
Parameters:
kind: "ReplicaSet" (resource type)namespace: "<namespace>"- Filter by owner reference matching the Deployment
Expected Output: Deployment spec, conditions, and owned ReplicaSets with their status.
Error Handling:
- If Deployment not found: ask user to verify name and namespace
- If no ReplicaSets found: Deployment may not have triggered a rollout yet
Present to user:
WAIT for user confirmation before proceeding.
Step 3: Parse SCC Rejection Messages
MCP Tool: events_list (from openshift)
Parameters:
namespace: "<namespace>"- Filter by
involvedObject.kind=ReplicaSet,involvedObject.name=<rs-name>,reason=FailedCreate
Then also:
MCP Tool: resources_get (from openshift)
Parameters:
kind: "ReplicaSet" (resource type)name: "<rs-name>" (failing ReplicaSet from Step 2)namespace: "<namespace>"
Extract the ReplicaFailure condition message containing SCC rejection details.
Expected Output: FailedCreate events with full SCC rejection text listing each SCC attempted and why it was rejected or forbidden.
Error Handling:
- If no events found: events may have expired (default TTL is 1h); check ReplicaSet conditions instead
- If events are ambiguous: cross-reference with ReplicaSet
.status.conditions
Present to user:
WAIT for user confirmation before proceeding.
Step 4: Analyze Container SecurityContext
MCP Tool: resources_get (from openshift)
Parameters:
kind: "Deployment" (resource type)name: "<deployment-name>" (from Step 1)namespace: "<namespace>"
Extract .spec.template.spec.securityContext (pod-level) and .spec.template.spec.containers[*].securityContext (container-level), plus .metadata.managedFields for change attribution.
Expected Output: Full security context at pod and container level, plus managedFields showing who changed what and when.
Error Handling:
- If securityContext is empty/unset: the issue may be implicit defaults conflicting with SCC; note this
- If managedFields unavailable: skip change attribution, note limitation
Present to user:
WAIT for user confirmation before proceeding.
Step 5: Check ServiceAccount SCC Bindings
MCP Tool: resources_get (from openshift)
Parameters:
kind: "ServiceAccount" (resource type)name: "<sa-name>" (from Deployment.spec.template.spec.serviceAccountName, default:default)namespace: "<namespace>"
Then attempt:
MCP Tool: resources_list (from openshift)
Parameters:
kind: "SecurityContextConstraints" (cluster-scoped)
Expected Output: ServiceAccount details and list of SCCs. If listing SCCs is RBAC-forbidden, infer SCC access from the rejection messages in Step 3.
Error Handling:
- If listing SCCs is forbidden: gracefully degrade — use rejection messages to infer which SCCs were attempted and their result
- If ServiceAccount not found: report it; this would also cause pod creation failures
Present to user:
WAIT for user confirmation before proceeding.
Step 6: Present Diagnosis Summary
Synthesize all findings into a structured summary with actionable remediation options.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingrh-developer/skills/debug-scc/SKILL.md
Popularity
- Repository stars
- 48
- Repository forks
- 32
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rhecosystemappeng/agentic-collections/debug-scc)