AGENT SKILL

dep-refs

Use when the agent needs to inspect TypeScript export references in the z-code workspace, list exports from a file, verify whether an export is unused before deletion, investigate who imports a symbol during refactors, or combine pnpm knip unused-export results with pnpm dep:refs symbol-level reference tracing.

License 许可
MIT
最近更新
2026-11-13
Stars
★ 253
Forks
20

01 前言 Front Matter

name
dep-refs
description
Use when the agent needs to inspect TypeScript export references in the z-code workspace, list exports from a file, verify whether an export is unused before deletion, investigate who imports a symbol during refactors, or combine pnpm knip unused-export results with pnpm dep:refs symbol-level reference tracing.
disable-model-invocation
true

02 资源文件 1

03 SKILL.md 正文

Dep Refs

Use the repository's pnpm dep:refs CLI to answer symbol-level questions before changing or deleting TypeScript exports. Run commands from the z-code repository root.

Workflow

Start broad when deleting code:

pnpm knip

Use knip to find likely unused exports, then inspect any risky or unclear export with dep:refs:

pnpm dep:refs packages/services/src/bots/botsService.ts:createBotsService

List all exports in a file when the exact symbol name is unknown:

pnpm dep:refs --list-exports packages/services/src/bots/botsService.ts

Use scoped scans for fast exploration only when the scope is intentionally limited:

pnpm dep:refs --scope packages/services packages/services/src/bots/botsService.ts:createBotsService

Before claiming an export is safe to delete, prefer an unscoped dep:refs run so cross-package callers are not missed.

JSON Mode

Use silent pnpm mode for machine-readable output, because normal pnpm output includes extra banner lines:

pnpm -s dep:refs packages/services/src/bots/botsService.ts:createBotsService --json | jq .

Use JSON when summarizing many symbols, feeding results to jq, or comparing references and reExports counts programmatically.

Interpreting Results

Treat References (0) and Re-exports (0) as "no static references found", not as proof that no dynamic usage exists. The script does not detect dynamic import() paths or string-based references.

If a symbol only appears under Re-exports, trace the outward barrel path before deleting. A re-export can still be part of the public surface even when there are no direct internal imports.

For refactors, report concrete callers with file and line from the CLI output, then decide whether to update callers, preserve the export, or delete it.

04 同仓库更多 Skills

ZCodium-project
ZCodium-project/ZCodium

plugin-mcp-ping

E2E workspace Plugin skill marker

★ 253
ZCodium-project
ZCodium-project/ZCodium

zcode-configuration-guide

Use when configuring ZCode's extension resources (MCP servers, slash commands, skills, hooks, and plugins) or instruction files such as AGENTS.md in the ZCode client. Explains where each resource is configured at the user and workspace scope, the discovery order, precedence, and merge rules, plus guidance on which location to choose. Use when someone asks how to add an MCP server, command, skill, hook, plugin, or AGENTS.md instructions, where a configuration file lives, why a configuration is not taking effect, or needs routing to a specific diagnostic skill.

★ 253
ZCodium-project
ZCodium-project/ZCodium

diagnosing-skills

Use to diagnose and fix ZCode skill configuration problems in the ZCode client. Applies when a skill is not discovered, is installed but does not trigger automatically, is shadowed by a higher-precedence skill of the same name, is disabled by configuration, has a SKILL.md frontmatter error, fails to load because its description is too long, or disappears because the plugin providing it is disabled. Provides the discovery order, how to inspect skills in the client, common pitfalls, and a step-by-step localization and repair workflow.

★ 253
ZCodium-project
ZCodium-project/ZCodium

diagnosing-plugins

Use to diagnose and fix ZCode plugin and marketplace problems in the ZCode client. Applies when a plugin is not listed, adding a marketplace or installing a plugin fails, a plugin is enabled but its skills or commands are missing, a built-in plugin still appears after being disabled, a plugin is not enabled as expected, a plugin.json manifest has a parse error, a plugin name is invalid, a dependency is unresolved or blocked across marketplaces, or a sensitive configuration value cannot be entered in the interface. Provides the plugin lifecycle, manifest schema, how to manage plugins in the client, and a step-by-step localization and repair workflow.

★ 253
ZCodium-project
ZCodium-project/ZCodium

diagnosing-mcp

Use to diagnose and fix ZCode MCP (Model Context Protocol) server configuration problems in the ZCode client. Applies when an MCP server will not connect, its tools (mcp__server__tool) do not appear, it shows as disabled or failed, connections time out, a command cannot be found, template variables are not expanded, or a server defined in a configuration file has no effect. Provides configuration locations, how to inspect status in Settings, common pitfalls, and a step-by-step localization and repair workflow.

★ 253
ZCodium-project
ZCodium-project/ZCodium

diagnosing-hooks

Use to diagnose and fix ZCode hook configuration problems in the ZCode client. Applies when a hook does not trigger, an event name is wrong, a matcher does not match a tool name, a script is not executable, template variables are not expanded, a timeout unit is mistaken (seconds versus milliseconds), the command and process field styles are mixed, a hook's JSON output fails validation, a hook blocks the session unexpectedly, or configuration-file hooks are not enabled. Provides configuration sources, the hooks.json schema, how to inspect hooks in the client, and a step-by-step localization and repair workflow.

★ 253