Agent skill

Port Upstream

by gjtorikian in gjtorikian/tailwind_merge

Check GitHub notifications for upstream dcastil/tailwind-merge pull requests and port merged ones into this Ruby gem (branch, translated code, tests, commit, PR).

MITAuto-check passedFrontend & Design

Install Port Upstream

skills CLI
$ npx skills add gjtorikian/tailwind_merge --skill port-upstream -a claude-code

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

GitHub CLI
$ gh skill install gjtorikian/tailwind_merge port-upstream --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/gjtorikian/tailwind_merge.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/port-upstream .claude/skills/port-upstream && 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
port-upstream
GitHub stars
148
Token cost
~1.9k tokens
SKILL.md length
917 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Check GitHub notifications for upstream dcastil/tailwind-merge pull requests and port merged ones into this Ruby gem (branch, translated code, tests, commit, PR).

  • Works in 2 steps: Triage → Port (one upstream PR at a time)
  • The user asks to check upstream
  • SKILL.md covers Phase 1 — Triage, Phase 2 — Port (one upstream…, Translation table and Sweep mode (optional)
  • Calls gh, git and bundle

What it does

Port Upstream is an agent skill from gjtorikian/tailwind_merge. Check GitHub notifications for upstream dcastil/tailwind-merge pull requests and port merged ones into this Ruby gem (branch, translated code, tests, commit, PR). Use whenever the user asks to check upstream, check their GitHub notifications, sync or catch up with tailwind-merge, port upstream fixes, or asks "anything new upstream?" — even if they don't explicitly say "port".

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering CSS and styling and Pull requests. It works with Tailwind CSS, GitHub and Ruby. The repository describes itself as: Utility function to efficiently merge Tailwind CSS classes without style conflicts. The licence is MIT.

When your agent uses it

  • The user asks to check upstream
  • Check their GitHub notifications
  • Catch up with tailwind-merge
  • Port upstream fixes

Example prompts

  • “anything new upstream?”
  • “t explicitly say”
  • “/port-upstream”

Workflow steps

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

  1. Triage
  2. Port (one upstream PR at a time)

What it can do on your machine

Read from SKILL.md and the folder at commit 89ac478. 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:

    • gh
    • git
    • bundle

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

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    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

Port Upstream loads about 1.9k tokens when it runs. Until then it costs about 98 tokens; SKILL.md has 917 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~98
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

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 gjtorikian/tailwind_merge at commit 89ac478, republished under its MIT licence (© gjtorikian). 917 words, ~1,928 tokens.

Download SKILL.mdSave it as .claude/skills/port-upstream/SKILL.md (or your agent's skills folder).
name
port-upstream
description
Check GitHub notifications for upstream dcastil/tailwind-merge pull requests and port merged ones into this Ruby gem (branch, translated code, tests, commit, PR). Use whenever the user asks to check upstream, check their GitHub notifications, sync or catch up with tailwind-merge, port upstream fixes, or asks "anything new upstream?" — even if they don't explicitly say "port".

Port upstream tailwind-merge changes

This gem is a Ruby port of dcastil/tailwind-merge (TypeScript). Upstream fixes — usually to the default config — need to be re-implemented here by hand. This skill turns the user's GitHub notification inbox into a triage report, then ports the approved PRs one at a time.

The single source of truth for "already ported" is a commit-message trailer: every port commit ends with a line like Ports dcastil/tailwind-merge#705. Grep git history for that marker instead of keeping a separate state file — history can't drift out of sync with itself.

Phase 1 — Triage

  1. Fetch unread notifications for the upstream repo, keeping the thread id (needed later to mark it read) and the PR number from the subject URL:

    bash
    gh api notifications --paginate \
      -q '.[] | select(.repository.full_name == "dcastil/tailwind-merge") | {thread_id: .id, type: .subject.type, title: .subject.title, url: .subject.url}'

    Ignore non-PullRequest subjects (issues, releases) unless the user asks about them. Dedupe if several threads point at the same PR. If the inbox is empty, say so and stop — unless the user asked for a sweep (see below).

  2. For each PR number, fetch its state and metadata:

    bash
    gh pr view <N> -R dcastil/tailwind-merge --json state,title,url,mergedAt,body,files

    Sort the PRs into three buckets:

    • Not merged yet (OPEN): leave the notification unread and don't track it — porting unmerged work is speculative. Mention these in one summary line so the user knows why they weren't handled.
    • Merged, already ported: check with git log -E --grep 'dcastil/tailwind-merge#<N>([^0-9]|$)' (the character class stops #70 from matching #708). If a commit exists, mark the notification read right away — the inbox should reflect remaining work: gh api --method PATCH /notifications/threads/<thread_id>
    • Merged, not ported: this is the work queue.
  3. Present a triage report for the work queue: upstream title, link, merge date, which upstream files it touches, and which Ruby files that maps to (see the translation table). Flag PRs that likely have nothing to port — changes confined to TypeScript types, docs, bundling, CI, or dependency bumps have no Ruby counterpart.

  4. Ask the user which PRs to port before writing any code (recommend all the applicable ones). PRs the user decides to skip as not applicable also get their notification marked read — a conscious "no" is handled work.

Phase 2 — Port (one upstream PR at a time)

Port approved PRs oldest merge first — upstream PRs often touch adjacent config lines, so applying them in merge order avoids self-inflicted conflicts. Each port is its own branch off main, its own commit, its own PR here.

For each PR:

  1. Start clean: git checkout main && git pull.

  2. Branch using the repo's convention: fix/<kebab-summary> (or feat/ if the upstream change adds behavior).

  3. Read the full upstream change: gh pr diff <N> -R dcastil/tailwind-merge, plus the PR body — dcastil's descriptions usually explain the CSS-level why, which belongs in the commit message here.

  4. Translate the diff using the table and idioms below. Port the upstream test changes too — a port without its tests isn't verified.

  5. Run the suite and linter:

    bash
    bundle exec rake test && bundle exec rake rubocop

    Fix failures before committing. Do not touch version.rb or CHANGELOG.md — release-please generates both from conventional commits.

  6. Commit with a conventional message modeled on git show 66d8e2a: fix(config): <subject>, a body explaining the CSS behavior being fixed (not just "port upstream"), and the trailer as the final line:

    Ports dcastil/tailwind-merge#<N>.

    That trailer is the tracking mechanism — omitting it means the PR shows up as unported forever.

    Commits are signed through 1Password's SSH agent. If git commit fails with 1Password: failed to fill whole buffer, 1Password is locked — ask the user to unlock it and retry (the commit may also need to run outside the sandbox to reach the agent).

  7. Push and open a PR against main with gh pr create, linking the upstream PR in the description.

  8. Mark the notification thread read: gh api --method PATCH /notifications/threads/<thread_id>

Finish with a summary: PRs opened here (with links), PRs skipped and why, and anything left unread in the inbox (e.g. unmerged upstream PRs).

Show full SKILL.md (282 more words)Show less

Translation table

Upstream (TypeScript)Here (Ruby)
src/lib/default-config.tslib/tailwind_merge/config.rb
src/lib/validators.tslib/tailwind_merge/validators.rb
src/lib/parse-class-name.tslib/tailwind_merge/parse_class_name.rb
src/lib/sort-modifiers.tslib/tailwind_merge/sort_modifiers.rb
src/lib/class-group-utils.tslib/tailwind_merge/class_group_utils.rb
tests/<kebab-name>.test.tstest/test_<snake_name>.rb

Idiom mapping — the port is deliberately close to a mechanical rename:

  • scaleFooBar() helper → SCALE_FOO_BAR lambda constant; spread with *SCALE_FOO_BAR.call where TS uses ...scaleFooBar().
  • themeSpacing / other theme getters → THEME_SPACING etc.
  • isNumber and friends → IS_NUMBER lambda constants in validators.rb; inside config.rb they appear bare (the module includes Validators) or as Validators::IS_NUMBER — match whichever the surrounding lines use.
  • Object literals → string-keyed hashes: { shadow: [...] } becomes { "shadow" => [...] }.
  • vitest expect(twMerge('a b')).toBe('b') → Minitest assert_equal("b", @merger.merge("a b")) with @merger from setup.

When an upstream diff touches a file with no row in the table, check whether the change is behavior (needs a Ruby home) or TypeScript plumbing (skip it, and say so in the report). Doc-comment tweaks (like @see link fixes) only apply if the Ruby file carries the same comment.

Port to the post-PR state. If the surrounding Ruby code doesn't match what the upstream diff shows as the "before", the port has drifted — an earlier upstream change was missed. Don't apply just the PR's delta onto the stale code; bring the whole expression to upstream's post-PR state and call out the extra repair in the commit body. (This happened with the columns group, which had drifted to matching only t-shirt sizes while upstream had long since moved to numbers + the container scale.)

Sweep mode (optional)

Notifications are ephemeral — if the user dismissed some, merged upstream work can slip through. When the user asks for a "sweep" or suspects gaps, also cross-check recent merged upstream PRs against the trailer markers:

bash
gh pr list -R dcastil/tailwind-merge --state merged --limit 20 --json number,title,mergedAt,url

Any PR without a matching Ports dcastil/tailwind-merge#<N> commit joins the triage report (there's no notification thread to mark read for these).

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

Files

Just SKILL.md in .claude/skills/port-upstream of gjtorikian/tailwind_merge.

Open the folder on GitHubat commit 89ac478

Compare with similar skills

Port Upstream 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.

Port Upstream compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Port Upstream this skillgjtorikian/tailwind_merge148—~1.9kAutomated safety check: PassMIT
Plugin InstallerIgorWarzocha/Opencode-Workflows122—~1.3kAutomated safety check: PassNone
Language Supportlive-codes/livecodes1.5k—~1.6kAutomated safety check: PassMIT
Kendo Themestelerik/kendo-themes158—~2.7kAutomated safety check: PassNone
Composer UIdxos/dxos526—~9.3kAutomated safety check: PassCustom licence
Oxlint Tailwindcsssergioazoc/oxlint-tailwindcss101—~1.9kAutomated safety check: PassMIT

Similar skills

  • Plugin Installer

    IgorWarzocha/Opencode-Workflows

    Find, install, and configure OpenCode plugins from the catalog or community.

    122 GitHub stars~1.3k tokensUpdated 8 mo ago
    Frontend & DesignAuto-check passed
  • Language Support

    live-codes/livecodes

    Work with 90+ supported languages, compilers, CSS processors, and WASM-compiled languages for markup, style, and script editors.

    1.5k GitHub stars~1.6k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Kendo Themes

    telerik/kendo-themes

    DEPRECATED — moved to the kendo-design plugin in telerik/ai-plugins (https://github.com/telerik/ai-plugins).

    158 GitHub stars~2.7k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Composer UI

    dxos/dxos

    A skill your agent uses when building or styling plugin UI with Composer's design system — the @dxos/react-ui packages.

    526 GitHub stars~9.3k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Oxlint Tailwindcss

    sergioazoc/oxlint-tailwindcss

    Set up oxlint-tailwindcss — Tailwind CSS v4 lint rules for oxlint — in a project, and act on its diagnostics.

    101 GitHub stars~1.9k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Update Web Assets

    garfiec/Librechat-Mobile

    Update the third-party JavaScript vendored into the app for the artifact, diagram, and math WebViews (KaTeX, mermaid, marked, highlight.js, Tailwind, Babel, React).

    111 GitHub stars~1.8k tokensUpdated yesterday
    Frontend & DesignAuto-check: notes

Questions about Port Upstream

What does Port Upstream do?

Check GitHub notifications for upstream dcastil/tailwind-merge pull requests and port merged ones into this Ruby gem (branch, translated code, tests, commit, PR). Port Upstream is an agent skill from gjtorikian/tailwind_merge. Check GitHub notifications for upstream dcastil/tailwind-merge pull requests and port merged ones into this Ruby gem (branch, translated code, tests, commit, PR).

When should I use Port Upstream?

Port Upstream fits situations like: the user asks to check upstream; check their GitHub notifications; catch up with tailwind-merge; port upstream fixes.

How do I install Port Upstream in Claude Code?

Run `npx skills add gjtorikian/tailwind_merge --skill port-upstream -a claude-code`. Or copy the skill folder (.claude/skills/port-upstream in gjtorikian/tailwind_merge) into .claude/skills/port-upstream in your project. Claude Code loads it when a task matches its description.

How do I install Port Upstream in Codex?

Run `npx skills add gjtorikian/tailwind_merge --skill port-upstream -a codex`. Or copy the skill folder (.claude/skills/port-upstream in gjtorikian/tailwind_merge) into .agents/skills/port-upstream in your project. Codex loads it when a task matches its description.

Can I use Port Upstream 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 gjtorikian/tailwind_merge --skill port-upstream -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/port-upstream, .gemini/skills/port-upstream, .github/skills/port-upstream and .opencode/skills/port-upstream in your project.

What does Port Upstream need to run?

Going by SKILL.md and its folder, Port Upstream needs the command-line tools its instructions call (gh, git and bundle).

Does Port Upstream access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Port Upstream 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 Port Upstream use?

Port Upstream 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 Port Upstream use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Port Upstream?

Skills that share tags, products or a category with Port Upstream: Plugin Installer (IgorWarzocha/Opencode-Workflows, 122 stars), Language Support (live-codes/livecodes, 1.5k stars), Kendo Themes (telerik/kendo-themes, 158 stars) and Composer UI (dxos/dxos, 526 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Port Upstream?

gjtorikian (a GitHub user) maintains it in gjtorikian/tailwind_merge, which has 148 GitHub stars. The repository was last updated on September 13, 2026.

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