Dead Code Removal with Knip
shift-editor/shift
Finds unused files, exports and class members with Knip, then verifies each candidate through reference tracing before removing anything, never using knip --fix.
A skill your agent uses when 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…
$ npx skills add zai-org/ZCode --skill dep-refs -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install zai-org/ZCode dep-refs --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/zai-org/ZCode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/dep-refs .claude/skills/dep-refs && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "dep-refs" agent skill from https://github.com/zai-org/ZCode/tree/main/.agents/skills/dep-refs into .claude/skills/dep-refs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dep-refs", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/zai-org/ZCode/tree/main/.agents/skills/dep-refsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add zai-org/ZCode --skill dep-refs -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install zai-org/ZCode dep-refs --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zai-org/ZCode.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/dep-refs .agents/skills/dep-refs && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "dep-refs" agent skill from https://github.com/zai-org/ZCode/tree/main/.agents/skills/dep-refs into .agents/skills/dep-refs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dep-refs", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add zai-org/ZCode --skill dep-refs -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install zai-org/ZCode dep-refs --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zai-org/ZCode.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/dep-refs .cursor/skills/dep-refs && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "dep-refs" agent skill from https://github.com/zai-org/ZCode/tree/main/.agents/skills/dep-refs into .cursor/skills/dep-refs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dep-refs", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/zai-org/ZCode.git --path .agents/skills/dep-refs--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add zai-org/ZCode --skill dep-refs -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install zai-org/ZCode dep-refs --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zai-org/ZCode.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/dep-refs .gemini/skills/dep-refs && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "dep-refs" agent skill from https://github.com/zai-org/ZCode/tree/main/.agents/skills/dep-refs into .gemini/skills/dep-refs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dep-refs", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install zai-org/ZCode dep-refsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add zai-org/ZCode --skill dep-refs -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/zai-org/ZCode.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/dep-refs .github/skills/dep-refs && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "dep-refs" agent skill from https://github.com/zai-org/ZCode/tree/main/.agents/skills/dep-refs into .github/skills/dep-refs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dep-refs", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add zai-org/ZCode --skill dep-refs -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install zai-org/ZCode dep-refs --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zai-org/ZCode.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/dep-refs .opencode/skills/dep-refs && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "dep-refs" agent skill from https://github.com/zai-org/ZCode/tree/main/.agents/skills/dep-refs into .opencode/skills/dep-refs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dep-refs", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
dep-refsA skill your agent uses when 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…
Dep Refs is an agent skill from zai-org/ZCode. Use when 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.
Its SKILL.md is about 550 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).
It sits in Development, covering Refactoring. It works with pnpm and TypeScript. The repository describes itself as: Z.ai's coding agent harness. Powerful, intelligent, extensible. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 29628c9. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pnpmjqFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Dep Refs loads about 552 tokens when it runs. Until then it costs about 78 tokens; SKILL.md has 215 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from zai-org/ZCode at commit 29628c9, republished under its Apache-2.0 licence (© zai-org). 215 words, ~552 tokens.
.claude/skills/dep-refs/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.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.
Start broad when deleting code:
pnpm knipUse knip to find likely unused exports, then inspect any risky or unclear export with dep:refs:
pnpm dep:refs packages/shared/src/remoteTarget.ts:stripRemoteTargetSecretsList all exports in a file when the exact symbol name is unknown:
pnpm dep:refs --list-exports packages/shared/src/remoteTarget.tsUse scoped scans for fast exploration only when the scope is intentionally limited:
pnpm dep:refs --scope packages/services packages/shared/src/remoteTarget.ts:stripRemoteTargetSecretsBefore claiming an export is safe to delete, prefer an unscoped dep:refs run so cross-package callers are not missed.
Use silent pnpm mode for machine-readable output, because normal pnpm output includes extra banner lines:
pnpm -s dep:refs packages/shared/src/remoteTarget.ts:stripRemoteTargetSecrets --json | jq .Use JSON when summarizing many symbols, feeding results to jq, or comparing references and reExports counts programmatically.
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.
© zai-org, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in .agents/skills/dep-refs of zai-org/ZCode.
Open the folder on GitHubat commit 29628c9
Dep Refs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Dep Refs this skillzai-org/ZCode | 7.6k | — | ~552 | Automated safety check: Pass | Apache-2.0 | |
| Dead Code Removal with Knipshift-editor/shift | 348 | — | ~1.8k | Automated safety check: Pass | Apache-2.0 | |
| Tabler Shared Lib Helperstabler/tabler | 42k | — | ~1.2k | Automated safety check: Pass | MIT | |
| Link Workspace Packagesnomcopter/react-mosaic | 4.8k | 6 repos | ~760 | Automated safety check: Pass | Custom licence | |
| Pnpm Engineteambit/bit | 18k | — | ~1.9k | Automated safety check: Pass | Custom licence | |
| Testing Changespnpm/pnpm | 37k | — | ~1.1k | Automated safety check: Pass | MIT |
shift-editor/shift
Finds unused files, exports and class members with Knip, then verifies each candidate through reference tracing before removing anything, never using knip --fix.
tabler/tabler
Moves logic out of Astro frontmatter into tested helper modules under shared/lib, with rules for naming, typing, deterministic demo data and sibling test files.
nomcopter/react-mosaic
Link workspace packages in monorepos (npm, yarn, pnpm, bun).
teambit/bit
Work on the pnpm Rust engine (@pnpm/napi, the pacquet crates) that bit install runs through.
pnpm/pnpm
Run the tests that cover a change in the pnpm repository, in the Rust workspace (pnpm/, pnpr/) or the TypeScript CLI (pnpm11/), and recognize the cases where a scoped run passes without testing…
SikandarJODD/cnblocks
Svelte 5 runes, snippets, SvelteKit patterns, and modern best practices for TypeScript and component development.
zai-org/ZCode
Apply the repository's architecture policy to code changes by generating a bounded context package, checking module and layer boundaries, and reporting baseline-aware violations.
zai-org/ZCode
Map a ZCode behavior change to current UI surfaces, state owners, protocol commands, persistence, and validation.
zai-org/ZCode
A skill your agent uses when opening, navigating, inspecting, testing, clicking, typing, filling, screenshotting, or verifying web pages and local HTTP targets (localhost, 127.0.0.1, ::1) inside…
zai-org/ZCode
A skill your agent uses when writing, debugging, or resubmitting a dynamic-workflow script for the CreateWorkflow tool: choosing subagent topology, typing subagent results, fanning out over files or…
Works with
Categories
A skill your agent uses when 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…. Dep Refs is an agent skill from zai-org/ZCode. Use when 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.
Dep Refs fits situations like: 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.
Run `npx skills add zai-org/ZCode --skill dep-refs -a claude-code`. Or copy the skill folder (.agents/skills/dep-refs in zai-org/ZCode) into .claude/skills/dep-refs in your project. Claude Code loads it when a task matches its description.
Run `npx skills add zai-org/ZCode --skill dep-refs -a codex`. Or copy the skill folder (.agents/skills/dep-refs in zai-org/ZCode) into .agents/skills/dep-refs in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zai-org/ZCode --skill dep-refs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dep-refs, .gemini/skills/dep-refs, .github/skills/dep-refs and .opencode/skills/dep-refs in your project.
Going by SKILL.md and its folder, Dep Refs needs the command-line tools its instructions call (pnpm and jq).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Dep Refs is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 552 tokens (SKILL.md is roughly 2.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Dep Refs: Dead Code Removal with Knip (shift-editor/shift, 348 stars), Tabler Shared Lib Helpers (tabler/tabler, 42k stars), Link Workspace Packages (nomcopter/react-mosaic, 4.8k stars) and Pnpm Engine (teambit/bit, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
zai-org (a GitHub organization) maintains it in zai-org/ZCode, which has 7,572 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on September 29, 2026.
Source: zai-org/ZCode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.