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/thapaliyabikendra/ai-artifactsWrote 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/thapaliyabikendra/ai-artifacts/code-explain-templates)<a href="https://agentmods.dev/commands/thapaliyabikendra/ai-artifacts/code-explain-templates"><img src="https://agentmods.dev/badge/commands/thapaliyabikendra/ai-artifacts/code-explain-templates/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/thapaliyabikendra/ai-artifacts/code-explain-templates"><img src="https://agentmods.dev/badge/commands/thapaliyabikendra/ai-artifacts/code-explain-templates.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.00000 | $0.03477 |
| Opus 5.5 | $0.00000 | $0.01391 |
| Sonnet 5.5 | $0.00000 | $0.00695 |
| Haiku 4.5 | $0.00000 | $0.00348 |
Grade A, and why
code-explain-templates scanned grade A with 0 findings 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 3mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 624 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Explanation Templates Reference
Templates and patterns for the /explain:code-explain command. All examples are C#/.NET focused.
Complexity Metrics
Code Analysis Checklist
## Code Complexity Analysis
| Metric | Value | Threshold |
|--------|-------|-----------|
| Lines of Code | {count} | <200 per class |
| Cyclomatic Complexity | {value} | <10 per method |
| Nesting Depth | {depth} | <4 levels |
| Method Count | {count} | <20 per class |
| Dependency Count | {count} | <10 per class |
### Identified Concepts
- [ ] Async/await patterns
- [ ] Dependency injection
- [ ] Repository pattern
- [ ] Unit of Work
- [ ] CQRS pattern
Visual Diagram Templates
Flow Diagram (Mermaid)
flowchart TD
F0[MethodName]
F0_params[/param1, param2/]
F0_return[ReturnType]
F0_params --> F0
F0 --> F0_return
F0 --> F1[CalledMethod]
Class Diagram (Mermaid)
classDiagram
class ClassName {
-privateField : Type
+PublicProperty : Type
-PrivateMethod() : void
+PublicMethod(params) : ReturnType
}
IInterface <|.. ClassName : implements
BaseClass <|-- ClassName : extends
ClassName --> DependencyClass : uses
Sequence Diagram (Mermaid)
sequenceDiagram
participant Controller
participant AppService
participant Repository
participant Database
Controller->>AppService: CreateAsync(dto)
AppService->>Repository: InsertAsync(entity)
Repository->>Database: INSERT INTO...
Database-->>Repository: Success
Repository-->>AppService: Entity
AppService-->>Controller: DTO
Concept Explanations
Dependency Injection
## Understanding Dependency Injection
Dependency Injection (DI) is a design pattern where objects receive their dependencies from external sources rather than creating them internally.
**Simple Analogy**: Instead of a chef growing their own vegetables (tight coupling), vegetables are delivered to them (loose coupling). The chef doesn't need to know where vegetables come from.
**How it works in .NET**:
```csharp
// ❌ Without DI - tightly coupled
public class PatientService
{
private readonly PatientRepository _repository = new PatientRepository();
// Hard to test - can't mock the repository
}
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.
- 3mo ago First seen · 624 lines · 0 tokens per session scan A 5eef1d5be158
code-explain-templates is a command published in the GitHub repository thapaliyabikendra/ai-artifacts (25 stars, last pushed 8mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,477 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
code-explain-templates compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| code-explain-templatesthapaliyabikendra/ai-artifacts | Command | 25 | 8mo ago | Apache-2.0 | A | 0 | Claude Code |
| scriptsAmaniDawn/DGame | Command | 180 | 13d ago | MIT | A | 0 | Claude Code |
| abp-background-workersmss123/ABP-ai-skills | Command | 7 | 1mo ago | GPL-3.0 | A | 0 | Claude Code |
| testpeterblazejewicz/claude-plugins | Command | 8 | 5mo ago | MIT | A | 30 | Claude Code |
| azure-graph-dotnet:deploy-azureTheLobbi/Claude-m | Command | 20 | 2mo ago | none | A | 57 | Claude Code |
| csharp-exercise-clearaleksei-perchukov/coding-exercise-generator-ide-plugin | Command | 5 | 6mo ago | none | A | 15 | Claude Code |
| checklistgithub/spec-kit | Command | 154k | today | MIT | A | 13 | Claude Code |