dep-refs

GitHub

在重构或删除代码前,追踪 TypeScript 导出、导入和重新导出的依赖关系。通过语言服务和 rg 命令识别实际调用者,确保变更安全。

.agents/skills/dep-refs/SKILL.md BytePioneer-AI/codex-host

触发场景

重构接口定义 删除不再使用的代码或导出 检查模块依赖边界

安装

npx skills add BytePioneer-AI/codex-host --skill dep-refs -g -y
更多选项

非标准路径

npx skills add https://github.com/BytePioneer-AI/codex-host/tree/main/.agents/skills/dep-refs -g -y

不安装直接使用

npx skills use BytePioneer-AI/codex-host@dep-refs

指定 Agent (Claude Code)

npx skills add BytePioneer-AI/codex-host --skill dep-refs -a claude-code -g -y

安装 repo 全部 skill

npx skills add BytePioneer-AI/codex-host --all -g -y

预览 repo 内 skill

npx skills add BytePioneer-AI/codex-host --list

SKILL.md

Frontmatter
{
    "name": "dep-refs",
    "description": "Trace TypeScript exports, imports, and re-exports in codexhost before refactoring interfaces or deleting code. Use available symbol tooling and repository searches to identify actual callers."
}

Export and reference tracing

Work from the repository root. The ZCode-specific pnpm dep:refs and pnpm knip commands are not installed here; use current tools and package exports rather than adding dependencies for a lookup.

  1. Read the target declaration and owning package's package.json exports. Follow its public entrypoint and any re-export chain.
  2. Prefer a TypeScript language-service references query when the session provides one. Ensure it covers workspace callers, including packages/adapters/*, scripts and tests.
  3. Use rg to find candidate references, then inspect aliases, namespace imports, re-exports and relevant consumers. For example:
rg -n --glob '*.{ts,tsx,mts,cts,mjs,js,json}' '\bHarnessAdapter\b' packages tests tools scripts
rg -n --glob '*.{ts,tsx,mts,cts,mjs,js,json}' '@codexhost/harness-adapter' packages tests tools scripts
  1. For a deletion, search the whole repository, including hidden configuration when relevant. Check public exports, dynamic loading, plugin manifests, string-based dispatch and generated consumers. Read the current boundary checker before changing dependency directions.
  2. Report concrete callers with paths and lines, re-exported public surfaces, and the limits of the search. Zero text matches or zero static references is not proof that an externally consumed export can be removed.

After changing an interface, validate its actual consumers with the applicable typecheck/build and focused tests from package scripts. This skill is read-only unless the user has also requested an implementation change.

版本历史

  • 3df9bd2 当前 2026-09-22 01:09

同 Skill 集合

.agents/skills/agent-browser/SKILL.md
.agents/skills/ai-elements/SKILL.md
.agents/skills/architecture-governance/SKILL.md
.agents/skills/codexhost-add-harness/SKILL.md
.agents/skills/codexhost-pr-triage/SKILL.md
.agents/skills/codexhost-update-impact-audit/SKILL.md
.agents/skills/control-browser/SKILL.md
.agents/skills/dogfood/SKILL.md
.agents/skills/feature-boundary-planner/SKILL.md
.agents/skills/react-best-practices/SKILL.md
.agents/skills/web-gui-tester/SKILL.md
.agents/skills/electron/SKILL.md

元信息

文件数
0
版本
3df9bd2
Hash
943176c9
收录时间
2026-09-22 01:09

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-22 11:35
浙ICP备14020137号-1