add-test
Skill4 starsChanged 9 months agoMITView on GitHub
Add a new integration test to PilotSwarm test suite. Tests verify end-to-end flows through PilotSwarmClient, duroxide orchestration, and the Copilot SDK.
- Reads credentials
5 other projects use a version of this.
Adopted by
Most recently taken up by
- flavien-ia/hypervibe-harnesstheir own version, first seen Oct 4, 2026
- hamakyo/okf-skillstheir own version, first seen Aug 21, 2026
- ficaviolaodorata520/met-museum-mcp-servertheir own version, first seen Jun 1, 2026
- open-metadata/ai-sdktheir own version, first seen Feb 25, 2026
- kt057/claude-code-boilerplatetheir own version, first seen Feb 8, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- flavien-ia/hypervibe-harness★ 44same name
- open-metadata/ai-sdk★ 15same name
- hamakyo/okf-skills★ 2same name
- kt057/claude-code-boilerplate★ 1same name
- ficaviolaodorata520/met-museum-mcp-server★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository22 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- duroxide-orchestration-versioningSkill
- add-activitySkill
- add-eventSkill
- add-toolSkill
- agent-versioningSkill
- azure-ps-test-runner-vmSkill
- debug-orchestrationSkill
- debug-testSkill
- horizondb-idiosyncrasiesSkill
- horizon-facts-eval-sweepSkill
- investigate-duroxide-runtimeSkill
- pilotswarm-aks-deploySkill
- pilotswarm-aks-resetSkill
- pilotswarm-new-env-deploySkill
- pilotswarm-perfSkill
- pilotswarm-portal-app-regSkill
- pilotswarm-portal-auth-assignmentsSkill
- pilotswarm-releaseSkill
- pilotswarm-tuiSkill
- pilotswarm-vpn-client-profileSkill
- schema-migrationSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
No flag means full PostgreSQL.
- Very specific: line 75
Use describe.concurrent() for file-level parallelism within the vitest runner.
- Very specific: line 76
Use TIMEOUT constant (120s default) for sendAndWait.
- Very specific: line 77
Use assertion helpers from test/helpers/assertions.js.
- Very specific: line 78
Use describe/it from vitest.
- Distinctive: line 81
If a change adds or modifies a TUI keybinding, update the startup keybinding hint/splash and the help dialog/modal at the same time, and …
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
For machine setup and provider coverage, read
docs/developer/contributing/local-ci-and-tests.md and .github/CI.md.
No flag means full PostgreSQL; --all-providers adds HDB-specific coverage;
--with horizondb runs the complete suite on HDB. Default file concurrency is
8. New SDK test files join additive HDB coverage unless explicitly reviewed in
scripts/provider-test-coverage.json. CI requires real HDB and rejects skips.
Add a New Test
Integration tests live in packages/sdk/test/local/ as individual .test.js files (or in subdirectories like sub-agents/). They require a running PostgreSQL database and a GitHub token (in .env). Tests use vitest with describe/it.
Steps
- Create a new test file in
packages/sdk/test/local/following this pattern:
import { describe, it, beforeAll } from "vitest";
import { createTestEnv, preflightChecks } from "../helpers/local-env.js";
import { withClient } from "../helpers/local-workers.js";
import { assert, assertNotNull } from "../helpers/assertions.js";
const TIMEOUT = 120_000;
async function testMyFeature(env) {
await withClient(env, async (client) => {
const session = await client.createSession();
console.log(" Sending: prompt text");
const response = await session.sendAndWait("prompt text", TIMEOUT);
console.log(` Response: "${response}"`);
assertNotNull(response, "Should get a response");
});
}
describe.concurrent("My Feature", () => {
beforeAll(async () => { await preflightChecks(); });
it("My Test Case", { timeout: TIMEOUT }, async () => {
const env = createTestEnv("my-feature");
try { await testMyFeature(env); } finally { await env.cleanup(); }
});
});- Add to the vitest config — the file will be auto-discovered if it matches
test/local/**/*.test.js. Ensure the vitest config includes the path. - Run the test:
cd packages/sdk
npx vitest run test/local/my-feature.test.js # run just this file
npx vitest run test/local/my-feature.test.js -t "My Test" # filter by test name
./scripts/run-tests.sh --suite=my-feature # via the runner scriptPatterns
withClient(env, fn)— spins up a co-located worker + client pair, auto-forwardssetSessionConfig. Use for most tests.- Manual worker/client — for testing specific worker features (e.g.,
registerTools), create them manually outsidewithClient. - Tool tests — set a
let toolCalled = falseflag, assert it'strueafter the prompt. - Event tests — use
session.on()orsession.getMessages(), add asetTimeoutdelay for polling. - Timer tests — use
waitThreshold: 0in client opts to force durable timers even for short waits. - CMS validation — use
createCatalog(env)andvalidateSessionAfterTurn(env, sessionId)fromtest/helpers/cms-helpers.js.
Conventions
- No custom system prompts — use
client.createSession()without overridingsystemMessage. The default agent prompt should be sufficient. If it isn't, fix the product, not the test. - No retries — never add
retryto test configs. Fix the root cause. - Use
describe.concurrent()for file-level parallelism within the vitest runner. - Use
TIMEOUTconstant (120s default) forsendAndWait. - Use assertion helpers from
test/helpers/assertions.js. - Use
describe/itfromvitest. - Log key values with
console.log(" ...")for debuggability. - Each test creates its own
envviacreateTestEnv()for schema isolation. - If a change adds or modifies a TUI keybinding, update the startup keybinding hint/splash and the help dialog/modal at the same time, and add or update validation coverage for the affected user flow when practical.
Key files
packages/sdk/test/local/— all test filespackages/sdk/test/helpers/— shared helpers (assertions, fixtures, local-env, local-workers, cms-helpers)packages/sdk/vitest.config.js— vitest configurationscripts/run-tests.sh— shell runner for all suites
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

