Skip to content
Back to skills

Dep Refs

ASecurity

Use when needs to inspect TypeScript export references in the ccbuddy 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.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 2, 2026
ai-agentstypescriptbash

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 2, 2026

npx -y skills add ccbud/CCBuddy --skill dep-refs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dep Refs?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dep Refs
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ccbud-dep-refs/badge)](https://www.skillsdirectory.com/skills/ccbud-dep-refs)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dep-refs
description: Use when needs to inspect TypeScript export references in the ccbuddy 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
---

# 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 ccbuddy repository root.

## Workflow

Start broad when deleting code:

```bash
pnpm knip
```

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

```bash
pnpm dep:refs packages/shared/src/remoteTarget.ts:stripRemoteTargetSecrets
```

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

```bash
pnpm dep:refs --list-exports packages/shared/src/remoteTarget.ts
```

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

```bash
pnpm dep:refs --scope packages/services packages/shared/src/remoteTarget.ts:stripRemoteTargetSecrets
```

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:

```bash
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.

## 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.

Files in this skill

  • SKILL.md2.2 KB
  • agents/openai.yaml212 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.