Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
0
0
# Install this skill:
npx skills add ahmedhesham2020/AI_Skills --skill "logic-explainer"
Install specific skill from multi-skill repository
# Description
Adds plain-English summaries to complex code blocks.
# SKILL.md
name: logic-explainer
description: Adds plain-English summaries to complex code blocks.
Skill: Logic Explainer π‘
Description
Use this skill to add high-level, plain-English summaries to complex blocks of code to improve readability.
Trigger Criteria
- Length: Functions or methods > 15 lines. π
- Depth: Any code block with β₯ 2 levels of nesting (e.g., nested loops/conditionals). πͺ
Instructions
- Scan: Analyze the active file for blocks meeting the length or depth criteria.
- Draft: Create a
# LOGIC SUMMARY:comment block. - Explain: Describe the "what" and "why" of the logic in 1-2 simple sentences.
- Refine: Avoid using specific variable names; focus on the business logic or intent.
Suggestions Logic
- Context: When the user is editing or discussing a function that meets Trigger Criteria.
- Action: Propose a summary rather than applying it immediately.
- Dialogue Template: "I noticed this logic is getting a bit complex. Would you like me to add a plain-English # LOGIC SUMMARY to help keep this readable?"
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Amp
Antigravity
Claude Code
Clawdbot
Codex
Cursor
Droid
Gemini CLI
GitHub Copilot
Goose
Kilo Code
Kiro CLI
OpenCode
Roo Code
Trae
Windsurf
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.