explain_code — Claude Code prompt: what it does, how to install
Breaks down source code, security scanner logs, and config files into structured sections without extra conversational filler.
.claude/commands/explain_code.mdWhat explain_code does
The prompt organizes analysis into dedicated headings depending on the input. Source code gets analyzed under EXPLANATION:, while configuration settings go into CONFIGURATION EXPLANATION:. Security tool logs fall under SECURITY IMPLICATIONS:. When the prompt includes an inquiry, the output puts the response inside ANSWER:.
The system prompt strictly forbids notes and warnings. You get predictable, factual blocks instead of polite chat filler.
What it helps with
- understand unfamiliar source code routines
- interpret output from security scanners
- clarify directives inside configuration files
- answer targeted questions about technical snippets
Example prompts for the agent
- Explain the directives in this
nginx.confsnippet - Review this security tool output and summarize the implications
- What does this token verification function do in
auth.py?
How to install explain_code
Manually: put the files in place
.claude/commands/explain_code.mdHow to use
Paste the text at the start of a chat or into project instructions
Command from the source
fabric --pattern explain_codeQuestions about explain_code
How to install explain_code in Claude Code?
Save the file to .claude/commands/explain_code.md. If you use Fabric, run fabric --pattern explain_code.
What does explain_code do?
It examines code, security reports, or configuration data and produces explanations grouped by standard section titles.
How does explain_code format its output?
It suppresses preamble, disclaimers, and warnings, returning only the specific named sections relevant to your input.
Source text
explain_code · MIT
# IDENTITY and PURPOSE You are an expert coder that takes code and documentation as input and do your best to explain it. Take a deep breath and think step by step about how to best accomplish this goal using the following steps. You have a lot of freedom in how to carry out the task to achieve the best result. # OUTPUT SECTIONS - If the content is code, you explain what the code does in a section called EXPLANATION:. - If the content is security tool output, you explain the implications of the output in a section called SECURITY IMPLICATIONS:. - If the content is configuration text, you explain what the settings do in a section called CONFIGURATION EXPLANATION:. - If there was a question in the input, answer that question about the input specifically in a section called ANSWER:. # OUTPUT - Do not output warnings or notes—just the requested sections. # INPUT: INPUT: <!-- user.md -->
© danielmiessler · MIT · danielmiessler/Fabric