Logo: Skills Composition

Skills Composition

Communautéit
d-padmanabhan
skills-composition

Patterns for composing multiple Cursor / Agent Skills into orchestrated workflows. Covers slash commands that chain skills, project-vs-personal scope resolution, sibling-skill auto-detection with graceful degradation, sequential vs parallel chaining, HITL gates between phases, parameter passing, and error handling. Use when designing a multi-step workflow that spans skills, building a slash command that delegates to several skills, or deciding when to add a new skill vs extend an existing one.

Iwwersiicht

Editeurd-padmanabhan
Repositoryagent-engineering-handbook
Skill-Nummskills-composition
Stären
20
Forks
3
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    d-padmanabhan huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Skills Composition an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/d-padmanabhan/agent-engineering-handbook/tree/main/skills/skills-composition
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbook.git /tmp/agent-engineering-handbook
mkdir -p .claude/skills
cp -r /tmp/agent-engineering-handbook/skills/skills-composition .claude/skills/skills-composition
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Skills Composition an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Skills Composition automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Skills Composition net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Skills Composition - Patterns

How to build workflows that span more than one Cursor / Agent Skill cleanly. Covers chaining, scope resolution, graceful degradation, and the discipline of "one skill, one capability".

Companion rules:

  • 015-context-engineering.mdc - prompt packing, retrieval, compaction
  • 100-core.mdc - SOLID / DRY / KISS / YAGNI

When to invoke

Use when designing:

  • A slash command that needs to call more than one skill in sequence
  • A skill that calls helpers in another skill (vs duplicating the logic)
  • A workflow where a downstream skill is optional (graceful degradation)
  • A new skill where the right answer might be "extend an existing skill instead"

Do not use for:

  • Single-skill workflows - just call the skill directly
  • One-off scripts - skills are for repeatable workflows

The Five Golden Rules

  1. One skill, one capability. A skill answers one question well. Multiple capabilities = multiple skills.
  2. Compose via commands, not by importing. Skills do not "import" each other; a slash command (or another skill's workflow) orchestrates them.
  3. Project scope wins over personal scope. A project-scope skill (.cursor/skills/) wins over a personal-scope copy (~/.cursor/skills/) of the same name.
  4. Auto-detect siblings; degrade gracefully. When skill A optionally extends skill B, A checks for B at known paths and skips silently if absent.
  5. HITL gates between phases for irreversible steps. Even within a single command, prompt before destructive or expensive steps.

Skill scope resolution

Cursor (and Claude Code) discover skills at multiple paths. The resolution order:

Implications:

  • A project can override a personal skill with the same name. Useful when one project needs custom behavior.
  • A personal skill can be a default for many projects; project skills are for project-specific workflows.
  • Hard-coded skill paths in commands break this. Use the resolution order; fall through gracefully.

Reference snippet for path resolution

bash
# Bash helper used by slash commands
resolve_skill_path() {
  local name="$1"
  for prefix in ".cursor/skills" "$HOME/.cursor/skills" ".claude/skills" "$HOME/.claude/skills"; do
    if [[ -f "$prefix/$name/SKILL.md" ]]; then
      echo "$prefix/$name"
      return 0
    fi
  done
  return 1
}

Composition pattern 1 - Slash command chains skills

The most common pattern. A slash command orchestrates 2-3 skills with HITL gates between.

Example: /consolidation-analysis

What makes this clean:

  • Each skill is invocable on its own (/facts-update, /build-dashboard). The command is a convenience layer.
  • HITL gate before the expensive step (refresh KB).
  • Sibling auto-detection - the dashboard step is silently skipped if the skill is absent.
  • Single summary at the end covers all produced artifacts.

Anti-pattern: command does everything itself

If /consolidation-analysis had inlined all the workbook-generation logic, the dashboard logic, and the refresh logic, four things break:

  1. The dashboard cannot be regenerated without re-running the workbook.
  2. The refresh cannot be run independently.
  3. Updates to one capability force changes to all callers.
  4. There is no way to test pieces in isolation.

Skills + a thin orchestration command preserves all four.


Composition pattern 2 - Skill A optionally extends skill B

Skill B is the canonical capability. Skill A adds a feature on top if B exists, but B can run without A.

Example: consolidation-dashboard extends technology-consolidation-analysis

The consolidation analysis produces an Excel workbook. If consolidation-dashboard is installed, the analysis command also produces an HTML dashboard. If not, it does not.

Implementation:

  • The downstream consumer (the analysis command, in this case) checks for the optional skill at the known path.
  • If present, calls it. If absent, logs "skill not installed" and continues.
  • The optional skill's failure does not fail the upstream skill.
bash
# In the analysis command's last step
DASH="$(resolve_skill_path consolidation-dashboard)" || DASH=""
if [[ -n "$DASH" ]]; then
  python3 "$DASH/scripts/build_dashboard.py" --source "$WORKBOOK"
else
  echo "Note: consolidation-dashboard skill not installed; skipping HTML dashboard."
fi

The analysis step is independent. The dashboard step is opt-in.


Composition pattern 3 - Workspace defaults + project overrides

Personal skills under ~/.cursor/skills/ are workspace-wide defaults. Project skills under .cursor/skills/ override them by name.

Use cases:

  • A personal code-review skill applies to every project; one project has a different style guide and ships its own code-review/ to override it.
  • A personal release skill follows the default flow; a regulated project has stricter gates and ships a project-scope release/ that requires extra approvals.

Rules:

  • The override is by name: in the SKILL.md frontmatter, not by directory name. Match the name exactly.
  • The override is total - the personal skill is not "merged into" the project skill. The project skill replaces it.
  • If the project skill needs the personal skill's logic, it should # Related: personal version at ~/.cursor/skills/<name> and either copy what it needs or call the personal version's helpers explicitly.

Composition pattern 4 - Skill calls another skill's helpers

Skills do not import each other in code. But a skill's helpers (scripts, references) live on disk and can be called.

If skill A needs a function that skill B has implemented:

  1. First option - factor the helper into a third location (a lib/ shared between skills, or a small Python package the project can install).
  2. Second option - skill A calls skill B's script as a subprocess, with explicit path resolution.
  3. Third option (rare) - duplicate the helper in skill A. Acceptable only when the helper is trivial and skill A must work even if B is uninstalled.

Avoid implicit coupling. The skill graph should be readable from the SKILL.md files alone.


Composition pattern 5 - Sequential vs parallel

PatternWhen to useExample
SequentialOutput of one skill is input to the nextKB refresh -> analysis -> dashboard
ParallelSkills are independent and run on disjoint inputsLint + tests + security scan in CI
Fan-out / fan-inOne input, many parallel skills, one merged outputAudit a repo across 8 security layers, then summarize

Most agentic workflows are sequential because each step's output reshapes the prompt for the next. Parallel composition is more common in CI than in interactive workflows.


HITL gates between phases

Even within one command, prompt the user before:

  • Long-running steps (>~5 minutes elapsed; >~10 web/tool calls)
  • Irreversible steps (file writes outside tmp/, KB swaps, deploys, commits, pushes)
  • Cost-incurring steps (paid API calls, model invocations beyond a budget)
  • Scope-expanding steps (refresh "all" vs "gaps only" vs "specific")

Use AskQuestion with a small number of options (3-4) including a "no-op / cancel" option. Default to the safest option.


"Should this be a new skill, or a section in an existing one?"

A pragmatic decision tree:

Bias toward "section in existing skill" for small additions. Skill sprawl makes the catalog hard to navigate.


Anti-patterns

  1. Implicit chaining via shared global state - skill A mutates a file at a known path; skill B reads it without knowing skill A produced it. Use explicit parameters or a clear contract.
  2. Hard-coded skill paths in commands - python3 ~/.cursor/skills/foo/scripts/bar.py. Breaks when the skill is project-scoped.
  3. Optional sibling that is actually required - if the workflow does not work without it, do not call it "optional". Either ship it as part of the upstream skill or document the dependency loudly.
  4. Skills that import code from each other - turns skills into a Python package. Either make a real package or use subprocess + JSON contracts.
  5. Two skills with the same name: - one always loses. Use distinct names; let the user choose by invoking the right one.
  6. Megaskills with 20 workflows - each skill should answer one question well. If your SKILL.md needs a TOC, split it.
  7. No HITL before expensive operations - "the agent will figure it out" is how you blow your model budget at 2am.

Authoring checklist

When creating a new skill that composes with others:

  • One sentence answers "what one capability does this provide?"
  • Frontmatter description: covers the trigger phrases users will say
  • If the skill calls another skill, document it in ## Related and use path resolution (not hard-coded paths)
  • If the skill is optional to a parent, the parent must check resolve_skill_path and degrade gracefully
  • Each workflow is independently invocable (no hidden cross-workflow dependencies)
  • HITL gates are explicit before destructive / long-running / cost-incurring steps
  • Anti-patterns the skill should not enable are listed (so reviewers know what to flag)

Authoring checklist for a slash command that composes skills

  • Document the skills it depends on (with file paths) in the command body
  • Use path resolution; do not hard-code ~/.cursor/... or .cursor/...
  • HITL gate before each phase that is destructive, expensive, or scope-expanding
  • Final summary describes every artifact produced
  • Optional skills' absence is communicated (not silently skipped)
  • Failure of one skill does not corrupt artifacts produced by earlier skills
  • Document idempotency: re-running the command on the same input is safe

When NOT to compose

  • Single-step workflows - just use the skill directly. A command that wraps one skill adds no value.
  • One-off scripts - skills are for repeated workflows. A one-off belongs in tmp/ or a notebook.
  • When the orchestration is the same as the underlying skill - merge them.

Related

  • Rule: 015-context-engineering.mdc - prompt packing, retrieval, compaction
  • Rule: 100-core.mdc - SOLID / DRY / KISS
  • Skill: web-research-kb-refresh - canonical example of a skill that other skills compose with (see also the /facts-update template in its references)
  • Skill: agent-workflow - workflow patterns for complex multi-step tasks

Attribution

Patterns crystallized from a consulting-toolkit workspace where one slash command (/consolidation-analysis) orchestrates three skills (web-research-kb-refresh, technology-consolidation-analysis, consolidation-dashboard) with HITL gates between, sibling auto-detection, and graceful degradation when the dashboard skill is absent. The discipline of "one skill, one capability" is what makes the chain readable and maintainable.

Heefeg gestallte Froen

Wat mécht de KI-Skill Skills Composition?

Patterns for composing multiple Cursor / Agent Skills into orchestrated workflows. Covers slash commands that chain skills, project-vs-personal scope resolution, sibling-skill auto-detection with graceful degradation, sequential vs parallel chaining, HITL gates between phases, parameter passing, and error handling. Use when designing a multi-step workflow that spans skills, building a slash command that delegates to several skills, or deciding when to add a new skill vs extend an existing one.

Firwat Skills Composition op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Skills Composition besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Skills Composition an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/d-padmanabhan/agent-engineering-handbook/tree/main/skills/skills-composition an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Skills Composition benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Skills Composition benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Skills Composition domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Skills Composition gratis?

Jo. d-padmanabhan huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇