Skip to content
Back to skills

Tsa Deps

ASecurity

Dependency / import graph analysis. Answer "what does this file import", "what imports this module", "what's the project's import topology", "show me the sitemap" without reading every file's import block. Use when: - "What does file X depend on" / "what imports module Y" - "Is module Z a leaf or a hub in the import graph" - "Show me the project sitemap" (which files glue what together) - "Are there circular imports" - Planning a module extraction: who'd you break Replaces: grep-for-import-...

  • 50 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 4, 2026
ai-agentspythonbashgit

Works with

  • cli
  • mcp

Security analysis

A100/100

Scanned September 4, 2026

npx -y skills add aimasteracc/tree-sitter-analyzer --skill tsa-deps --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tsa Deps?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tsa Deps
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aimasteracc-tsa-deps-tree-sitter-analyzer/badge)](https://www.skillsdirectory.com/skills/aimasteracc-tsa-deps-tree-sitter-analyzer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tsa-deps
version: 2.0.0
description: |
  Dependency / import graph analysis. Answer "what does this file import",
  "what imports this module", "what's the project's import topology",
  "show me the sitemap" without reading every file's import block.

  Use when:
  - "What does file X depend on" / "what imports module Y"
  - "Is module Z a leaf or a hub in the import graph"
  - "Show me the project sitemap" (which files glue what together)
  - "Are there circular imports"
  - Planning a module extraction: who'd you break

  Replaces: grep-for-import-statements + manual graph walking
  (~5k tokens for non-trivial repos) with 1 MCP call (~500 tokens).
allowed-tools:
  - mcp__tree-sitter-analyzer__health
  - mcp__tree-sitter-analyzer__structure
  - Bash
  - Read
---

# tsa-deps — Imports & module topology

## Tool routing

| Question                                | Tool                              |
|-----------------------------------------|-----------------------------------|
| One file's direct deps                  | `health action=deps`              |
| Project-wide import graph (who imports whom) | `health action=imports`      |
| Project topology (entry points, hubs)   | `structure action=sitemap`        |

## Procedure

### File-level deps

```yaml
health action=deps file_path="tree_sitter_analyzer/ast_cache.py" mode="file_deps"
# returns: {imports: [...], imported_by: [...], depth: 2}
```

`mode` options:
- `summary` — project-wide dependency summary (alias: `full`)
- `file_deps` — one file's graph (requires `file_path`)
- `blast_radius` — impact set for a file (alias: `blast`; requires `file_path`)
- `cycles` — circular dependencies

### Import graph (project-level)

```yaml
health action=imports language="python" limit=50
# returns: ranked list of import hubs + leaves
```

Use to find:
- **Hubs** (many things import this) — high blast radius if changed
- **Leaves** (no one imports this) — possibly dead, or a CLI entry point
- **Cycles** — circular imports needing breaking

### Sitemap

```yaml
structure action=sitemap
# returns: {entry_points: [...], hub_modules: [...], leaf_modules: [...]}
```

Useful as a "first look" right after `tsa-landing`.

## CLI equivalents

```bash
uv run tree-sitter-analyzer <file> --dependencies file_deps
uv run tree-sitter-analyzer --dependencies summary
uv run tree-sitter-analyzer --import-graph --import-graph-mode summary
uv run tree-sitter-analyzer --codegraph-sitemap
```

## Anti-patterns

- DON'T grep for `^import` / `^from` to build a graph — incomplete (misses
  conditional / lazy imports captured by the AST)
- DON'T worry about leaves at the start — they're often legitimate (CLI mains,
  examples). Focus on hubs.
- DON'T extract a hub module without first checking its `imported_by` list
  — you'll break dozens of callers.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.