Npx CLI
jwynia/agent-skills
Build and publish npx-executable CLI tools using Bun as the primary toolchain with npm-compatible output.
Agent skill
by microsoft-foundry in microsoft-foundry/foundry-agent-webapp
Guidelines and patterns for writing unit tests in TypeScript using Vitest.
$ npx skills add microsoft-foundry/foundry-agent-webapp --skill writing-unit-tests-typescript -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install microsoft-foundry/foundry-agent-webapp writing-unit-tests-typescript --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/microsoft-foundry/foundry-agent-webapp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/writing-unit-tests-typescript .claude/skills/writing-unit-tests-typescript && 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-unit-tests-typescript" agent skill from https://github.com/microsoft-foundry/foundry-agent-webapp/tree/main/.github/skills/writing-unit-tests-typescript into .claude/skills/writing-unit-tests-typescript/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-unit-tests-typescript", 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/microsoft-foundry/foundry-agent-webapp/tree/main/.github/skills/writing-unit-tests-typescriptType 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 microsoft-foundry/foundry-agent-webapp --skill writing-unit-tests-typescript -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install microsoft-foundry/foundry-agent-webapp writing-unit-tests-typescript --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft-foundry/foundry-agent-webapp.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.github/skills/writing-unit-tests-typescript .agents/skills/writing-unit-tests-typescript && 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-unit-tests-typescript" agent skill from https://github.com/microsoft-foundry/foundry-agent-webapp/tree/main/.github/skills/writing-unit-tests-typescript into .agents/skills/writing-unit-tests-typescript/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-unit-tests-typescript", 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 microsoft-foundry/foundry-agent-webapp --skill writing-unit-tests-typescript -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install microsoft-foundry/foundry-agent-webapp writing-unit-tests-typescript --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft-foundry/foundry-agent-webapp.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.github/skills/writing-unit-tests-typescript .cursor/skills/writing-unit-tests-typescript && 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-unit-tests-typescript" agent skill from https://github.com/microsoft-foundry/foundry-agent-webapp/tree/main/.github/skills/writing-unit-tests-typescript into .cursor/skills/writing-unit-tests-typescript/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-unit-tests-typescript", 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/microsoft-foundry/foundry-agent-webapp.git --path .github/skills/writing-unit-tests-typescript--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 microsoft-foundry/foundry-agent-webapp --skill writing-unit-tests-typescript -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install microsoft-foundry/foundry-agent-webapp writing-unit-tests-typescript --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft-foundry/foundry-agent-webapp.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.github/skills/writing-unit-tests-typescript .gemini/skills/writing-unit-tests-typescript && 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-unit-tests-typescript" agent skill from https://github.com/microsoft-foundry/foundry-agent-webapp/tree/main/.github/skills/writing-unit-tests-typescript into .gemini/skills/writing-unit-tests-typescript/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-unit-tests-typescript", 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 microsoft-foundry/foundry-agent-webapp writing-unit-tests-typescriptInstalls 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 microsoft-foundry/foundry-agent-webapp --skill writing-unit-tests-typescript -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/microsoft-foundry/foundry-agent-webapp.git skills-src && mkdir -p .github/skills && cp -r skills-src/.github/skills/writing-unit-tests-typescript .github/skills/writing-unit-tests-typescript && 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-unit-tests-typescript" agent skill from https://github.com/microsoft-foundry/foundry-agent-webapp/tree/main/.github/skills/writing-unit-tests-typescript into .github/skills/writing-unit-tests-typescript/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-unit-tests-typescript", 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 microsoft-foundry/foundry-agent-webapp --skill writing-unit-tests-typescript -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install microsoft-foundry/foundry-agent-webapp writing-unit-tests-typescript --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft-foundry/foundry-agent-webapp.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.github/skills/writing-unit-tests-typescript .opencode/skills/writing-unit-tests-typescript && 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-unit-tests-typescript" agent skill from https://github.com/microsoft-foundry/foundry-agent-webapp/tree/main/.github/skills/writing-unit-tests-typescript into .opencode/skills/writing-unit-tests-typescript/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-unit-tests-typescript", 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-unit-tests-typescriptGuidelines and patterns for writing unit tests in TypeScript using Vitest.
Writing Unit Tests Typescript is an agent skill from microsoft-foundry/foundry-agent-webapp. Guidelines and patterns for writing unit tests in TypeScript using Vitest.
Its SKILL.md is about 1.5k 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 Unit testing. It works with TypeScript, Vitest and npm. The repository describes itself as: GitHub Copilot enabled repo for building and deploying a web application with Entra ID authentication and integrated with Azure AI Foundry Agents. The licence is MIT.
Read from SKILL.md and the folder at commit f6cb362. 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:
npmnpxFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npm and npx, 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 Unit Tests Typescript loads about 1.5k tokens when it runs. Until then it costs about 26 tokens; SKILL.md has 228 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 microsoft-foundry/foundry-agent-webapp at commit f6cb362, republished under its MIT licence (© microsoft-foundry). 228 words, ~1,509 tokens.
.claude/skills/writing-unit-tests-typescript/SKILL.md (or your agent's skills folder).This skill covers writing unit tests for the frontend using Vitest.
frontend/
├── package.json # vitest + jsdom devDependencies
├── vite.config.ts # Vitest config inline
└── src/
├── config/
│ └── __tests__/
│ └── authConfig.test.ts
├── utils/
│ ├── citationParser.ts
│ ├── sseParser.ts
│ ├── fileAttachments.ts
│ └── __tests__/
│ ├── citationParser.test.ts
│ ├── sseParser.test.ts
│ └── fileAttachments.test.ts
├── services/
│ └── __tests__/
│ └── chatService.test.ts
└── reducers/
├── appReducer.ts
└── __tests__/
└── appReducer.test.ts # Includes state shape snapshotThe Vitest config lives inline in vite.config.ts:
export default defineConfig({
// ... existing config
test: {
globals: true,
environment: "jsdom",
include: ["src/**/*.test.{ts,tsx}"],
},
});import { describe, it, expect } from "vitest";
import { parseCitations, deduplicateAnnotations } from "../citationParser";
describe("citationParser", () => {
describe("parseCitations", () => {
it("returns empty array for empty input", () => {
expect(parseCitations("", [])).toEqual([]);
});
it("extracts citation markers from text", () => {
const text = "Hello [1] world [2]";
const result = parseCitations(text, annotations);
expect(result).toHaveLength(2);
});
});
describe("deduplicateAnnotations", () => {
it("removes duplicate annotations by URL", () => {
const annotations = [
{ url: "https://example.com", title: "Example" },
{ url: "https://example.com", title: "Example Duplicate" },
];
expect(deduplicateAnnotations(annotations)).toHaveLength(1);
});
});
});# Run tests in watch mode (interactive)
cd frontend
npm test
# Run tests once (CI mode)
npm run test:run
# Run with coverage
npm run test:coverage
# Run specific file
npx vitest run src/utils/__tests__/citationParser.test.ts
# Run tests matching pattern
npx vitest run --testNamePattern="parseCitations"| File | Functions to Test |
|---|---|
citationParser.ts | parseContentWithCitations |
sseParser.ts | parseSseLine, splitSseBuffer |
fileAttachments.ts | validateFile, validateImageFile, validateDocumentFile, validateFileCount, getEffectiveMimeType, convertFilesToDataUris |
errorHandler.ts | getUserFriendlyMessage, createAppError, getErrorCodeFromResponse, parseErrorFromResponse, getErrorCodeFromMessage, isTokenExpiredError, isNetworkError, retryWithBackoff |
| File | What to Test |
|---|---|
appReducer.ts | All action types, state transitions, immutability |
For component testing, add @testing-library/react only when needed:
import { render, screen } from "@testing-library/react";
import { ChatMessage } from "../ChatMessage";
it("renders message content", () => {
render(<ChatMessage role="user" content="Hello" />);
expect(screen.getByText("Hello")).toBeInTheDocument();
});Vitest uses Chai-style assertions via expect:
// Equality
expect(actual).toBe(expected); // strict equality (===)
expect(actual).toEqual(expected); // deep equality
// Truthiness
expect(value).toBeTruthy();
expect(value).toBeFalsy();
expect(value).toBeNull();
expect(value).toBeUndefined();
// Numbers
expect(num).toBeGreaterThan(5);
expect(num).toBeLessThanOrEqual(10);
// Strings
expect(str).toContain("substring");
expect(str).toMatch(/regex/);
// Arrays
expect(arr).toHaveLength(3);
expect(arr).toContain(item);
// Objects
expect(obj).toHaveProperty("key");
expect(obj).toMatchObject({ partial: "match" });
// Exceptions
expect(() => throwingFn()).toThrow();
expect(() => throwingFn()).toThrowError("message");
// Async
await expect(asyncFn()).resolves.toBe(value);
await expect(asyncFn()).rejects.toThrow();Use describe blocks to group related tests:
describe("moduleName", () => {
describe("functionName", () => {
it("handles normal case", () => {});
it("handles edge case", () => {});
it("throws on invalid input", () => {});
});
});Use state shape snapshots to prevent accidental state changes from going unnoticed. If a new field is added to AppState without updating the test, it fails:
it('should have expected state shape (update this test when adding new state fields)', () => {
const shape = JSON.stringify(Object.keys(initialAppState).sort());
expect(shape).toBe('["auth","chat","conversations","ui"]');
const convShape = JSON.stringify(Object.keys(initialAppState.conversations).sort());
expect(convShape).toBe('["hasMore","isLoading","list","sidebarOpen"]');
});This forces anyone adding state fields to also add test coverage — the test file becomes the registry of all state. Apply this pattern to any new top-level state domain.
Use the validating-ui-features skill and Playwright when:
| Command | Purpose |
|---|---|
npm test | Watch mode |
npm run test:run | Run once |
npm run test:coverage | With coverage |
npx vitest --ui | Interactive UI |
© microsoft-foundry, 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 .github/skills/writing-unit-tests-typescript of microsoft-foundry/foundry-agent-webapp.
Open the folder on GitHubat commit f6cb362
Writing Unit Tests Typescript 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 Unit Tests Typescript this skillmicrosoft-foundry/foundry-agent-webapp | 127 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Npx CLIjwynia/agent-skills | 165 | — | ~2.4k | Automated safety check: Pass | None | |
| Create Saleor Packagesaleor/apps | 162 | — | ~608 | Automated safety check: Pass | Custom licence | |
| npm Packagejwynia/agent-skills | 165 | — | ~2.1k | Automated safety check: Pass | None | |
| Test Writing WorkflowiOfficeAI/AionUi | 33k | 1 repos | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Creating A Packagec15t/c15t | 1.9k | — | ~913 | Automated safety check: Pass | Apache-2.0 |
jwynia/agent-skills
Build and publish npx-executable CLI tools using Bun as the primary toolchain with npm-compatible output.
saleor/apps
Scaffold a new shared package in the saleor-apps monorepo under ./packages/.
jwynia/agent-skills
Build and publish npm packages using Bun as the primary toolchain with npm-compatible output.
iOfficeAI/AionUi
Sets the test-writing workflow for the repository: risk-first scenario lists, behavior-focused Vitest tests, a full run before each commit and a coverage target.
c15t/c15t
Scaffold a new workspace package in the c15t monorepo. An agent skill from c15t/c15t.
spences10/sveltest
Fix and create Svelte 5 tests with vitest-browser-svelte and Playwright.
microsoft-foundry/foundry-agent-webapp
Provides commit message format and workflow for this repository.
microsoft-foundry/foundry-agent-webapp
Provides SSE streaming patterns for the chat API and frontend.
microsoft-foundry/foundry-agent-webapp
Provides structured plan template for feature implementation.
microsoft-foundry/foundry-agent-webapp
Provides research patterns for Foundry Agent Service SDK. An agent skill from microsoft-foundry/foundry-agent-webapp.
microsoft-foundry/foundry-agent-webapp
Provides deployment commands and troubleshooting for Azure Container Apps.
microsoft-foundry/foundry-agent-webapp
Synchronize MCP server configuration between VS Code (.vscode/mcp.json) and Copilot CLI (~/.copilot/mcp-config.json).
Works with
Categories
Guidelines and patterns for writing unit tests in TypeScript using Vitest. Writing Unit Tests Typescript is an agent skill from microsoft-foundry/foundry-agent-webapp. Guidelines and patterns for writing unit tests in TypeScript using Vitest.
Writing Unit Tests Typescript fits situations like: tasks that involve Unit testing.
Run `npx skills add microsoft-foundry/foundry-agent-webapp --skill writing-unit-tests-typescript -a claude-code`. Or copy the skill folder (.github/skills/writing-unit-tests-typescript in microsoft-foundry/foundry-agent-webapp) into .claude/skills/writing-unit-tests-typescript in your project. Claude Code loads it when a task matches its description.
Run `npx skills add microsoft-foundry/foundry-agent-webapp --skill writing-unit-tests-typescript -a codex`. Or copy the skill folder (.github/skills/writing-unit-tests-typescript in microsoft-foundry/foundry-agent-webapp) into .agents/skills/writing-unit-tests-typescript 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 microsoft-foundry/foundry-agent-webapp --skill writing-unit-tests-typescript -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-unit-tests-typescript, .gemini/skills/writing-unit-tests-typescript, .github/skills/writing-unit-tests-typescript and .opencode/skills/writing-unit-tests-typescript in your project.
Going by SKILL.md and its folder, Writing Unit Tests Typescript needs the command-line tools its instructions call (npm and npx). Our summary lists: Node.js.
SKILL.md contains no URLs. Its commands use npm and npx, which can reach the network depending on how they are called. 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 Unit Tests Typescript 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.5k tokens (SKILL.md is roughly 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 Unit Tests Typescript: Npx CLI (jwynia/agent-skills, 165 stars), Create Saleor Package (saleor/apps, 162 stars), npm Package (jwynia/agent-skills, 165 stars) and Test Writing Workflow (iOfficeAI/AionUi, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
microsoft-foundry (a GitHub organization) maintains it in microsoft-foundry/foundry-agent-webapp, which has 127 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on April 21, 2026.
Source: microsoft-foundry/foundry-agent-webapp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.