Agent skill
extract-dependencies
Analyze imports and identify all module dependencies. Use when mapping project structure.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/devops/extract-dependencies
SKILL.md
Extract Dependencies
Analyze import statements and identify all external and internal module dependencies in codebase.
When to Use
- Understanding module coupling
- Planning dependency updates
- Identifying circular dependencies
- Generating dependency graphs
Quick Reference
# Python dependency extraction
grep -r "^import\|^from" --include="*.py" . | sort | uniq
# Generate dependency graph
pipdeptree
# Check for circular dependencies
python3 -c "import ast; [print(f.name) for f in ast.walk(ast.parse(open('file.py').read())) if isinstance(f, ast.Import)]"
Workflow
- Scan imports: Extract all import statements from codebase
- Categorize dependencies: Separate external, internal, standard library
- Map relationships: Create graph of which modules import which
- Identify chains: Trace dependency chains (A→B→C)
- Report analysis: Document dependency structure and issues
Output Format
Dependency analysis:
- External dependencies (with versions)
- Internal module dependencies
- Dependency graph (text or ASCII art)
- Circular dependencies (if found)
- Recommended import order
- Unnecessary or redundant dependencies
References
- See
check-dependenciesskill for validation - See
analyze-code-structureskill for module organization - See pixi.toml for declared project dependencies
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?