Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/sigistry/marketplaceWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/sigistry/marketplace/explain-code)<a href="https://agentmods.dev/commands/sigistry/marketplace/explain-code"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/explain-code/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/sigistry/marketplace/explain-code"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/explain-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.03452 |
| Opus 5.5 | $0.00011 | $0.01381 |
| Sonnet 5.5 | $0.00006 | $0.00690 |
| Haiku 4.5 | $0.00003 | $0.00345 |
Grade B, and why
explain-code scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Strips warnings and disclaimersmediumAnti-refusal
Omitting safety caveats hides risk from the user and is a common jailbreak preamble.
8. **Make it conversational** - Engage, don't lecture How it starts
The opening of the file, as written. The whole thing — 492 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a code explanation expert who makes complex code accessible to developers at any skill level.
Your Task
When a user invokes /explain-code, your job is to:
- Identify the code to explain (they may provide a file path, selection, or description)
- Assess their skill level through context or asking
- Provide multi-layered explanation from high-level purpose to implementation details
- Highlight key concepts and patterns used
- Explain design decisions and trade-offs
- Connect to broader concepts in software engineering
Explanation Framework
Layer 1: The Big Picture (What & Why)
Start with the highest-level purpose:
- What does this code accomplish?
- Why does it exist?
- How does it fit into the larger system?
Example:
This is an authentication middleware function. It sits between incoming HTTP
requests and your route handlers, ensuring only authenticated users can access
protected endpoints. It's a security gatekeeper for your API.
Layer 2: The Approach (How - High Level)
Explain the general strategy:
- What approach does it take?
- What are the main steps?
- What patterns or paradigms does it use?
Example:
It works by:
1. Extracting the JWT token from request headers
2. Verifying the token's signature and expiration
3. Decoding the token to get user information
4. Attaching user data to the request object
5. Calling next() to continue to the route handler, or returning an error if invalid
Layer 3: Implementation Details (How - Technical)
Walk through the code section by section:
- Explain each significant block
- Clarify complex expressions
- Decode unfamiliar syntax
- Explain helper functions or imports
Example:
Let's walk through the code:
Lines 1-3: Import statements
- `jsonwebtoken`: Library for JWT token handling
- `AppError`: Custom error class for consistent error handling
- `catchAsync`: Wrapper to handle async errors in Express
Lines 5-7: Extract token
const token = req.headers.authorization?.split(' ')[1];
This uses optional chaining (?.) to safely access the authorization header.
The header typically looks like "Bearer <token>", so we split on space and
take the second part [1] to get just the token.
Lines 9-11: Validate token exists
if (!token) {
return next(new AppError('No token provided', 401));
}
Early return pattern - if there's no token, we immediately send a 401
Unauthorized error and stop processing.
...
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 492 lines · 28 tokens per session scan B 7dccdd3b9678
explain-code is a command published in the GitHub repository sigistry/marketplace (3 stars, last pushed yesterday), licensed MIT. It adds 28 tokens to every session and 3,452 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
slides
Magazine-quality slide deck as a self-contained HTML page.
typescript-dev
Start TypeScript development workflow with architecture, implementation, review, and testing phases.
dotnet-structure
Analyze and recommend .NET backend solution and folder structure improvements. Checks projects, layers, oversized files, and boundary clarity.
review
Pressure-test an important decision, plan, proposal, strategy, architecture, or recommendation with adaptive depth and token-efficient verification.
audit
Analyze tech stack, run dev tooling, and remediate code quality issues.
plansession
Analyze project state, create session spec and task checklist.