AGENT SKILL
affected
Analyze which monorepo packages and apps are affected by current changes
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- affected
- type
- analysis
- version
- v0.1
- description
- Analyze which monorepo packages and apps are affected by current changes
- argument-hint
- [optional: specific commit range or branch to analyze]
02 资源文件 1
- 参考文档CHANGELOG.md311 B
03 SKILL.md 正文
Affected
Determine which packages and apps in the monorepo are affected by current changes. Useful before committing, testing, or deploying to know the blast radius.
Process
-
Determine the change set:
- If
$ARGUMENTSspecifies a commit range or branch, usegit difffor that range. - Otherwise, use
git diff HEAD(staged + unstaged changes). - If no changes exist, check for unpushed commits with
git log @{u}..HEAD.
- If
-
Read the monorepo structure:
- Check for
turbo.json,pnpm-workspace.yaml,lerna.json, orpackage.jsonworkspaces to understand the package graph. - List all packages/apps and their locations.
- Check for
-
Map changes to packages:
- For each changed file, determine which package it belongs to.
- List directly changed packages.
-
Compute transitive dependents:
- Read
package.jsonof each directly changed package to find itsname. - Search other packages'
package.jsonfiles for dependencies on the changed packages. - Build the full dependency chain (direct → transitive).
- Read
-
Check for cross-cutting changes:
- Root config changes (
tsconfig.json,turbo.json,.env*,tailwind.config.*) affect all packages. - Shared package changes (e.g.,
packages/ui,packages/config) cascade to consumers.
- Root config changes (
-
Identify what to test:
- If Turborepo: suggest
turbo run test --filter=...[HEAD~1]or equivalent. - Otherwise: list the test commands for each affected package.
- If Turborepo: suggest
Output
Directly Changed
packages/foo— 3 files changed (briefly what)apps/bar— 1 file changed (briefly what)
Transitively Affected
apps/web— depends onpackages/fooapps/admin— depends onpackages/fooviapackages/shared
Cross-Cutting
tsconfig.base.jsonchanged — affects all TypeScript packages
Recommended Test Commands
# commands to test affected packages
Constraints
- Do not run tests — only analyze and recommend.
- If the monorepo tool is Turborepo, prefer Turbo-native filtering where possible.
- Keep the output concise — list packages, not individual files (unless scoped to a single package).
Default Shipping Contract
Follow the shared shipping contract convention in CLAUDE.md.
04 同仓库更多 Skills
source-checkout-allowed
Valid source-checkout-only fixture.
★ 1
deck-install-valid
Valid deck install fixture.
★ 1
codex-pack-guard-valid
Valid Codex Pack Availability Guard fixture.
★ 1
codex-missing-skill-valid
Valid Codex missing skill fallback fixture.
★ 1
codex-base-skill-fallback-valid
Valid Codex base skill fallback fixture.
★ 1
claude-pack-guard-valid
Valid Claude Pack Availability Guard fixture.
★ 1