archguardian: Skill for Claude Code

.claude/skills/diagram/SKILL.md

diagram is a skill for Claude Code from ysfAskri/archguardian. It costs 10 tokens per session (343 once invoked), scanned A, original, MIT.

A command that creates a Mermaid diagram of how a project's modules or packages depend on one another. Mermaid is a text format that can be rendered as a diagram.

In plain words
What is it for?
Use it to document architecture, find entry points and leaf modules, inspect a monorepo—a repository containing multiple packages—and focus the diagram on selected files or packages.
Why use it?
It makes module boundaries and dependency directions easier to inspect than reading many import statements, and can reveal circular or unexpected dependencies.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is ysfAskri/archguardian's own configuration. It tells Claude Code how to work on archguardian itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything archguardian configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ysfAskri/archguardian. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ysfAskri/archguardian/master/.claude/skills/diagram/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ysfAskri/archguardian

Made for: Claude Code.

Wrote 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.

agentmods badge for diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/ysfaskri/archguardian/diagram/github.svg)](https://agentmods.dev/skills/ysfaskri/archguardian/diagram)
Your own site
<a href="https://agentmods.dev/skills/ysfaskri/archguardian/diagram"><img src="https://agentmods.dev/badge/skills/ysfaskri/archguardian/diagram/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.

agentmods 80×15 button for diagram

Your own site · 80×15
<a href="https://agentmods.dev/skills/ysfaskri/archguardian/diagram"><img src="https://agentmods.dev/badge/skills/ysfaskri/archguardian/diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 343 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00010 $0.00343
Opus 5 $0.00005 $0.00171
Sonnet 5 $0.00002 $0.00069
Haiku 4.5 $0.00001 $0.00034

Measured 9d ago against content hash cb341a893b61, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

diagram 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 9d 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.

.claude/skills/diagram/SKILL.md · 46 lines

What it actually says

archguardian diagram

Generate a Mermaid architecture diagram showing the project's dependency structure.

Instructions

  1. Run the diagram command:

    npx archguardian diagram --format mermaid $ARGUMENTS
    
  2. If the user specified a scope, include it:

    npx archguardian diagram --format mermaid --scope <glob>
    
  3. Show the Mermaid diagram output to the user in a fenced code block:

    <output from command>
    
  4. Explain the architecture layout shown in the diagram:

    • The main modules or packages and their boundaries
    • Key dependency directions (which modules depend on which)
    • Any circular dependencies or unexpected cross-layer imports
    • Entry points and leaf nodes in the dependency graph
  5. If the diagram is very large or cluttered, suggest scope filtering:

    • --scope "src/core/**" — Focus on a specific module
    • --scope "src/{core,analyzers}/**" — Compare two modules
    • --scope "**/*.ts" — Filter by file type

Tips

  • The Mermaid output can be rendered in GitHub Markdown, Notion, or any Mermaid-compatible viewer.
  • For monorepos, scope to individual packages to keep diagrams readable.
  • Use this alongside /impact to understand how changes propagate through the architecture.
  • Circular dependencies shown in the diagram are strong candidates for refactoring.
Changes

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.

  1. 9d ago First seen · 46 lines · 10 tokens per session scan A cb341a893b61

Subscribe to this mod's changes

diagram is a skill published in the GitHub repository ysfAskri/archguardian (4 stars, last pushed 6mo ago), licensed MIT. It adds 10 tokens to every session and 343 once invoked, about $0.0001 per session on Opus 5. 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-31.

Related

Other skills, from other repositories

repo-onboarding

Systematically map an unfamiliar codebase before changing it — entry points, build/test loop, conventions, data flow. Use when starting work in a repo you haven't seen, or asked "how does this codebase work?".

jnMetaCode/skillet · 48 tokens

code-to-diagram

Analyze codebases and automatically generate architecture diagrams, flowcharts, and org charts. Uses AST parsing to map import dependencies for Python, JS/TS, Go, and Java, outputting Mermaid or SVG files. Triggered when users ask to visualize code architecture, understand dependencies, draw a flowchart, or create a…

zebbern/claude-code-guide · 74 tokens

remindb-setup

Config-first setup wizard for a remindb MCP server — run it as /remindb-setup (interactive), /remindb-setup automode (hands-off), or /remindb-setup only-config (bridge hosts: author .remindb/ only, no env wiring). Two passes. First-time (no server attached yet): detect the host, author the .remindb/ config…

radimsem/remindb · 202 tokens

pre-edit-safety-gate

Prepare a safe, current, and maintainable code change before editing. Use before a cohesive code or workflow change to assess the request and existing structure, then choose a local change, reuse, extension, or necessary refactor with clear ownership. Do not use to block ordinary TDD or authorized refactors.

rexleimo/aios · 68 tokens

remember

Front door for long-term memory backed by a remindb MCP server. Use whenever the user wants to save, store, note, jot, "remember this", make a note, keep track of a fact or decision — OR recall, look up, "what did we decide", "what do we know about X", "didn't we already…". Fires on the generic remember/recall intent…

radimsem/remindb · 113 tokens

nosql-database-design

Designs a NoSQL data model by leading with access pattern analysis. Covers DynamoDB single-table design (PK/SK/GSI) and MongoDB embedding vs referencing, consistency models, and capacity planning. Invoked when the user asks to design a DynamoDB schema, MongoDB data model, or NoSQL data model.

soulcodex/agentic · 71 tokens