
Socratic Questioning
- 62 installs
- 28 repo stars
- Updated June 29, 2026
- nickcrew/claude-ctx-plugin
Helps with ai & agent building tasks.
About
socratic-questioning is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- socratic-questioning
- AI & Agent Building
- AI-coding skill
Socratic Questioning by the numbers
- 62 all-time installs (skills.sh)
- +1 installs in the week ending Jul 26, 2026 (Skillselion tracking)
- Ranked #6,163 of 16,556 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/nickcrew/claude-ctx-plugin --skill socratic-questioningAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 62 |
|---|---|
| repo stars | ★ 28 |
| Last updated | June 29, 2026 |
| Repository | nickcrew/claude-ctx-plugin ↗ |
What it does
Helps with ai & agent building tasks.
Files
Socratic Questioning
Guide developers toward discovery through strategic questioning rather than direct instruction. Covers Clean Code principles, GoF design patterns, and architectural trade-offs using progressive, level-adaptive questioning techniques.
When to Use This Skill
- Coaching developers on Clean Code or design pattern concepts
- Facilitating design discussions where the team needs to discover trade-offs
- Helping developers identify code smells and refactoring opportunities
- Teaching programming principles through guided discovery
- Running code review sessions focused on learning, not just fixing
Quick Reference
| Resource | Purpose | Load when |
|---|---|---|
references/questioning-techniques.md | Socratic method for code, question types, scaffolding progression | Starting a discovery session |
references/facilitation-patterns.md | Clean Code discovery, GoF pattern recognition, trade-off exploration | Discussing specific patterns or principles |
---
Workflow
Phase 1: Assess → Determine learner level, goals, prior knowledge
Phase 2: Explore → Lead discovery with layered questions
Phase 3: Consolidate → Summarize insights, propose exercises, outline next steps---
Phase 1: Assess
Before asking questions, understand the learner:
1. Gauge level -- beginner (concrete observations), intermediate (pattern recognition), advanced (synthesis and application) 2. Identify goals -- what does the learner want to understand or improve? 3. Map prior knowledge -- what principles do they already apply? 4. Choose strategy -- select questioning depth and scaffolding level
---
Phase 2: Explore
Lead discovery through layered questioning:
Core Progression
Observe → "What do you notice about [specific aspect]?"
Analyze → "Why might that be important?"
Abstract → "What principle could explain this?"
Apply → "How would you apply this principle elsewhere?"Principles
- Ask, don't tell -- guide toward the insight, don't state it directly
- Build incrementally -- each question builds on the previous answer
- Validate discoveries -- confirm insights without judgment
- Name after discovery -- only name a pattern/principle after the learner identifies the concept
Knowledge Revelation Timing
- After discovery: "What you've discovered is called..."
- Confirming: "Robert Martin describes this as..."
- Contextualizing: "You'll see this principle at work when..."
- Applying: "Try applying this to..."
---
Phase 3: Consolidate
Close the learning loop:
1. Summarize -- have the learner articulate what they discovered 2. Connect -- link the discovery to broader principles and patterns 3. Practice -- propose an exercise that applies the new understanding 4. Plan -- outline what to explore next based on gaps revealed
---
Session Types
| Session | Focus | Flow |
|---|---|---|
| Code Review | Apply Clean Code to existing code | Observe → Identify issues → Discover principles → Improve |
| Pattern Discovery | Recognize GoF patterns in code | Analyze behavior → Identify structure → Discover intent → Name pattern |
| Principle Application | Apply learned principles to new scenarios | Present scenario → Recall principles → Apply → Validate |
---
Understanding Checkpoints
Track learner progress through these milestones:
| Checkpoint | Evidence |
|---|---|
| Observation | Learner identifies relevant code characteristics |
| Pattern recognition | Learner sees recurring structures or behaviors |
| Principle connection | Learner connects observations to programming principles |
| Application ability | Learner applies principles to new scenarios |
| Teaching ability | Learner can explain the principle to others |
---
Anti-Patterns
- Do not lecture -- if you're explaining more than asking, recalibrate
- Do not reveal the answer before the learner has a chance to discover it
- Do not ask leading questions that have only one acceptable answer
- Do not skip levels -- ensure the learner has a solid foundation before advancing
- Do not judge wrong answers -- redirect with a follow-up question instead
Facilitation Patterns Reference
Patterns for facilitating discovery of Clean Code principles, GoF design patterns, architectural trade-offs, and refactoring opportunities through questioning.
Clean Code Discovery Questions
Meaningful Names
| Code smell | Discovery question | Follow-up |
|---|---|---|
| Single-letter variable | "What does d represent? How long did it take you to figure that out?" | "What name would make it immediately obvious?" |
| Misleading name | "Does this function name accurately describe everything it does?" | "If someone called this function based on its name alone, would they be surprised by its behavior?" |
| Inconsistent conventions | "In this file, I see getUserData, fetch_account, and loadProfile. What pattern do you notice?" | "What would consistency look like?" |
| Magic numbers | "What does the number 86400 mean here?" | "How would you make this self-documenting?" |
Functions
| Code smell | Discovery question | Follow-up |
|---|---|---|
| Long function | "If you had to explain this function's purpose in one sentence, how many sentences would you actually need?" | "What if each sentence became its own function?" |
| Many parameters | "How many things do you need to know to call this function?" | "What would it look like if related parameters were grouped?" |
| Side effects | "Does this function do anything beyond what its name promises?" | "What could go wrong if a caller doesn't expect that hidden behavior?" |
| Mixed abstraction levels | "Some of these lines deal with business logic, others with HTTP details. What do you notice?" | "What if each abstraction level had its own layer?" |
Error Handling
| Code smell | Discovery question | Follow-up |
|---|---|---|
| Returning null | "What happens to the caller when this returns null?" | "How many places need to check for null? What if you threw an exception instead?" |
| Swallowed exception | "What happens when this catch block runs?" | "If this error occurred in production, how would you know?" |
| String error codes | "How does the caller know which error happened?" | "What would typed exceptions give you that strings don't?" |
Classes
| Code smell | Discovery question | Follow-up |
|---|---|---|
| God class | "If you listed everything this class is responsible for, how long would the list be?" | "Which responsibilities could live in their own class?" |
| Low cohesion | "Do all the methods in this class use the same fields?" | "What does it tell you when a method ignores most of the class's state?" |
| Tight coupling | "If you changed the database, how many files would you need to modify?" | "What would it look like if this class didn't know about the database at all?" |
---
GoF Pattern Discovery
Strategy Pattern
When to suggest: The learner has a switch/case or if/else chain that selects behavior based on a type.
Q: "What happens when you need to add a new [type/behavior]?"
A: [Learner realizes they have to modify the existing function]
Q: "What if each behavior was its own object that you could swap in?"
A: [Learner describes the Strategy pattern without naming it]
→ "That's the Strategy pattern. The behavior varies independently from the client."Observer Pattern
When to suggest: The learner has code where one object needs to notify many others when something changes.
Q: "How does [component A] know when [component B] changes?"
A: [Learner describes polling or direct calls]
Q: "What if B didn't need to know who was listening — just that someone might be?"
A: [Learner describes a notification mechanism]
→ "That's the Observer pattern. Publishers don't know their subscribers."Factory Method / Abstract Factory
When to suggest: The learner has object creation logic scattered or duplicated, or creation depends on runtime conditions.
Q: "How many places in the code create [this type of object]?"
A: [Learner finds duplication]
Q: "What if there was one place responsible for deciding which concrete type to create?"
A: [Learner proposes centralized creation]
→ "That's the Factory pattern. It encapsulates object creation."Decorator Pattern
When to suggest: The learner wants to add behavior to an object without modifying its class.
Q: "You want to add logging to this service. What if you also need caching later? And retry logic?"
A: [Learner sees potential for class explosion with inheritance]
Q: "What if you could wrap the original object, adding one behavior at a time?"
A: [Learner describes wrapping/layering]
→ "That's the Decorator pattern. Each wrapper adds one responsibility."Adapter Pattern
When to suggest: The learner needs to use a class whose interface doesn't match what the caller expects.
Q: "Your code expects [interface A], but the library provides [interface B]. What are your options?"
A: [Learner considers modifying the caller or the library]
Q: "What if you wrote a thin translation layer between the two?"
A: [Learner describes the adapter concept]
→ "That's the Adapter pattern. It translates one interface to another."Command Pattern
When to suggest: The learner needs to queue, log, or undo operations.
Q: "How would you implement undo for this action?"
A: [Learner struggles with saving state]
Q: "What if each action was an object that knew how to execute itself — and reverse itself?"
A: [Learner describes encapsulated actions]
→ "That's the Command pattern. Actions become first-class objects."---
Architectural Trade-Off Exploration
Guiding Trade-Off Discussions
When developers face architectural decisions, use questions to surface trade-offs rather than prescribing a solution:
Q: "What does this approach optimize for?"
Q: "What are you giving up to get that?"
Q: "How would this decision look in 6 months with 10x the traffic?"
Q: "What's the simplest version that still solves the problem?"
Q: "What would make you reverse this decision?"Common Trade-Off Pairs
| Trade-off | Discovery questions |
|---|---|
| Consistency vs Availability | "What happens to users if this service is briefly inconsistent? What happens if it's unavailable?" |
| Simplicity vs Flexibility | "How likely is it that you'll need this flexibility? What does the extra abstraction cost you today?" |
| Performance vs Readability | "Is this optimization measurably necessary, or is it premature?" |
| DRY vs Decoupling | "These two modules share code, but do they change for the same reasons?" |
| Build vs Buy | "How much of this is truly unique to your domain vs commodity infrastructure?" |
---
Refactoring Discovery
Code Smell Identification Through Questioning
Instead of pointing out smells, guide discovery:
| Smell | Question chain |
|---|---|
| Duplicated code | "What happens if you need to change this logic?" → "How many places would you need to update?" → "What does that tell you?" |
| Long method | "Can you describe what this method does in one sentence?" → "How many 'and's did you use?" → "What if each 'and' was its own method?" |
| Feature envy | "Which class's data does this method use the most?" → "What if the method lived in that class instead?" |
| Data clumps | "How many times do you see these three parameters together?" → "What if they were a single object?" |
| Primitive obsession | "What does this string represent? What values are valid?" → "What would a dedicated type give you?" |
| Shotgun surgery | "When you change [feature], how many files do you touch?" → "What if all those changes were in one place?" |
Refactoring Readiness Assessment
Before suggesting a refactoring, confirm readiness:
Q: "Do you have tests covering this code?"
Q: "What's the smallest change that would improve this?"
Q: "If this refactoring introduced a bug, how quickly would you find it?"
Q: "Is this the right time to refactor, or should it wait for a dedicated effort?"These questions help the learner internalize the discipline of safe refactoring -- test coverage first, small steps, and timing awareness.
Questioning Techniques Reference
Socratic method applied to programming education, with question types and scaffolding progressions.
Socratic Method Applied to Code
The Socratic method in code education replaces direct instruction with guided discovery. Instead of telling a developer "this function violates SRP," lead them to discover it through observation and reasoning.
The Three Moves
| Move | Purpose | Example |
|---|---|---|
| Clarifying | Expose assumptions, sharpen definitions | "What do you mean by 'handles authentication'? What specific steps does that involve?" |
| Probing assumptions | Challenge unstated beliefs | "Why do you assume this function needs to do both validation and persistence?" |
| Probing reasons/evidence | Demand justification | "What evidence in the code tells you this approach is working well? What would it look like if it weren't?" |
Applied to Code Review
Code under review: A 200-line function that validates input, queries a database,
transforms results, and sends a notification.
Clarifying:
"If you had to write a one-sentence description of what this function does,
what would it be?"
→ Learner struggles to write one sentence → discovers it does too much.
Probing assumptions:
"What would happen if the notification service is down? Does validation
still need to complete?"
→ Learner realizes unrelated concerns are coupled.
Probing evidence:
"How would you test just the validation logic in isolation?"
→ Learner discovers the function is untestable without the database.---
Question Types and When to Use Them
Observation Questions
Purpose: Get the learner to look closely at the code.
| Question | When to use |
|---|---|
| "What do you notice about this function's name?" | The name doesn't match behavior |
| "How many parameters does this function take?" | Parameter list is too long |
| "What types does this function return?" | Return type is unclear or inconsistent |
| "How many lines is this function?" | Function is too long |
| "What dependencies does this class have?" | Too many dependencies injected |
Pattern Recognition Questions
Purpose: Help the learner see recurring structures.
| Question | When to use |
|---|---|
| "Do you see any similar blocks of code in this file?" | Duplication exists |
| "What pattern do the method names follow?" | Naming is inconsistent |
| "How does this class communicate with its collaborators?" | Coupling patterns |
| "What happens when you trace the flow from input to output?" | Complex control flow |
| "Where does the logic branch? How many paths are there?" | High cyclomatic complexity |
Principle Discovery Questions
Purpose: Guide the learner from observation to principle.
| Question | Target principle |
|---|---|
| "If this function's name perfectly described what it does, what would change?" | Meaningful names |
| "What if each responsibility had its own function?" | Single Responsibility |
| "If you needed to swap the database, what would you have to change?" | Dependency Inversion |
| "What would the code look like if you never had to modify this class to add a new type?" | Open/Closed Principle |
| "How could you test this function without a network connection?" | Dependency Injection |
Synthesis Questions
Purpose: Connect discoveries to broader understanding.
| Question | When to use |
|---|---|
| "How does what you discovered here relate to [previous principle]?" | Connecting concepts |
| "If you were writing this from scratch, what would you do differently?" | Integrating lessons |
| "What would you tell a teammate who wrote this code?" | Testing understanding |
| "Where else in the codebase might this pattern be hiding?" | Generalizing |
---
Scaffolding Progression
Level-Adaptive Approach
Adjust question depth based on the learner's level:
Beginner (High Guidance)
- Ask concrete observation questions
- Provide clear hints when the learner is stuck
- Name principles immediately after discovery
- Use simple, familiar examples
Q: "What do you see when you look at this variable name — 'd'?"
A: [Learner observes it's unclear]
Q: "If you came back to this code in 3 months, would you remember what 'd' means?"
A: [Learner recognizes the problem]
→ "This connects to what Robert Martin calls 'intention-revealing names.'"Intermediate (Medium Guidance)
- Ask pattern recognition questions
- Give discovery hints only when truly stuck
- Let the learner name the principle before confirming
- Use real codebase examples
Q: "What pattern do you see in how these three classes handle errors?"
A: [Learner identifies duplication or inconsistency]
Q: "What principle might help here?"
A: [Learner suggests an approach]
→ "That aligns with [principle]. How would you apply it?"Advanced (Low Guidance)
- Ask synthesis and application questions
- Expect the learner to identify both problem and principle
- Challenge them to find edge cases and trade-offs
- Use complex, ambiguous scenarios
Q: "How might this principle apply to your current architecture?"
A: [Learner proposes application]
Q: "What are the trade-offs of that approach?"
A: [Learner identifies downsides]
→ "Exactly. Now, how would you decide which trade-off is acceptable?"Progression Within a Single Session
A session typically moves through these phases:
1. Warm-up (2-3 observation questions)
→ Establish what the learner sees
2. Deepening (3-5 pattern/principle questions)
→ Guide toward the core insight
3. Naming (1 confirmation)
→ Name the principle after discovery
4. Application (2-3 synthesis questions)
→ Apply the principle to a new context
5. Wrap-up (1-2 reflection questions)
→ "What will you do differently now?"Handling Wrong Answers
When a learner gives an incorrect or incomplete answer:
| Situation | Response strategy |
|---|---|
| Partially correct | "That's part of it. What else might be going on?" |
| Confidently wrong | "Interesting. What would happen if you tested that assumption?" |
| Stuck/silent | "Let's look at it from a different angle. What if [simpler question]?" |
| Off-track | "That's a valid observation about [what they said]. How does it connect to [the actual focus]?" |
Never say "that's wrong." Redirect with a question that exposes the gap.
Knowing When to Tell
The Socratic method has limits. Switch to direct instruction when:
- The learner is frustrated after 3+ attempts at the same concept
- The concept requires background knowledge the learner doesn't have
- Time constraints make discovery impractical
- The learner explicitly asks for a direct explanation
Even in direct instruction mode, follow up with a question: "Now that you know [concept], where would you apply it in this code?"