Agent skill

Markbind Typescript Migration

by MarkBind in MarkBind/markbind

Complete guide for migrating JavaScript files to TypeScript in the MarkBind project, including the two-commit strategy, import/export syntax conversion, and best practices.

MITAuto-check passedDevelopment

Install Markbind Typescript Migration

skills CLI
$ npx skills add MarkBind/markbind --skill markbind-typescript-migration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install MarkBind/markbind markbind-typescript-migration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/MarkBind/markbind.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/markbind-typescript-migration .claude/skills/markbind-typescript-migration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
markbind-typescript-migration
GitHub stars
158
Token cost
~2k tokens
SKILL.md length
797 words
Files
6 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Complete guide for migrating JavaScript files to TypeScript in the MarkBind project, including the two-commit strategy, import/export syntax conversion, and best practices.

  • Works in 4 steps: Planning → Preparation → "Rename" Commit → …
  • Migrating .js files to .ts in MarkBinds core package
  • SKILL.md covers Critical Requirements, Quick Start Checklist, Migration Workflow Overview and When to Migrate, plus 6 more sections
  • Calls npm and git

What it does

Markbind Typescript Migration is an agent skill from MarkBind/markbind. Complete guide for migrating JavaScript files to TypeScript in the MarkBind project, including the two-commit strategy, import/export syntax conversion, and best practices. Use when migrating .js files to .ts in MarkBind's core package, preparing TypeScript migration pull requests, or understanding the Rename+Adapt commit workflow required for preserving git history.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/adapt-commit.md`, `references/import-export-syntax.md` and `references/preparation.md`).

It sits in Development, covering Git workflow and Pull requests. It works with TypeScript, JavaScript, npm and Git. The repository describes itself as: MarkBind is a tool for generating content-heavy websites from source files in Markdown format. The licence is MIT.

When your agent uses it

  • Migrating .js files to .ts in MarkBinds core package
  • Preparing TypeScript migration pull requests
  • Understanding the Rename+Adapt commit workflow required for preserving git history

Example prompts

  • “/markbind-typescript-migration”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Planning
  2. Preparation
  3. "Rename" Commit
  4. "Adapt" Commit

What it can do on your machine

Read from SKILL.md and the folder at commit dab9fc7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Markbind Typescript Migration loads about 2k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 100 tokens; SKILL.md has 797 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~100
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from MarkBind/markbind at commit dab9fc7, republished under its MIT licence (© MarkBind). 797 words, ~1,962 tokens.

Download SKILL.mdSave it as .claude/skills/markbind-typescript-migration/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
markbind-typescript-migration
description
Complete guide for migrating JavaScript files to TypeScript in the MarkBind project, including the two-commit strategy, import/export syntax conversion, and best practices. Use when migrating .js files to .ts in MarkBind's core package, preparing TypeScript migration pull requests, or understanding the Rename+Adapt commit workflow required for preserving git history.

TypeScript Migration for MarkBind

MarkBind is progressively migrating backend code from JavaScript to TypeScript. This skill provides a complete guide for performing migrations that preserve git file history.

Critical Requirements

Two-Commit Strategy Required: TypeScript migrations MUST use two separate commits:

  1. "Rename" commit - Rename .js to .ts only
  2. "Adapt" commit - Fix TypeScript errors and convert syntax

Update files incrementally: Migrate one component/directory in each commit to keep PRs focused and reviewable.

PR Merge Strategy: Use rebase-merge (not squash-merge) to keep both commits in target branch.

Strict TypeScript Settings: Migrations must adhere to existing strict TypeScript settings (no any types/disable linting without justification, etc.).

Quick Start Checklist

Before starting migration:

  • Identify files to migrate (directory or specific files)
  • Stop auto-compilation (npm run dev or IDE)
  • Install required @types/* packages
  • Understand the two-commit workflow

if @types/* are not available, assess if stand-in types should be created, or explore alternative packages that are actively maintained as replacements.

Migration Workflow Overview

Phase 0: Planning
  1. Identify files to migrate
  2. Determine work scope and order
  3. Seek approval from team before starting
Phase 1: Preparation
  1. Install type definitions for external dependencies
  2. Stash package.json changes
  3. Stop auto-compilation
Phase 2: "Rename" Commit
  1. Add compiled .js paths to .gitignore and .eslintignore
  2. Rename .js files to .ts
  3. Verify files show as "renamed" in git status
  4. Commit with --no-verify (code doesn't compile yet)
Phase 3: "Adapt" Commit
  1. Start auto-compilation (npm run dev)
  2. Convert import/export syntax
  3. Fix TypeScript errors
  4. Update dependent files
  5. Update package.json to add tsc compilation step if needed
  6. Run tests (npm run setup && npm run test && npm run lintfix)
  7. Commit normally

When to Migrate

Good Candidates
  • Files with complex logic that benefit from types
  • Files with many internal dependencies
  • Core processing files (NodeProcessor, VariableProcessor, etc.)
  • Files that are actively maintained
Avoid Migrating
  • Files scheduled for deletion/major refactor
  • External patches (keep matching upstream)
  • Files with minimal logic
  • Test files (can migrate later)

Detailed Step-by-Step Guide

For complete instructions with examples and troubleshooting, see:

Planning and Preparation
Rename Commit
Adapt Commit
Import/Export Syntax
Troubleshooting

Import/Export Quick Reference

Exports
CommonJSTypeScript EquivalentES6
module.exports = Xexport = XAvoid: export default (don't use)
module.exports = { a, b }export = { a, b }Preferred: export { a, b }
Imports
CommonJSTypeScript EquivalentES6
const X = require('a')import X = require('a')import X from 'a'
const { a, b } = require('x')Import whole objectimport { a, b } from 'x'

Rule: Match import syntax with export syntax.

Common Mistakes to Avoid

Don't
  • Combine rename and adapt in one commit
  • Use export default during migration
  • Skip type definitions installation
  • Forget to add compiled files to ignore lists
  • Use any type without justification
  • Push "Rename" commit without --no-verify
Show full SKILL.md (316 more words)Show less
Do
  • Separate rename from adapt commits
  • Install @types/* packages before starting
  • Verify files show as "renamed" in git status
  • Document stand-in types with TODOs
  • Test thoroughly before committing
  • Use rebase-merge for PR

Testing Your Migration

Before Committing "Adapt"
bash
# Full test suite
npm run test

# Core package only
cd packages/core && npm run test

# CLI package (uses compiled core)
cd packages/cli && npm run test

Both must pass: Core tests verify .ts compilation, CLI tests verify compiled .js output.

What to Verify
  • No TypeScript compilation errors
  • All tests pass (core and cli)
  • No any types (or justified with comments)
  • Import/export syntax is consistent
  • Dependent files are updated
  • Stand-in types documented with TODOs

Example Migrations

Reference these PRs for migration patterns:

Post-Migration

After your migration is merged:

Update Stand-in Types

If you created stand-in types for dependencies still in JavaScript:

  • File issues to migrate those dependencies
  • Update types when dependencies are migrated
  • Remove TODOs
Update Documentation

If you migrated a major component:

  • Update architecture docs if needed
  • Note TypeScript-specific patterns
  • Document any type utilities created

Quick Tips

Finding Files to Migrate
bash
# Find all .js files in core package
find packages/core/src -name "*.js" -type f

# Count .js vs .ts files
find packages/core/src -name "*.js" | wc -l
find packages/core/src -name "*.ts" | wc -l
Checking Git Similarity
bash
# After rename, before commit
git diff --cached --stat

# Should show "renamed" not "deleted/added"
Batch Renaming
bash
# Rename all .js files in a directory
find packages/core/src/html -name "*.js" -exec bash -c 'mv "$0" "${0%.js}.ts"' {} \;

Getting Help

If Stuck
  1. Read the detailed guides in references/
  2. Check example PR #1877
  3. Search for similar migrations in git history
  4. Ask in PR comments with specific error messages
Common Questions
  • "Do I need to migrate tests?" - No, focus on source files
  • "What about external patches?" - Keep as JavaScript to match upstream
  • "Can I migrate multiple directories?" - Yes, but keep PRs focused
  • "Should I fix bugs while migrating?" - No, separate concerns

Configuration

TypeScript configuration is in root tsconfig.json. Don't modify without team discussion.

Current settings:

  • Target: ES2020
  • Module: CommonJS
  • Strict: true
  • Output: In-place compilation

Success Criteria

A successful migration:

  • Two commits: "Rename" and "Adapt"
  • Files show as renamed in first commit
  • All tests pass
  • No any types (or justified)
  • Import/export syntax consistent
  • Dependent files updated
  • Stand-in types documented

Your migration is ready when you can confidently say: "This TypeScript code provides better type safety without changing runtime behavior."

© MarkBind, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in .github/skills/markbind-typescript-migration of MarkBind/markbind.

  • SKILL.md
  • references/adapt-commit.md
  • references/import-export-syntax.md
  • references/preparation.md
  • references/rename-commit.md
  • references/troubleshooting.md

Open the folder on GitHubat commit dab9fc7

Compare with similar skills

Markbind Typescript Migration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Markbind Typescript Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Markbind Typescript Migration this skillMarkBind/markbind158—~2kAutomated safety check: PassMIT
Check npmgrafana/skills278—~1.3kAutomated safety check: WarnApache-2.0
Convert Internal Package to TypeScriptTryGhost/Ghost55k—~1.2kAutomated safety check: PassMIT
Skyvern Version BumpSkyvern-AI/skyvern23k—~1kAutomated safety check: NotesAGPL-3.0
AionUi Version BumpiOfficeAI/AionUi33k—~2.1kAutomated safety check: PassApache-2.0
ZCF Release AutomationUfoMiao/zcf6.1k—~3.4kAutomated safety check: PassMIT

Similar skills

  • Check npm

    grafana/skills

    Official

    Audit a JavaScript/TypeScript repo's npm, yarn, or pnpm configuration for supply-chain hardening: tool version, lifecycle scripts, unsafe dependency protocols, and minimum release age ≥3 days.

    278 GitHub stars~1.3k tokensUpdated yesterday
    DevOps & CloudAuto-check: warnings
  • Moves a legacy internal Ghost package from JavaScript and CommonJS to TypeScript and ESM in three focused commits that keep git file history intact.

    55k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Skyvern Version Bump

    Skyvern-AI/skyvern

    Walks through a Skyvern open-source release bump: update the version, rebuild the Python and TypeScript SDKs with Fern, commit, and open a pull request.

    23k GitHub stars~1k tokensUpdated today
    DevelopmentAuto-check: notes
  • AionUi Version Bump

    iOfficeAI/AionUi

    Automates an AionUi release: checks the latest AionCore release and its artifacts, updates package.json, writes the changelog, opens a PR and tags the release.

    33k GitHub stars~2.1k tokensUpdated 28 days ago
    DevelopmentAuto-check passed
  • Automates a version release with changesets: analyzes code changes, writes a bilingual CHANGELOG, bumps the version and commits through a release branch and pull request.

    6.1k GitHub stars~3.4k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Beachball Change File

    microsoft/beachball

    Official

    Create and validate Beachball change files. An agent skill from microsoft/beachball.

    816 GitHub stars~2k tokensUpdated 6 days ago
    DevelopmentAuto-check passed

Categories

Questions about Markbind Typescript Migration

What does Markbind Typescript Migration do?

Complete guide for migrating JavaScript files to TypeScript in the MarkBind project, including the two-commit strategy, import/export syntax conversion, and best practices. Markbind Typescript Migration is an agent skill from MarkBind/markbind. Complete guide for migrating JavaScript files to TypeScript in the MarkBind project, including the two-commit strategy, import/export syntax conversion, and best practices.

When should I use Markbind Typescript Migration?

Markbind Typescript Migration fits situations like: migrating .js files to .ts in MarkBinds core package; preparing TypeScript migration pull requests; understanding the Rename+Adapt commit workflow required for preserving git history.

How do I install Markbind Typescript Migration in Claude Code?

Run `npx skills add MarkBind/markbind --skill markbind-typescript-migration -a claude-code`. Or copy the skill folder (.github/skills/markbind-typescript-migration in MarkBind/markbind) into .claude/skills/markbind-typescript-migration in your project. Claude Code loads it when a task matches its description.

How do I install Markbind Typescript Migration in Codex?

Run `npx skills add MarkBind/markbind --skill markbind-typescript-migration -a codex`. Or copy the skill folder (.github/skills/markbind-typescript-migration in MarkBind/markbind) into .agents/skills/markbind-typescript-migration in your project. Codex loads it when a task matches its description.

Can I use Markbind Typescript Migration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MarkBind/markbind --skill markbind-typescript-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/markbind-typescript-migration, .gemini/skills/markbind-typescript-migration, .github/skills/markbind-typescript-migration and .opencode/skills/markbind-typescript-migration in your project.

What does Markbind Typescript Migration need to run?

Going by SKILL.md and its folder, Markbind Typescript Migration needs the command-line tools its instructions call (npm and git).

Does Markbind Typescript Migration access the network?

SKILL.md contains no URLs. Its commands use npm and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Markbind Typescript Migration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Markbind Typescript Migration use?

Markbind Typescript Migration is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Markbind Typescript Migration use?

About 2k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 11k tokens, read only when the agent opens those files.

What are the alternatives to Markbind Typescript Migration?

Skills that share tags, products or a category with Markbind Typescript Migration: Check npm (grafana/skills, 278 stars), Convert Internal Package to TypeScript (TryGhost/Ghost, 55k stars), Skyvern Version Bump (Skyvern-AI/skyvern, 23k stars) and AionUi Version Bump (iOfficeAI/AionUi, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Markbind Typescript Migration?

MarkBind (a GitHub organization) maintains it in MarkBind/markbind, which has 158 GitHub stars. The repository was last updated on August 27, 2026.

Source: MarkBind/markbind on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.