.claude/skills/explain/SKILL.md
Explain what code does line by line so you can understand and learn from it.
npx skillsauth add allierays/agentic-loop .claude/skills/explainInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Explain what code does, line by line, so you can understand and learn from it.
When the user asks you to explain code:
If the user provides a file path, read that file. If they paste code directly, use that.
If no code is specified, ask:
"What code would you like me to explain? Please provide a file path or paste the code."
Start with a high-level summary:
For each significant section, explain:
Use this format:
Lines X-Y: [Brief description]
- This code [what it does]
- It's needed because [why]
- It works by [how]
Point out important patterns and concepts:
End with:
## Overview
This is a React custom hook that manages authentication state. It handles
login, logout, and automatic token refresh.
## Line-by-Line Explanation
### Lines 1-5: Imports
```typescript
import { useState, useEffect, useCallback } from 'react';
import { authApi } from '@/services/api';
import { User } from '@/types';
export function useAuth() {
const [user, setUser] = useState<User | null>(null);
const [loading, setLoading] = useState(true);
user state holds the current user (or null if logged out)loading state tracks whether we're still checking auth statusloading: true prevents flash of unauthenticated content[... continue explanation ...]
useAuth() to access auth state
## Tips for Users
Ask me to explain:
- "Explain this function" (paste code)
- "Explain src/hooks/useAuth.ts"
- "Explain lines 50-100 of api.ts"
- "What does this regex do?"
- "Why is this pattern used here?"
I'll adjust the depth based on what you ask. For simple code, I'll be brief. For complex code, I'll be thorough.
tools
Show complete reference for all agentic-loop commands (slash commands, Ralph CLI, vibe CLI).
data-ai
Quick reference cheatsheet for all agentic-loop commands including Ralph.
development
Run a comprehensive code quality check looking for common patterns that AI coding agents introduce.
development
Take an interactive tour of agentic-loop - the system for going from idea to shipped code with AI.