Skip to content
Back to skills

Quality No Dead Code Unused Exports Cleanup

ASecurity

Removes unused public exports from JavaScript and TypeScript code while preserving public API contracts, barrel behavior, and cross-package compatibility.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 2, 2026
developmentjavascripttypescriptgojavanodeapi

Works with

  • api

Security analysis

A100/100

Scanned October 2, 2026

npx -y skills add janpereira-dev/ngAutoPilot --skill quality--no-dead-code--unused-exports-cleanup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Quality No Dead Code Unused Exports Cleanup?

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

Security grade badge for Quality  No Dead Code  Unused Exports Cleanup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/janpereira-dev-quality-no-dead-code-unused-exports-cleanup/badge)](https://www.skillsdirectory.com/skills/janpereira-dev-quality-no-dead-code-unused-exports-cleanup)

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
---
id: quality.no-dead-code.unused-exports-cleanup
name: Unused Exports Cleanup
description: >
  Removes unused public exports from JavaScript and TypeScript code while preserving public API contracts, barrel behavior, and cross-package compatibility.
stack:
  - JavaScript
  - TypeScript
category: no-dead-code
status: stable
version: 0.10.0
owner: NgAutoPilot
triggers:
  - unused exports
  - export cleanup
  - public api cleanup
  - barrel exports
  - dead exports
compatibility:
  runtime:
    browser: true
    node: true
---

# Unused Exports Cleanup

## Purpose

Use this skill to remove unused public exports without breaking real consumers.

The goal is to reduce API surface while keeping shared contracts stable.

The core rule is simple:

```txt
Remove unused exports only after verifying they are truly unused.
```

## When to Use

Use this skill when:

- exports are no longer referenced
- a public API has grown stale
- barrels are accumulating dead surface
- monorepo libraries need smaller interfaces

## Do

Check:

- direct imports
- barrel re-exports
- package consumers
- generated usage
- test-only references

Confirm the export is not part of an external contract.

## Do Not

Avoid deleting exports that are part of a published API.

Avoid assuming “unused in this repo” means globally unused.

Avoid broad API rewrites while cleaning one export.

## Review Checklist

- [ ] The export is truly unused.
- [ ] Public API compatibility was checked.
- [ ] Barrel behavior is preserved or updated safely.

## Expected Output

1. Verify usage.
2. Confirm API impact.
3. Remove only dead exports.
4. Keep contract stability in mind.
5. Validate imports and builds.

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…