Skip to content

Build your personal knowledge base with Trilium Notes

chore(skills): decouple the skills from the codebase

Elian Doran49aa144bed73
diff --git a/.claude/skills/ckeditor5-plugin-development/SKILL.md b/.claude/skills/ckeditor5-plugin-development/SKILL.md
index ac1f386f2d..03cc619c87 100644
--- a/.claude/skills/ckeditor5-plugin-development/SKILL.md
+++ b/.claude/skills/ckeditor5-plugin-development/SKILL.md
@@ -201,23 +201,23 @@ editing view on execute; keyboard accessibility (keystrokes + `accessibility.add
all user-facing strings wrapped in `t()`; model changes inside `model.change()`; cleanup of
trackers/handlers in `destroy()`. Full version: `references/review-checklist.md`.
-## Provenance & updating
-
-This skill was distilled from the CKEditor 5 repository at baseline commit
-**`9ecca53627`** ("Migrated the horizontal line package tests to Vitest", 2026-06-12).
-
-Primary sources distilled:
-- `docs/framework/architecture/*.md` (intro, plugins, core-editor-architecture, editing-engine,
- ui-library, ui-components)
-- `docs/framework/how-tos.md`, `docs/framework/custom-editor-creator.md`,
- `docs/framework/deep-dive/localization.md`
-- `docs/framework/contributing/{code-style,package-metadata,development-environment}.md`
-- `docs/framework/development-tools/**` (package-generator, inspector)
-- `docs/tutorials/**` (crash-course, abbreviation-plugin-tutorial, widgets, creating-simple-plugin-timestamp)
-
-To update this skill when the docs change, diff the sources since the baseline and fold in
-what moved, then bump the commit reference above:
-
-```bash
-git diff 9ecca53627..HEAD -- docs/framework docs/tutorials
-```
+## Provenance & source references
+
+**This skill is self-contained and library-focused, not tied to any particular project.** Every
+repository path it cites — `docs/…`, `packages/ckeditor5-…/src/…`, config files, the baseline
+commit — points into the **upstream CKEditor 5 repository**
+([github.com/ckeditor/ckeditor5](https://github.com/ckeditor/ckeditor5)), **not the project you are
+currently working in**. Those paths are for verification and deeper reading in the library's own
+source. Unless you happen to be working inside the ckeditor5 repository itself, do not try to open
+them as local files — your plugin lives in your own project and imports CKEditor from the
+`ckeditor5` / `@ckeditor/*` npm packages.
+
+This skill was distilled from that upstream repository at commit **`9ecca53627`** (mid-2026):
+the framework docs (`docs/framework/**` — architecture, contributing/code-style, package-metadata,
+deep-dive/localization, development-tools), the tutorials (`docs/tutorials/**` — crash-course,
+abbreviation plugin, widgets, timestamp), and the core plugin source (`packages/ckeditor5-*/src/**`,
+for `references/core-plugin-patterns.md`).
+
+To refresh the skill, browse or clone the upstream repository and compare those paths against
+commit `9ecca53627` — e.g. `git diff 9ecca53627..HEAD -- docs packages` run **inside a clone of
+ckeditor5** — then fold in what changed and bump the commit reference here.
diff --git a/.claude/skills/ckeditor5-plugin-development/references/conventions.md b/.claude/skills/ckeditor5-plugin-development/references/conventions.md
index a60e26fef9..a5ff50e5fa 100644
--- a/.claude/skills/ckeditor5-plugin-development/references/conventions.md
+++ b/.claude/skills/ckeditor5-plugin-development/references/conventions.md
@@ -37,7 +37,7 @@ idiomatic plugins and to review them. Items below note the enforcing ESLint rule
`no-scoped-imports-within-package`).
- All imports include file extensions (`.ts`/`.js`/`.json`) (`require-file-extensions-in-imports`).
- In `@if CK_DEBUG` blocks use `require()`, not `import` (`use-require-for-debug-mode-imports`).
-- Each TS file in `packages/*/src/` starts with a `@module path/file` JSDoc tag matching its
+- Each TS source file (in the ckeditor5 source, `packages/*/src/`) starts with a `@module path/file` JSDoc tag matching its
location (`validate-module-tag`); the package `index.ts` uses `@module <package>`.
## Plugin specifics
diff --git a/.claude/skills/ckeditor5-plugin-development/references/conversion.md b/.claude/skills/ckeditor5-plugin-development/references/conversion.md
index 8d01365888..329bf955fe 100644
--- a/.claude/skills/ckeditor5-plugin-development/references/conversion.md
+++ b/.claude/skills/ckeditor5-plugin-development/references/conversion.md
@@ -119,6 +119,7 @@ This maps any position inside the view `<span>` to a position **outside** the mo
## Where to go deeper
-The official "Conversion deep dive" (`framework/deep-dive/conversion/*`) covers
+The official CKEditor 5 "Conversion deep dive" docs (ckeditor.com/docs → Framework › Deep dive ›
+Conversion) cover
`elementToStructure`, reconversion/triggers, marker conversion, and data processors. For
widget-specific conversion patterns see `widgets.md`.
diff --git a/.claude/skills/ckeditor5-plugin-development/references/core-plugin-patterns.md b/.claude/skills/ckeditor5-plugin-development/references/core-plugin-patterns.md
index ae16e87d8a..ba752c7dd6 100644
--- a/.claude/skills/ckeditor5-plugin-development/references/core-plugin-patterns.md
+++ b/.claude/skills/ckeditor5-plugin-development/references/core-plugin-patterns.md
@@ -1,8 +1,13 @@
# Canonical patterns from the core plugins
-Real-world idioms mined from the actual `packages/*/src` source (verified against the codebase
-at the baseline commit). These go beyond the tutorials and are the patterns the official
-plugins actually use. Each item cites its source file.
+> **Source paths below (`packages/ckeditor5-…/src/…`) point into the upstream CKEditor 5 repository
+> ([github.com/ckeditor/ckeditor5](https://github.com/ckeditor/ckeditor5)), not your project.** They
+> show where each idiom lives in the library's own source. Your plugin imports CKEditor from the
+> `ckeditor5` / `@ckeditor/*` npm packages; don't try to open these as local files.
+
+Real-world idioms mined from the actual upstream `packages/*/src` source (verified against the
+library at the baseline commit). These go beyond the tutorials and are the patterns the official
+plugins actually use. Each item cites its source file in the upstream repository.
## Toolbar + menu-bar button in one factory
diff --git a/.claude/skills/ckeditor5-plugin-development/references/recipes.md b/.claude/skills/ckeditor5-plugin-development/references/recipes.md
index f520f26f70..3e8f6da715 100644
--- a/.claude/skills/ckeditor5-plugin-development/references/recipes.md
+++ b/.claude/skills/ckeditor5-plugin-development/references/recipes.md
@@ -142,7 +142,8 @@ Pattern from the how-tos for a form `<input>` ↔ `<forms><formName>…</formNam
upcast builds a model sub-structure from a single view element; `editingDowncast` converts
each model element separately (outer → `toWidget`, inner → `toWidgetEditable`); `dataDowncast`
collapses the structure back into one view element, consuming the inner items so other
-converters skip them. See the full snippet in `docs/framework/how-tos.md` and `widgets.md`.
+converters skip them. See the full snippet in the upstream CKEditor 5 "How-tos" docs
+(ckeditor.com/docs) and `widgets.md`.
## Framework-integration gotcha
diff --git a/.claude/skills/ckeditor5-testing/SKILL.md b/.claude/skills/ckeditor5-testing/SKILL.md
index 8799065fc7..8613946eb1 100644
--- a/.claude/skills/ckeditor5-testing/SKILL.md
+++ b/.claude/skills/ckeditor5-testing/SKILL.md
@@ -32,6 +32,10 @@ file to Vitest, or configuring the runner. For writing the feature itself, use t
## The current setup at a glance
+This describes how the **upstream ckeditor5 monorepo** tests itself (the source of these patterns).
+A standalone plugin package in your own project gets an equivalent Vitest setup from the
+package-generator template; the **test-writing patterns** below transfer unchanged either way.
+
- **Runner:** Vitest (`vitest@^4`), one **project per package**. Config comes from the root
`createVitestConfig({ name: '<short-package-name>' })` factory; each package has a tiny
`vitest.config.ts` that calls it.
@@ -170,27 +174,22 @@ cleanup); model/view asserted via `_getModelData`/`_getViewData` + `toEqual` wit
selections and schema-disallowed contexts; new `src/` lines covered (100% gate); no Chai/Sinon
leftovers; manual tests (if any) under `tests/manual/`.
-## Provenance & updating
-
-This skill was distilled from the CKEditor 5 repository at baseline commit
-**`9ecca53627`** ("Migrated the horizontal line package tests to Vitest", 2026-06-12). Because
-the repo is **mid-migration to Vitest**, this skill reflects the *current* setup verified
+## Provenance & source references
+
+**This skill is self-contained, not tied to any particular project.** Repository paths it cites —
+`vitest.config.ts`, `test_setup.js`, `packages/ckeditor5-…`, `@ckeditor/ckeditor5-…/tests/_utils/…`,
+the baseline commit — point into the **upstream CKEditor 5 repository**
+([github.com/ckeditor/ckeditor5](https://github.com/ckeditor/ckeditor5)), **not your project**. The
+runner/config specifics describe how the ckeditor5 monorepo tests *itself*; the **patterns** (test
+editors, `_setModelData`/`_getModelData`, `vi` spies, `describe`/`it` structure) are portable to any
+project. Don't open these paths as local files unless you are working inside the ckeditor5
+repository. (Note: the model/view helpers are published via the `ckeditor5` / `@ckeditor/ckeditor5-engine`
+npm packages and work downstream; the `tests/_utils` test editors are monorepo-internal — see
+`references/test-utilities.md` for the downstream caveat.)
+
+This skill was distilled from that upstream repository at commit **`9ecca53627`** (mid-2026).
+Because the repo is **mid-migration to Vitest**, the skill reflects the *current* setup verified
against source — not the (stale, Karma-era) published testing docs.
-Primary sources distilled:
-- `vitest.config.ts`, `test_setup.js`, root `package.json` scripts, a package `vitest.config.ts`
-- `packages/ckeditor5-core/tests/_utils/*` (test editors & helpers)
-- `packages/ckeditor5-engine/src/dev-utils/{model,view}.ts` (the `_get*/_set*` helpers)
-- Migrated example tests in `packages/ckeditor5-{paragraph,undo,horizontal-line,bookmark}/tests/**`
-- `docs/framework/contributing/testing-environment.md`,
- `docs/framework/development-tools/testing-helpers.md` (note: partly stale)
-
-To update, diff the sources since the baseline and fold in changes (watch the migration
-progress — more packages move to Vitest over time), then bump the commit reference above:
-
-```bash
-git diff 9ecca53627..HEAD -- vitest.config.ts test_setup.js package.json \
- packages/ckeditor5-core/tests/_utils packages/ckeditor5-engine/src/dev-utils \
- docs/framework/contributing/testing-environment.md \
- docs/framework/development-tools/testing-helpers.md
-```
+To refresh, compare the source/config/test-util paths against commit `9ecca53627` inside a clone of
+ckeditor5 (watch the migration progress), then bump the commit reference here.
diff --git a/.claude/skills/ckeditor5-testing/references/migration-from-karma.md b/.claude/skills/ckeditor5-testing/references/migration-from-karma.md
index d573b30acc..4ad9b700db 100644
--- a/.claude/skills/ckeditor5-testing/references/migration-from-karma.md
+++ b/.claude/skills/ckeditor5-testing/references/migration-from-karma.md
@@ -1,7 +1,12 @@
# Migrating tests: Karma/Mocha/Chai/Sinon → Vitest
-The repo is mid-migration (recent commits migrate packages one by one to Vitest). Many test
-files still use the old stack. When you touch a legacy test, migrate it. This is the mapping.
+> This reference is mainly for working **inside the upstream ckeditor5 repository**, which is
+> mid-migration to Vitest. It's equally useful in any project that still has legacy Karma/Mocha/
+> Chai/Sinon CKEditor tests to bring over. The `test_setup.js`/`tests/_utils` references are
+> upstream paths (see `test-utilities.md`).
+
+The ckeditor5 repository is mid-migration (commits migrate packages one by one to Vitest). Many
+test files still use the old stack. When you touch a legacy test, migrate it. This is the mapping.
## Imports & globals
diff --git a/.claude/skills/ckeditor5-testing/references/patterns.md b/.claude/skills/ckeditor5-testing/references/patterns.md
index a729e8d056..14c4b95512 100644
--- a/.claude/skills/ckeditor5-testing/references/patterns.md
+++ b/.claude/skills/ckeditor5-testing/references/patterns.md
@@ -1,5 +1,10 @@
# Test patterns (Vitest)
+> These patterns are portable to any project. Where examples import test editors from
+> `@ckeditor/ckeditor5-core/tests/_utils/…` (an upstream-repo path), see the downstream caveat in
+> `test-utilities.md` — the `_setModelData`/`_getModelData` helpers are published and work anywhere;
+> the test editors are monorepo-internal.
+
Idiomatic recipes per concern. All examples assume explicit `vitest` imports and a test editor
created in `beforeEach`, destroyed in `afterEach`. Mirror the structure of the feature: a
`*editing` test for schema/conversion/command, a `*ui` test for buttons/dropdowns.
diff --git a/.claude/skills/ckeditor5-testing/references/running-and-config.md b/.claude/skills/ckeditor5-testing/references/running-and-config.md
index 54870553f7..23ccdff0a6 100644
--- a/.claude/skills/ckeditor5-testing/references/running-and-config.md
+++ b/.claude/skills/ckeditor5-testing/references/running-and-config.md
@@ -1,5 +1,13 @@
# Running tests & configuration
+> **Two contexts.** The **per-package scripts** below are what the package-generator produces, so
+> they apply to a standalone plugin package in your own project. The **root runner**,
+> `createVitestConfig` factory, `--files` patterns, manual-test and memory-test sections describe how
+> the **upstream ckeditor5 monorepo** tests itself — paths like `vitest.config.ts`,
+> `packages/*/vitest.config.ts`, and `test_setup.js` refer to that repository
+> ([github.com/ckeditor/ckeditor5](https://github.com/ckeditor/ckeditor5)), not your project. Use the
+> monorepo sections only when working inside ckeditor5 itself.
+
## Per-package scripts
Each package's `package.json` defines:
diff --git a/.claude/skills/ckeditor5-testing/references/test-utilities.md b/.claude/skills/ckeditor5-testing/references/test-utilities.md
index 91e5be1b20..1a1aec3a95 100644
--- a/.claude/skills/ckeditor5-testing/references/test-utilities.md
+++ b/.claude/skills/ckeditor5-testing/references/test-utilities.md
@@ -1,11 +1,20 @@
# Test utilities & data helpers
+> **Path scope.** `@ckeditor/ckeditor5-core/tests/_utils/…` and `packages/…` refer to the upstream
+> CKEditor 5 repository ([github.com/ckeditor/ckeditor5](https://github.com/ckeditor/ckeditor5)), not
+> your project. **Downstream caveat:** the model/view helpers (`_setModelData` etc.) are published
+> and importable from the `ckeditor5` / `@ckeditor/ckeditor5-engine` npm packages, so they work in
+> any project. The **test editors** below live in the monorepo's `tests/_utils` and are generally
+> *not* shipped to npm — inside the ckeditor5 repo import them as shown; in a standalone package,
+> follow your package's own test setup (e.g. the package-generator template) and/or test against a
+> real editor build such as `ClassicEditor`.
+
The building blocks for editor tests: lightweight test editors, shared `_utils`, and the
model/view stringify-parse helpers.
## Test editors (pick the lightest that works)
-All live in `@ckeditor/ckeditor5-core/tests/_utils/` and expose a static async `create()`
+All live in `@ckeditor/ckeditor5-core/tests/_utils/` (upstream) and expose a static async `create()`
returning a Promise. Import with the explicit `.js` extension.
| Editor | Pipelines | Use when |