Wrap Third Party Libs logo

Wrap Third Party Libs

Organization
LedgerHQ
wrap-third-party-libs

Apps do not depend on third-party libraries directly: the lowest valid package owns each one. Read before adding a dependency to apps/*/package.json, importing a new npm package from an app, or bumping a library the apps use.

Overview

PublisherLedgerHQ
Repositoryledger-live
Skill namewrap-third-party-libs
Stars
622
Forks
491
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by LedgerHQ on GitHub. Read the source before you install it.

Installation

Install the Wrap Third Party Libs AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/wrap-third-party-libs
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LedgerHQ/ledger-live.git /tmp/ledger-live
mkdir -p .claude/skills
cp -r /tmp/ledger-live/.agents/skills/wrap-third-party-libs .claude/skills/wrap-third-party-libs
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Wrap Third Party Libs in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Wrap Third Party Libs on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Wrap Third Party Libs is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Wrap third-party libs below the apps

An app's package.json lists workspace packages and the exceptions below (framework singletons, the design system, tooling). A library that serves one capability (QR code, signature check, storage, id generation) belongs to a package below the app, which exposes a small API of our own.

Why

  • Every direct app dependency is a potential silent override. The renderer's resolve.modules puts the app's node_modules first, so the app's copy wins over the version a library declared for itself (@noble/curves v1 forced onto a v2 consumer crashed Desktop at boot).
  • Desktop and mobile each pick a different lib for the same job (qrcode vs react-native-qrcode-svg). One owner gives one behaviour and one test.
  • Bumping or swapping a lib touches one package, not two apps.

Rule

  1. Before adding a dependency to apps/*, look for an existing owner package. If none, create one.
  2. Place the owner in the lowest valid layer of the structure-flow table (shared, domain, features/platform, features/flow), for example:
    • business-agnostic (QR code, clipboard, linking, list reorder): shared/<name>, e.g. @shared/ui-qr-code
    • capability shared across flows or apps: features/platform/<name>
    • used by one flow or one domain: that features/flow or domain package
  3. The package declares the third-party lib in its own dependencies (catalog: when a catalog entry exists). Apps and other packages import the package by name, never the lib.
  4. The public API hides the lib: no lib types or instances in exports, so the lib can be replaced without touching callers.
  5. Add a test in the package that exercises the real lib, including the success path.

Examples

Existing app dependencies predate this rule and are migrated over time; do not add new ones.

  • shared/ui-qr-code (intent of the pattern; its API and placement are still under platform review): owns qrcode; apps render <QrCode /> (Desktop still declares qrcode until migrated).
  • #23097: @noble/curves and @trust/keyto moved out of Desktop into @features/platform-app-update; sslHelper.verify became a wrapper. Precedent for isolating a lib an app used once; the package is Desktop-only today, so it is not a placement model for new packages.

Exceptions

Keep a direct app dependency for libraries that must be a singleton across the bundle (react, react-dom, redux, react-router, styled-components, i18next), for the design system (@ledgerhq/lumen-*), and for build or tooling packages. Anything else goes behind a package; if you think it is an exception, ask in the PR before adding it.

Review

  • Does the PR add a runtime dependency to apps/*/package.json? Ask which package should own it.
  • Does an app import a library that a shared/ or features/platform/ package already wraps? Use the package.
  • Do two apps use different libs for the same job? Move both behind one package.

Frequently asked questions

What does the Wrap Third Party Libs AI skill do?

Apps do not depend on third-party libraries directly: the lowest valid package owns each one. Read before adding a dependency to apps/*/package.json, importing a new npm package from an app, or bumping a library the apps use.

Why use Wrap Third Party Libs on TypingMind?

Because you install it once and use it with any model. Wrap Third Party Libs is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Wrap Third Party Libs in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/wrap-third-party-libs. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Wrap Third Party Libs?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Wrap Third Party Libs?

As many as you like. As long as a model supports skills, you can use Wrap Third Party Libs with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Wrap Third Party Libs AI skill free?

Yes. It is published on GitHub by LedgerHQ under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇