From slop-coder
Explain SLOP code - understand what SLOP code does and how it works
How this command is triggered — by the user, by Claude, or both
Slash command
/slop-coder:slop-explainThe summary Claude sees in its command listing — used to decide when to auto-load this command
# Explain SLOP Code Analyze and explain SLOP code, breaking down its structure, logic, and behavior. ## Usage Then provide or paste the SLOP code you want explained. ## What You Should Do When explaining SLOP code: ### 1. Identify the Structure - Is it a simple script or modular code? - What functions are defined? - What is the main entry point? - What external services are used (LLM, MCP)? ### 2. Explain Each Section **For functions:** - What does it take as input? - What does it return? - What side effects does it have? **For loops:** - What is being iterated? - What are the b...
Analyze and explain SLOP code, breaking down its structure, logic, and behavior.
/slop-explain
Then provide or paste the SLOP code you want explained.
When explaining SLOP code:
For functions:
For loops:
For LLM calls:
Follow data from input to output:
Recognize common SLOP patterns:
## Overview
<One sentence summary of what the code does>
## Structure
- **Functions defined:** <list>
- **External services:** <list>
- **Entry point:** <description>
## Detailed Walkthrough
### Section 1: <name>
<Explanation of what this section does>
### Section 2: <name>
<Explanation of what this section does>
## Data Flow
1. <Step 1>
2. <Step 2>
3. <Step 3>
## Output
<What is emitted and when>
## Safety Features
- <Feature 1>
- <Feature 2>
Given this code:
def classify(text, categories):
response = llm.call(
prompt: "Classify this text into one of: {categories}\n\nText: {text}",
schema: {
category: string,
confidence: float
}
)
return response
texts = ["Great product!", "Terrible service", "It's okay"]
for text in texts with limit(100):
result = classify(text, ["positive", "negative", "neutral"])
emit(text: text, category: result.category, confidence: result.confidence)
emit(status: "complete", count: len(texts))
Explanation:
This code classifies a list of text samples into sentiment categories using an LLM.
classify(text, categories)texts listTakes a text string and list of categories. Calls the LLM with a classification prompt and expects a structured response containing:
category: The chosen classificationconfidence: A confidence score (0.0-1.0)Iterates over the texts list with a safety limit of 100 iterations.
For each text:
classify() with the text and category optionsEmits a completion status with the total count processed.
{text: "...", category: "positive", confidence: 0.95}{status: "complete", count: 3}limit(100)npx claudepluginhub standardbeagle/standardbeagle-tools --plugin slop-coder/explain-codeExplains pasted code in detail via natural language queries, covering functionality, algorithms, design patterns, performance issues, security risks, async flows, and architecture with insights on implementation choices.
/explain-codeExplains code snippets in depth: mechanics, design rationale, pros/cons, performance/security issues, edge cases, and improvements. Supports focused requests like algorithms or async flows.
/explain-codeExplains code operation in detail, including implementation rationale, advantages, potential issues, edge cases, performance, security, and improvement suggestions.
/explain-codeExplains code snippets in detail: functionality, design rationale, benefits, potential issues, performance, security, async flows, and architecture summaries.
/explainAnalyzes tasks, code, events, or issues read-only, providing explanations, impact assessments, risk analysis, and implementation recommendations.
/token-efficientActivates token-efficient mode with symbols and abbreviations to compress AI responses 30-50% while preserving code quality and content.