Back to skills
SKILL.md
Dep Refs
ASecurity列出文件导出、定位符号调用与重导出,或在重构、改名和删除前复核未使用导出及跨包消费者。
- 3 stars
- 0 votes
- 0 copies
- 0 views
- Added November 11, 2026
Security analysis
100/100Pro scans all 4 files and shows the line behind each finding
npx -y skills add TeFuirnever/azhou-ai-hub --skill dep-refs --agent claude-codeAre you the author of Dep Refs?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tefuirnever-dep-refs)---
name: dep-refs
description: "列出文件导出、定位符号调用与重导出,或在重构、改名和删除前复核未使用导出及跨包消费者。"
---
# dep-refs
本 Skill 仅用于当前项目。用户授权、项目 AGENTS.md 和实际宿主能力优先。
1. 确认仓库、版本、文件和公开符号。符号未知时先列出该文件的导出;批量删除时,已有的 unused-export 检查只负责给出候选,随后逐个追踪引用。
2. 优先使用已挂载且适用的代码索引;否则用 `rg` 搜索,再读定义及调用上下文。分别记录直接引用、别名和重导出。不要假设本项目安装了 `pnpm dep:refs`、Knip 或 ZCode 的 TypeScript 解析器,也不要为一次查询擅自安装。
3. 局部扫描只用于探索。删除前扩展到全项目、各包公开出口、manifest、脚本、生成物及其他语言消费者。零直接引用但存在 barrel 重导出时,沿出口继续追踪外部使用与兼容承诺。
4. 静态零引用只表示“扫描范围内未发现静态引用”。另查动态导入、字符串/配置加载、反射、插件注册、构建产物和仓外扩展。缺少语义索引时明确文本搜索不能可靠穷举别名与类型关系。
5. 批量结果尽量使用工具原生结构化输出,确认没有混入启动横幅且解析成功;区分 references 与 re-exports,不凭文本计数合并。无此接口时用人工表列出符号、定义位置、具体消费者文件/行、引用种类、搜索范围和盲区。
6. 根据证据选择更新消费者、保留兼容导出或删除。运行真实入口与受影响消费者的验证;不把搜索无结果当成删除许可。
来源、适配边界和许可证见 [provenance.md](provenance.md)。
Files in this skill
- LICENSE-ZCode
- NOTICE-ZCode.md
- SKILL.md
- provenance.md
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.