AGENT SKILL

import-skill

Import a third-party skill into this owned catalog (dotlas/skills) from a skills.sh URL, a GitHub repo/subdir, or a pasted `npx skills add` command. Use when the user wants to add, vendor, or import a skill, pastes a skills.sh link or an `npx skills add …` command, and the target is this repo's `skills/` catalog.

License 许可
MIT
所属仓库
dotlas/skills
最近更新
2026-10-27
Stars
★ 2
Forks
0

01 前言 Front Matter

name
import-skill
description
Import a third-party skill into this owned catalog (dotlas/skills) from a skills.sh URL, a GitHub repo/subdir, or a pasted `npx skills add` command. Use when the user wants to add, vendor, or import a skill, pastes a skills.sh link or an `npx skills add …` command, and the target is this repo's `skills/` catalog.

03 SKILL.md 正文

Import a skill into this catalog

This repo is an owned catalog: skills are vendored as first-class directories under skills/<category>/<provenance>/<name>/, grouped for the skills CLI by .claude-plugin/marketplace.json, and there is deliberately no skills-lock.json. The stock npx skills add violates both conventions — it writes a lock file and drops skills flat under skills/<name>/. This skill replaces that default with the correct local procedure.

Every import runs one spine: resolve → clone-to-scratch → copy whole dir → classify → place → register → assert-no-lock → verify → commit. The three input forms differ only in the first step; do not run npx skills add to perform the import even when handed that command — parse it to a target and take the clone path like the others.

1. Resolve the source to owner/repo + skill path

Produce a concrete (owner/repo, ref, skill-dir-in-repo, slug). The slug is the frontmatter name: the skill will be identified by, not necessarily its folder name.

  • skills.sh URL (https://skills.sh/<owner>/<repo>/<slug>) → the GitHub repo is <owner>/<repo>; the last segment is the target slug. Find the dir whose SKILL.md frontmatter name: equals that slug (folder name may differ).
  • GitHub repo or subdir (owner/repo, or .../tree/<branch>/<subdir>) → clone and locate the SKILL.md. If a subdir is given it points at (or into) the skill dir.
  • Pasted npx skills add … → parse the source arg and any -s <skill> out of the command to the same (owner/repo, skill) target. Do not execute the command.

2. Clone to scratch and copy the whole directory

Shallow-clone the source repo into a scratch directory (never into this repo). Copy the entire skill directory, not just SKILL.md — skills commonly ship rules/, lib/, references/, scripts/, agents/, and other supporting files.

git clone --depth 1 [--branch <ref>] https://github.com/<owner>/<repo> "$SCRATCH/src"

3. Classify: category + provenance + slug

  • category ∈ {generic, frontend} — pick by function (frontend = web/UI/React/Next.js work; generic otherwise).
  • provenance ∈ {custom, community} — an imported third-party skill is almost always community.

When either is not obvious from the source, use AskUserQuestion to confirm, proposing a default. Then confirm the final slug.

Collision check at the frontmatter name: level, not just the folder name — the CLI identifies skills by name:. Grep existing SKILL.md frontmatter for the slug; a colliding name: under a different folder still collides. On collision, rename both the folder and the frontmatter name: to a distinct slug.

4. Place the directory

Copy to skills/<category>/<provenance>/<slug>/.

5. Register in .claude-plugin/marketplace.json

Add "./skills/<category>/<provenance>/<slug>" to the matching plugin’s skills array (custom-generic, community-generic, custom-frontend, or community-frontend). The arrays are alphabetical — insert in order. Keep the JSON valid.

6. Assert no lock file

There must be no skills-lock.json anywhere in the repo. Remove one if it exists — whether the stock CLI wrote it or it rode in on the copy from the source dir — and note why in the commit.

find . -name skills-lock.json -not -path './.git/*' -delete

7. Verify from the local checkout

Confirm the new skill lists under the intended group before committing — the CLI lists a local path without needing a push:

npx -y skills add . -l

The completion criterion: the new slug appears under the correct group header (Community Frontend / Community Generic / Custom Frontend / Custom Generic) and no skills-lock.json exists. (npx skills add dotlas/skills -l clones the remote and only reflects the import after it is pushed — use it as a post-push confirmation, not the pre-commit gate.)

8. Commit

Commit with the [[commit]] skill’s conventions.


This skill itself lives at skills/generic/custom/import-skill/ and is registered in marketplace.json under custom-generic — it is the worked example of the layout it enforces.

04 同仓库更多 Skills

dotlas
dotlas/skills

where-were-we

Provide the user with a refresher of existing chat turns. Useful when the user wants to understand where we stand in the conversation.

★ 2
dotlas
dotlas/skills

update-global-dotlas-skills

Sync the globally-installed dotlas/skills catalog and prune stale remnants. Runs the documented global install command, then detects skills that were installed from dotlas/skills but no longer exist in the catalog and removes them (with confirmation). Use when the user wants to update, refresh, or clean up their global Dotlas skills, or invokes /update-global-dotlas-skills.

★ 2
dotlas
dotlas/skills

unpack

Explain an unfamiliar thing plainly and from first principles, structured so the reader sees why it is true. Use when someone is trying to understand something — a dense or jargon-heavy passage, a baffling error, an unfamiliar mechanism, a codebase, or a document — asks to break something down ("walk me through this", "what does this actually mean"), or wants their intent turned into a precise instruction for another agent. Trigger on confusion or a request to understand, not on difficulty alone; technical or long content is not itself a signal.

★ 2
dotlas
dotlas/skills

sum

Use when the previous response is too technical, complex, or jargon-heavy and needs a clear, plain-language explanation

★ 2
dotlas
dotlas/skills

slack

Compose a Slack message, or digest a Slack thread into compact context. Use when the user asks to reply to a person or channel, write a Slack post, or catch up on a thread without reading the whole transcript. This skill covers how to write well for Slack — both jobs share the same standard.

★ 2
dotlas
dotlas/skills

plan-with-me

Collaborative, human-in-the-loop planning for something new that spans several parts and needs human judgement at each fork. A brainstorming partner that funnels — each fork opens up the real options, then narrows to a decision, surfacing caveats and breaking points, and co-authoring the plan instead of guessing alone. Fits any domain where you plan something new against existing context. Resolves one decision at a time, each with a recommendation, then emits a lightweight plan to hand off for implementation. Use when planning alone would make wrong assumptions, or the user wants to shape something new together.

★ 2