agentleFS
ZCodium-projectZCodium-project/ZCodium/.agents/skills/dep-refs/SKILL.md

dep-refs

Skill247 starsChanged 10 days agoMITView on GitHub

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.

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the repository's pnpm dep:refs CLI to answer symbol-level questions before changing or deleting TypeScript exports.

    line 9
  2. Distinctive:

    Start broad when deleting code:

    line 13
  3. Very specific:

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

    line 19
  4. Distinctive:

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

    line 31
  5. Very specific:

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

    line 37
  6. Very specific:

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

    line 41
  7. Very specific:

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

    line 47
  8. Very specific:

    Treat References (0) and Re-exports (0) as "no static references found", not as proof that no dynamic usage exists.

    line 51
  9. Very specific:

    If a symbol only appears under Re-exports, trace the outward barrel path before deleting.

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
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.

Download now (ZIP)

Trending

Steady: 2 new projects took it in the last 4 weeks, 1× the 4 weeks before.thin data

Week of Aug 30: 0 new projectsWeek of Sep 6: 0 new projectsWeek of Sep 13: 0 new projectsWeek of Sep 20: 2 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 1 new projectWeek of Oct 18: 1 new project
Aug 2026Sep 2026Oct 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 4 in all, so this is a hint, not a trend.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.