# Deps

> Analyze .asmdef dependency relationships — Mermaid graph + dependency matrix + issue detection.

- **Type:** Skill
- **Install:** `agentstack add skill-tykisgod-quick-question-deps`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [tykisgod](https://agentstack.voostack.com/s/tykisgod)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [tykisgod](https://github.com/tykisgod)
- **Source:** https://github.com/tykisgod/quick-question/tree/main/skills/deps

## Install

```sh
agentstack add skill-tykisgod-quick-question-deps
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

Respond in the user's preferred language (detect from their recent messages, or fall back to the language setting in CLAUDE.md).

Analyze the .asmdef dependency relationships of all modules in the project, outputting a Mermaid diagram + dependency matrix + issue detection.

Arguments: $ARGUMENTS
- Optional: specific module names to focus on
- No arguments: analyze all .asmdef files in the project

## Execution Steps

### 1. Collect All .asmdef Files

Use Glob to find `Assets/**/*.asmdef`, excluding Tests and Editor asmdefs (filenames containing `.Tests.`, `.Editor.`, or `.PlayModeTests.`).

### 2. Build GUID → Name Mapping

For each .asmdef file:
- Read the .asmdef to get the `name` field
- Read the corresponding .asmdef.meta to get the `guid` field
- Build a GUID → Name lookup table

### 3. Parse Dependency Relationships

For each .asmdef:
- Read the GUIDs in the `references` array
- Convert to human-readable names via the lookup table
- Record: `ModuleA → [depends on ModuleB, depends on ModuleC]`

### 4. Output Mermaid Dependency Graph

Generate a Mermaid flowchart, arranged by layer from top to bottom:

````markdown
```mermaid
graph TD
    subgraph "Layer 0"
        Core
    end
    subgraph "Layer 1"
        Player
        AI
    end
    subgraph "Layer 2"
        UI
        Networking
    end

    Player --> Core
    AI --> Core
    UI --> Player
    Networking --> Core
```
````

- Normal dependencies: solid arrow `-->`
- Circular dependencies: red dashed `-.->|cycle|`
- Layer violations: orange bold `==>|violation|`

### 5. Output Dependency Matrix

Use a table to show module-to-module dependencies at a glance:

```markdown
| Module ↓ Depends on → | Core | Player | AI | UI | ... |
|------------------------|:----:|:------:|:--:|:--:|:---:|
| Core                   |  -   |        |    |    |     |
| Player                 |  ✓   |   -    |    |    |     |
| AI                     |  ✓   |        | -  |    |     |
| UI                     |      |   ✓    |    | -  |     |
```

### 6. Detect Issues

**Circular dependency detection:**
- Run DFS on the dependency graph to detect cycles
- If cycles exist, list the full circular path

**Layer violation detection (try in priority order):**
1. **Infer from .asmdef dependency graph** (default) — modules with no dependencies are Layer 0, modules depending only on Layer 0 are Layer 1, etc. This is the most accurate, reflecting actual code state
2. **Analyze using statements** — if no .asmdef files exist (pure directory-based project), scan `using` statements in .cs files, aggregate modules by namespace, and build a dependency graph from the using references
3. **Read from AGENTS.md** — if neither of the above can determine layers, read the manually defined architecture layers in `AGENTS.md` as a reference

Detect any cases where a lower layer depends on a higher layer.

### 7. Output Health Summary

```
### Dependency Health
- Total modules: N
- Average dependencies: X
- Most dependencies: ModuleName (Y dependencies)
- Circular dependencies: None / Found (list them)
- Layer violations: None / Found (list them)
```

### 8. Self-Check (Required)

After generating output, **review the Mermaid diagram and matrix yourself**:
- Is the Mermaid syntax valid (will it render)?
- Do the ✓ marks in the matrix match the dependency graph?
- Are the layer groupings reasonable?
- Are any modules missing?

If issues are found, fix them before presenting to the user.

## Optional Arguments

If the user specifies a module name (e.g. "Player"), only analyze the dependency chain for that module (both upstream and downstream) rather than a full analysis. The Mermaid diagram should only show related modules.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [tykisgod](https://github.com/tykisgod)
- **Source:** [tykisgod/quick-question](https://github.com/tykisgod/quick-question)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-tykisgod-quick-question-deps
- Seller: https://agentstack.voostack.com/s/tykisgod
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
