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.
npx agentmods add commands/sigistry/marketplace/explain-codegit clone --depth 1 https://github.com/sigistry/marketplaceWhat 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 | $0.00028 | $0.03452 |
| Opus 5 | $0.00014 | $0.01726 |
| Sonnet 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 yesterday.
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.
- yesterday 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 3d ago), licensed MIT. It adds 28 tokens to every session and 3,452 once invoked, about $0.0001 per session on Opus 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
battlecard
Create a sales-ready competitive battlecard — positioning, feature comparison, objection handling, and win strategies.
release
Generate changelog, bump version, and create git tag.
bump-plugin
Bump changed plugin and marketplace version.
adv-gemini-research
Deep research query via Gemini with Google Search grounding.
bootstrap
Scaffold test, lint, and CI infrastructure for projects that lack it.
validate
Mechanically validate the sonu plugin repo before a PR — manifest sync, YAML frontmatter, shell-fence syntax, named-source and AI-attribution scans, cross-reference integrity, skill reachability. Only meaningful inside the claude-plugins repo; in any other repo, say so and stop.