Creating A Package
c15t/c15t
Scaffold a new workspace package in the c15t monorepo. An agent skill from c15t/c15t.
How to write tests in the Portable Text Editor monorepo. An agent skill from portabletext/editor.
$ npx skills add portabletext/editor --skill writing-tests -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install portabletext/editor writing-tests --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/portabletext/editor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/writing-tests .claude/skills/writing-tests && rm -rf skills-srcUse ~/.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/
Install the "writing-tests" agent skill from https://github.com/portabletext/editor/tree/main/.agents/skills/writing-tests into .claude/skills/writing-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-tests", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/portabletext/editor/tree/main/.agents/skills/writing-testsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add portabletext/editor --skill writing-tests -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install portabletext/editor writing-tests --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/portabletext/editor.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/writing-tests .agents/skills/writing-tests && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "writing-tests" agent skill from https://github.com/portabletext/editor/tree/main/.agents/skills/writing-tests into .agents/skills/writing-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-tests", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add portabletext/editor --skill writing-tests -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install portabletext/editor writing-tests --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/portabletext/editor.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/writing-tests .cursor/skills/writing-tests && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "writing-tests" agent skill from https://github.com/portabletext/editor/tree/main/.agents/skills/writing-tests into .cursor/skills/writing-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-tests", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/portabletext/editor.git --path .agents/skills/writing-tests--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add portabletext/editor --skill writing-tests -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install portabletext/editor writing-tests --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/portabletext/editor.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/writing-tests .gemini/skills/writing-tests && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "writing-tests" agent skill from https://github.com/portabletext/editor/tree/main/.agents/skills/writing-tests into .gemini/skills/writing-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-tests", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install portabletext/editor writing-testsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add portabletext/editor --skill writing-tests -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/portabletext/editor.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/writing-tests .github/skills/writing-tests && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "writing-tests" agent skill from https://github.com/portabletext/editor/tree/main/.agents/skills/writing-tests into .github/skills/writing-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-tests", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add portabletext/editor --skill writing-tests -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install portabletext/editor writing-tests --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/portabletext/editor.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/writing-tests .opencode/skills/writing-tests && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "writing-tests" agent skill from https://github.com/portabletext/editor/tree/main/.agents/skills/writing-tests into .opencode/skills/writing-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-tests", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
writing-testsHow to write tests in the Portable Text Editor monorepo. An agent skill from portabletext/editor.
Writing Tests is an agent skill from portabletext/editor. How to write tests in the Portable Text Editor monorepo. Use whenever writing or editing tests in PTE packages. Covers test placement, harnesses, deterministic fixtures, and the house assertion style (no indirection, full values with toEqual).
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 Testing & QA, covering Test generation and Monorepo tooling. It works with Vitest. The repository describes itself as: The Standalone Portable Text Editor. The licence is MIT.
Read from SKILL.md and the folder at commit 60a494b. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
pnpmrgFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Writing Tests loads about 1.9k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 997 words of instructions outside code blocks.
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.
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.
The full file from portabletext/editor at commit 60a494b, republished under its MIT licence (© portabletext). 997 words, ~1,899 tokens.
.claude/skills/writing-tests/SKILL.md (or your agent's skills folder).Before writing any test, find its existing home. Always search for an established suite covering the domain (ls tests/ | grep -i <topic>, rg -l <mechanism> tests/) and read its scenario list before creating a file. The canonical suites are broad (behavior-api.test.tsx carries 30+ Behavior contract scenarios); a contract pin belongs next to its siblings, where reviewers and future failures will look for it. A new file is the exception, for a genuinely new domain, not the default. Also check whether the contract is already pinned in a different form before adding it at all.
The file extension is the discriminator, never a .browser suffix:
*.test.tsx runs in the browser project (playwright: chromium, firefox, webkit)*.test.ts runs in the unit project (node)*.test-d.ts is type-level, using expectTypeOf from vitestgherkin-tests/*.feature + racejar for behavior specs (Feature({featureText, stepDefinitions, parameterTypes}))When scaffolding a new package, mirror plugin-sdk-value's vitest config: a browser project including src/**/*.test.tsx and a unit project including src/**/*.test.ts.
createTestEditor from @portabletext/editor/test/vitest (inside the editor package: ../src/test/vitest). Returns {editor, locator}. Plugins and probes go in as children, but note they mount as siblings after PortableTextEditable; a provider that must wrap the editable needs a hand-rolled render with a comment explaining why.createTestSnapshot (in the editor package: test-utils/create-test-snapshot; in plugins: duplicate it locally on public types, it is ~30 lines).createTestKeyGenerator from @portabletext/test. It is deterministic (k0, k1, ...), which is what makes full-literal assertions possible. Generated keys may be asserted literally.userEvent (userEvent.type(locator, 'foo')). Typing with no caret set lands at the block start.editor.send({type: ...}) with full payloads. This includes native-shaped events: drag.dragover, drag.drop etc. accept complete position/dragOrigin/originEvent objects, so no DOM event simulation is ever needed.vi.waitFor around the assertion that proves the trigger landed. Debounced channels (the mutation batcher) need their own vi.waitFor; comparing them synchronously after another assertion passes is a race.setTimeout, arbitrary delays), even for negative asserts. To prove "nothing was emitted", create a deterministic flush point: perform a local edit through the same ordered channel and assert the full emission list contains exactly that edit's patches, a would-be echo would have to surface no later than the edit's own emission. This also upgrades the negative assert to a full-value pin.vi.waitFor on the emission that carries it) and deliver it after a later observable anchor (the subsequent flush landing in the collected events). Staleness is then a property of which value arrives, independent of runner speed. A fixed-delay reconstruction is flaky by construction on slow runners, even when its premise check fails in the safe direction: the CI failure is honest but intermittent, which is still a broken test.toEqual: the full value array, the full event array, the full operation objects. Deterministic keys make this possible. A full-value assertion pins ordering, count, and content at once, and drift shows up as a readable diff.expect.objectContaining, expect.arrayContaining, expect.any, expect.anything, toMatchObject, and toBeDefined are banned. The pte/no-weak-value-assertions lint rule fails on them in every test file.createTestKeyGenerator and assert the generated keys literally. Create the key generator and fixtures inside each test, so the keys a test sees never depend on which tests ran before it.expect.stringContaining and expect.stringMatching stay allowed for error and warning text, where the full message would couple the test to its wording.toTextspec(editor.getSnapshot().context) and assert the textspec string ('B: foo bar|'), which is itself a full-value assertion in compact notation.EventListenerPlugin collecting EditorEmittedEvents) assert the whole sequence; do not filter event types out to make assertions easier.test('Scenario: ...') naming for integration tests. Every integration test carries its own Scenario:; a describe may group by mechanism but never carries the scenario, narration, or a comment preamble.describe(fn.name, ...) (for example describe(buildIndexMaps.name, ...)), tying the group to the symbol it pins and surviving renames. Every other describe and every test name is prose describing behavior. A quoted identifier string is the one banned form: describe('isActiveListItem', ...) goes stale on rename without gaining readability.test.fails asserting the desired behavior: it documents the bug executably, and the fix flips it to a plain test (CI reports it as unexpectedly passing until someone does)."...set's fallout..."), never with \u escapes or backslash-escaping. Prettier keeps whichever quote style avoids the escape.function block(key, text): PortableTextBlock), local to the test file.From the package: pnpm check:types, pnpm test:unit, pnpm test:browser (or :chromium while iterating), pnpm build. From the repo root: pnpm check:lint, pnpm check:knip. The unit project fails on "no tests found": a package with only browser tests needs at least one .test.ts, which the drift-alarm suite usually provides.
© portabletext, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/writing-tests of portabletext/editor.
Open the folder on GitHubat commit 60a494b
Writing Tests 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Writing Tests this skillportabletext/editor | 280 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Creating A Packagec15t/c15t | 1.9k | — | ~913 | Automated safety check: Pass | Apache-2.0 | |
| MoAI TDD Workflowmodu-ai/moai-adk | 1.2k | — | ~3.1k | Automated safety check: Pass | Apache-2.0 | |
| Ever Worksever-works/ever-works | 158 | — | ~2.2k | Automated safety check: Pass | AGPL-3.0 | |
| Concept Page Test Writerleonardomso/33-js-concepts | 67k | — | ~5.5k | Automated safety check: Pass | MIT | |
| Ckeditor5 TestingTriliumNext/Trilium | 38k | — | ~3.3k | Automated safety check: Pass | AGPL-3.0 |
c15t/c15t
Scaffold a new workspace package in the c15t monorepo. An agent skill from c15t/c15t.
modu-ai/moai-adk
Drives test-first development through the RED, GREEN, REFACTOR cycle, with a config switch that selects between TDD and a DDD workflow for existing code.
ever-works/ever-works
Repo-specific guide to the Ever Works monorepo (ever-works/ever-works) — its pnpm + Turborepo layout, the per-workspace test runners (Jest vs Vitest vs Playwright), file-naming and import-alias…
leonardomso/33-js-concepts
Generates Vitest tests for every runnable code example on a JavaScript concept documentation page, following a four-phase extraction and conversion process.
TriliumNext/Trilium
Testing CKEditor 5 plugins in the Trilium monorepo. An agent skill from TriliumNext/Trilium.
caliber-ai-org/ai-setup
Writes Vitest tests following project patterns: tests/ directories, vi.mock() for module mocking with vi.hoisted() for test-time factories, global LLM mock from src/test/setup.ts, environment…
portabletext/editor
Write clear, concise, accessible product copy for interfaces, docs, and system messages.
portabletext/editor
How to write changesets in the Portable Text Editor monorepo.
portabletext/editor
How to write commit messages in the Portable Text Editor monorepo.
portabletext/editor
How the next prerelease branch for the upcoming editor major works in the Portable Text Editor monorepo.
portabletext/editor
How to backport a fix from main to a maintenance branch (editor-v6.x, editor-v7.x) in the Portable Text Editor monorepo.
portabletext/editor
How to write and review code comments in the Portable Text Editor monorepo.
Works with
Categories
How to write tests in the Portable Text Editor monorepo. An agent skill from portabletext/editor. Writing Tests is an agent skill from portabletext/editor. How to write tests in the Portable Text Editor monorepo.
Writing Tests fits situations like: editing tests in PTE packages; tasks that involve Test generation; tasks that involve Monorepo tooling.
Run `npx skills add portabletext/editor --skill writing-tests -a claude-code`. Or copy the skill folder (.agents/skills/writing-tests in portabletext/editor) into .claude/skills/writing-tests in your project. Claude Code loads it when a task matches its description.
Run `npx skills add portabletext/editor --skill writing-tests -a codex`. Or copy the skill folder (.agents/skills/writing-tests in portabletext/editor) into .agents/skills/writing-tests in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add portabletext/editor --skill writing-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/writing-tests, .gemini/skills/writing-tests, .github/skills/writing-tests and .opencode/skills/writing-tests in your project.
Going by SKILL.md and its folder, Writing Tests needs the command-line tools its instructions call (pnpm and rg).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
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.
Writing Tests is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Writing Tests: Creating A Package (c15t/c15t, 1.9k stars), MoAI TDD Workflow (modu-ai/moai-adk, 1.2k stars), Ever Works (ever-works/ever-works, 158 stars) and Concept Page Test Writer (leonardomso/33-js-concepts, 67k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
portabletext (a GitHub organization) maintains it in portabletext/editor, which has 280 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 6, 2026.
Source: portabletext/editor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.