AgentSkillsCN

workspace-affected

展示项目的依赖关系图——哪些项目依赖于它,又有哪些项目依赖于它。当用户询问“什么依赖于X”“受哪些变更影响”或“依赖关系图”时,可使用此技能。

SKILL.md
--- frontmatter
name: workspace-affected
description: Show dependency graph for a project - what depends on it and what it depends on. Use when user asks "what depends on X", "affected by changes", or "dependency graph".

Skill: Workspace Affected

Description

Show the dependency graph for a project - what depends on it and what it depends on. Useful for understanding the impact of changes.

Arguments

  • [project] - Project to analyze (defaults to current project)

Instructions

When the user wants to see affected projects:

Step 1: Identify Target Project

Use the provided project name or detect from current directory.

Step 2: Parse Relationships

Read the ## Relationships section from WORKSPACE.md:

markdown
## Relationships
- admin -> api (REST client, consumes /api/v1/*)
- homepage -> api (product catalog, consumes /api/v1/products)
- mobile -> api (REST client, consumes /api/v1/*)

Format: consumer -> provider (description)

Step 3: Build Dependency Graph

For the target project, identify:

  1. Dependents (what depends on this project)
  2. Dependencies (what this project depends on)

Step 4: Display Graph

code
🔗 Dependency graph for: api

Projects that depend on api (will be affected by changes):
  ├── admin (REST client, consumes /api/v1/*)
  ├── homepage (product catalog, consumes /api/v1/products)
  └── mobile (REST client, consumes /api/v1/*)

Projects that api depends on:
  └── (none)

Impact summary:
  • Changes to api may affect 3 projects
  • Consider running tests in: admin, homepage, mobile

Use Cases

  • Before making breaking changes: "I'm changing the API response format, what will break?"
  • Planning deployments: "What order should I deploy these changes?"
  • Understanding architecture: "How do these projects connect?"