Module Resolution logo

Module Resolution

OrganizationPopular
live-codes
module-resolution

Import npm, deno.land/x, jsr, and GitHub modules without build steps using automatic CDN resolution, custom import maps, and CDN provider prefixes. Load this skill when using bare module imports, configuring CDN providers, or resolving import conflicts.

Overview

Publisherlive-codes
Repositorylivecodes
Skill namemodule-resolution
Stars
1.5K
Forks
271
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 live-codes on GitHub. Read the source before you install it.

Installation

Install the Module Resolution 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/live-codes/livecodes/tree/develop/.agents/skills/livecodes/module-resolution
  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/live-codes/livecodes.git /tmp/livecodes
mkdir -p .claude/skills
cp -r /tmp/livecodes/.agents/skills/livecodes/module-resolution .claude/skills/module-resolution
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Module Resolution 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 Module Resolution 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 Module Resolution 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.

LiveCodes — Resolve Modules

LiveCodes automatically resolves bare module imports to CDN URLs using import maps. Use npm packages and other modules without npm install or build steps.

Setup

javascript
import { createPlayground } from 'livecodes';

// Bare imports work automatically
createPlayground('#container', {
  config: {
    script: {
      language: 'javascript',
      content: `
import { v4 } from 'uuid';           // npm module
import React from 'react';            // npm module
import { useState } from 'react';     // Named import
console.log(v4());
      `,
    },
  },
});

Core Patterns

Import npm packages

javascript
// Default: uses esm.sh CDN
import { v4 } from 'uuid';
import React from 'react';
import { useState, useEffect } from 'react';
import { format } from 'date-fns';

// Specifying version
import React from 'react@18'; // React 18.x
import React from 'react@18.2.0'; // Exact version
import _ from 'lodash@4.17.21'; // Lodash specific version

Use different CDN providers

javascript
// esm.sh (default)
import React from 'react';
import React from 'esm.sh:react';

// Skypack
import React from 'skypack:react';

// jsDelivr
import React from 'jsdelivr:react';

// unpkg
import React from 'unpkg:react';

// Deno bundle
import { uuid } from 'deno:uuid';

// Full URL imports work too
import React from 'https://esm.sh/react@18';

Import from Deno, GitHub, JSR

javascript
// Deno.land/x (TS files auto-bundled)
import { uuid } from 'https://deno.land/x/uuid/mod.ts';

// JSR (Deno's npm-compatible registry)
import { yassify } from 'jsr:@kwhinnery/yassify';

// GitHub files (auto-bundled)
import { flatten } from 'https://github.com/remeda/remeda/blob/master/src/flatten.ts';

// Skip bundling with #nobundle
import { flatten } from 'https://github.com/remeda/remeda/blob/master/src/flatten.ts#nobundle';

// pkg.pr.new (unpublished packages)
import { Bench } from 'pr:tinybench@a832a55';

Custom import maps

javascript
// Via SDK config
createPlayground('#container', {
  config: {
    imports: {
      'my-lib': 'https://my-cdn.com/lib.js',
      'my-lib/utils': 'https://my-cdn.com/utils.js',
      'my-private-package': 'https://my-server.com/package/index.js',
    },
    script: {
      language: 'javascript',
      content: `
import { something } from 'my-lib';
import { helper } from 'my-lib/utils';
      `,
    },
  },
});

// Via custom settings in standalone app
// Settings → Custom Settings:
{
  "imports": {
    "my-lib": "https://my-cdn.com/lib.js"
  }
}

Change default CDN

javascript
const config = {
  customSettings: {
    defaultCDN: 'skypack', // Use Skypack for all bare imports
  },
  script: {
    language: 'javascript',
    content: `import React from 'react'; // Now uses skypack`,
  },
};

Import CSS from script

javascript
// URL ending in .css becomes <link>
import 'https://unpkg.com/github-markdown-css/github-markdown.css';

// Bare import for CSS
import 'github-markdown-css/github-markdown.css';
// Becomes: <link href="https://unpkg.com/github-markdown-css/github-markdown.css">

// Import compiled CSS from style editor
import styles from './style.css';
console.log(styles); // CSS string

Common Mistakes

HIGH Same module from different CDNs conflicts

Wrong:

javascript
// React from different CDNs are DIFFERENT instances
import React from 'esm.sh:react'; // React instance A
import { createRoot } from 'skypack:react-dom/client'; // React instance B
// BREAKS: createRoot expects React instance A

Correct:

javascript
// Always use same CDN (or no prefix = default)
import React from 'react';
import { createRoot } from 'react-dom/client';

// Or explicit same CDN
import React from 'esm.sh:react';
import { createRoot } from 'esm.sh:react-dom/client';

Module instances from different CDNs are separate. React context, hooks, and component state require the same instance.

Source: docs/docs/features/module-resolution.mdx — CDN Providers caution

MEDIUM CommonJS require works but ESM preferred

Works but not recommended:

javascript
const { v4 } = require('uuid'); // Works, converted to ESM
const React = require('react'); // Works

Preferred:

javascript
import { v4 } from 'uuid';
import React from 'react';

LiveCodes converts require to ESM imports, but explicit ESM is clearer and matches local development.

Source: docs/docs/features/module-resolution.mdx — CommonJS Modules section

LOW Not using #nobundle for pre-bundled URLs

When you want raw module URLs instead of bundling:

javascript
// Without #nobundle, this gets bundled by bundlejs.com
import { flatten } from 'https://github.com/remeda/remeda/blob/master/src/flatten.ts';

// With #nobundle, get the raw URL
import { flatten } from 'https://github.com/remeda/remeda/blob/master/src/flatten.ts#nobundle';

Use #nobundle when the URL already serves bundled code or when you want to avoid bundling overhead.

Source: docs/docs/features/module-resolution.mdx — GitHub/GitLab/Bitbucket section

CDN Provider Reference

PrefixCDNURL Format
(none)esm.shhttps://esm.sh/{package}
esm.sh:esm.shhttps://esm.sh/{package}
skypack:Skypackhttps://cdn.skypack.dev/{package}
jsdelivr:jsDelivrhttps://cdn.jsdelivr.net/npm/{package}
unpkg:unpkghttps://unpkg.com/{package}?module
bundle:bundlejshttps://deno.bundlejs.com/?file&q={package}
deno:bundlejshttps://deno.bundlejs.com/?file&q={url}
jsr:esm.sh (JSR)https://esm.sh/jsr/{package}
pr:esm.sh (pkg.pr.new)https://esm.sh/pr/{package}

How It Works

  1. Bare imports (import x from 'package') are resolved via import maps
  2. Import map maps bare specifiers to full CDN URLs
  3. CDN (default: esm.sh) serves ESM versions of npm packages
  4. Deno/GitHub URLs ending in .ts/.tsx/.jsx are bundled via bundlejs.com
  5. CommonJS require() calls are transpiled to ESM imports

Frequently asked questions

What does the Module Resolution AI skill do?

Import npm, deno.land/x, jsr, and GitHub modules without build steps using automatic CDN resolution, custom import maps, and CDN provider prefixes. Load this skill when using bare module imports, configuring CDN providers, or resolving import conflicts.

Why use Module Resolution on TypingMind?

Because you install it once and use it with any model. Module Resolution 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 Module Resolution in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/live-codes/livecodes/tree/develop/.agents/skills/livecodes/module-resolution. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Module Resolution?

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 Module Resolution?

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

Is the Module Resolution AI skill free?

Yes. It is published on GitHub by live-codes 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 👇