Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    API Contract Planner — Know What You Can Deprecate

    1

    Map exported surfaces, find hidden deep-import consumers, and identify third-party type leaks for safe deprecation.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    API Contract Planner — Know What You Can Deprecate

    API Contract Planner — Know What You Can Deprecate

    Example session with this skill installed

    Map the public contract for the 'ui-components' package in this repo. I need to know what is safe to deprecate before the v2 release.

    • Read your context and instructions
    • Compiled the api contract planner

    I have analyzed the ui-components package surface and mapped all consumers within the repository. The analysis found 12 exports, 4 of which are "hidden" (not in the barrel file) and 2 that leak types from the axios package.

    API Contract Map: ui-components

    CategoryCountStatus
    Published Surface8Symbols re-exported in src/index.ts
    Hidden Surface4Reachable via deep import; 1 is actively used
    Unused Candidates3Confirmed zero usages in this repository
    External Leaks2Public types depending on axios

    The Retirement Order

    1. LegacyButton (High Priority): Exported from src/atoms/Button.ts. 0 consumers found. Safe to remove.

    OldThemeConfig (Medium Priority): Hidden export in src/theme/types.ts. 0 consumers found. Recommend internalizing.
    3.

    DataFetcher (Low Priority): Published export. 2 consumers found. Deprecation warning required as it leaks AxiosRequestConfig.

    Third-Party Exposure

    • FetchOptions in src/api.ts leaks AxiosResponse. Upgrading axios will break consumers of this package.
    • ClientInstance in src/client.ts leaks AxiosInstance.

    Hidden Surface Details

    • InternalState is exported from src/state.ts but not in the barrel. services-pkg is deep-importing this symbol. Do not remove without refactoring services-pkg.

    Next steps

    • Review the LegacyButton removal to ensure no external apps rely on it.
    • Move InternalState into the barrel file or refactor the consumer to use the public API.
    • Wrap the axios types in internal interfaces to plug the external leaks.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Managing a growing library or SDK often leads to "barrel file" blindness. You think you know your public API because you checked index.ts, but consumers might be deep-importing internal files or relying on leaked third-party types. This creates a maintenance nightmare where you cannot deprecate code for fear of breaking invisible dependencies.

    This skill maps the actual exported surface of a package, identifying what is published, what is hidden, and what is safely removable. It identifies every exported symbol, traces it to its specific file, and calculates usage counts across the repository. The result is a prioritized retirement plan that lets you prune your codebase with confidence.

    What it does

    • Surface mapping identifies every exported symbol and its originating file beyond just the barrel exports.
    • Consumer tracing locates every internal usage of a symbol, including deep imports that bypass official entry points.
    • Leak detection flags public types that expose third-party package dependencies, preventing accidental breaking changes during upgrades.
    • Hidden contract identification highlights internal modules reachable by consumers but not explicitly published.
    • Retirement planning generates an ordered list of unused exports ready for deprecation or removal.

    How it works

    1. Frame the package by identifying the source directory, manifest, and entry points.
    2. Scan the surface using agent-context or manual file inspection to list all publicApi symbols and internal dependencies.
    3. Map consumers via git grep to find every symbol usage and deep import within the workspace.
    4. Assess exposure by checking if exported signatures depend on external types like Pool, Request, or Client.
    5. Generate the map using a structured template that ranks exports by risk and usage.

    Frameworks & tools

    The skill is optimized for TypeScript and JavaScript monorepos or libraries. It uses git for consumer mapping and integrates with the ai-agent-context CLI for deep static analysis of exports and external dependency leaks.

    Why this beats prompting it yourself

    Generic prompts often stop at the barrel file or miss deep imports that lead to breaking changes. This skill follows a rigorous multi-phase method to verify the "hidden" contract and identify third-party type leaks that standard grep-based analysis ignores.

    Use cases

    • Deprecating code by finding exports that have zero consumers across the entire repository.
    • Library auditing to see which internal types are leaking into the public API signature.
    • Refactoring preparation to determine the blast radius of changing a specific exported symbol.
    • Monorepo cleanup to find internal packages that are deep-importing from restricted modules.

    Known limitations

    Analysis is strictly read-only and limited to the current repository. It cannot detect usages in external private repositories or published packages consumed by third parties.

    Analysis is read-only and limited to the local repository. It cannot detect consumers in external codebases or third-party applications. CLI-driven deep analysis requires ai-agent-context.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 28 days ago

    Requires

    ai-agent-context
    Node.js
    agent-context
    Git

    Permissions

    Terminal / Shell
    Network Access
    Read Files
    Write Files
    Listed28 days ago

    What's inside

    Frequently Asked Questions

    The skill maps your entire export surface, identifying deep-imports that bypass your main index files and flagging third-party types that have 'leaked' into your public API, which standard linters often miss.

    It is optimized for TypeScript and JavaScript environments, specifically designed to work within monorepos or complex library structures that utilize 'ai-agent-context' for deep static analysis.

    The analysis is read-only and uses local tools like git grep to map consumers, meaning it identifies potential breaking changes without ever modifying your source code.

    You receive the full skill configuration, including the structured templates for retirement planning and the multi-phase execution logic compatible with leading AI agent frameworks.

    While it excels at mapping internal monorepo dependencies, it cannot detect usages in external private repositories or third-party applications that have already installed your published package.

    New in Code Quality & Review