Agent skill · Audited from source
Caliber Testing
skill · caliber-ai-org/ai-setupMIT licenceAudited 10 Oct 2026 · source b38062d63a05
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit b38062d63a05 and found no filesystem, network or shell access and no hard-coded secrets. What it does: 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 variable save/restore…
Cite
Cite this page
ModelsAtlas. “Caliber Testing (caliber-ai-org/ai-setup)”. Retrieved 10 Oct 2026. https://modelsatlas.com/skills/caliber-ai-org/caliber-testing
Trust audit
Audit 0.4.1 · source read 10 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha b38062d63a05 · 10 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publishercaliber-ai-org GitHub organizationOwner of the repository this skill is read from
- Source foldercaliber-ai-org/ai-setup/.agents/skills/caliber-testingThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdictb38062d63a05A new audit runs when the source changes
- Repository statusNot archivedLast push 16 days ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: 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 variable save/restore…
---
name: caliber-testing
description: 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 variable save/restore in beforeEach/afterEach, vi.clearAllMocks() lifecycle, and test file organization. Use when user says 'write tests', 'add test coverage', 'test this', creates *.test.ts files, or when test failures appear in CI. Do NOT use for non-test code or for debugging without writing tests.
---
# Caliber Testing
## Critical
- All test files MUST be placed in `__tests__/` directories parallel to source files: `src/[module]/__tests__/[module].test.ts`
- Register any new `__tests__/` directories in `vitest.config.ts`'s `include` glob (already configured: `src/**/*.test.ts`)
- NEVER mock `src/test/setup.ts` — it is the global LLM provider mock already applied to all tests
- Environment variable tests MUST save `process.env` in `beforeEach`, restore in `afterEach`, and explicitly delete env vars to test absence
- Temporary file/directory cleanup MUST happen in `afterEach`, not in individual test cleanup. Use `fs.rmSync(dir, { recursive: true, force: true })`
- When a test requires unmocking modules mocked in global setup, call `vi.unmock('../module.js')` BEFORE the import statement
- Run `pnpm test` locally and `pnpm test:coverage` before committing to verify coverage thresholds (lines: 50, functions: 50, branches: 50, statements: 50)
## Instructions
### Step 1: Create the test file in the correct directory
Create `src/[module]/__tests__/[module].test.ts`. The parent source file is `src/[module]/[module].ts`.
**Verify**: The `__tests__` directory exists at the same level as the source file being tested.
### Step 2: Import test framework
At the top of every test file, import from `vitest`:
```typescript
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
```
Add additional imports based on what you're testing:
- File system: `import fs from 'fs'; import path from 'path'; import os from 'os';`
- Temporary files: Use `fs.mkdtempSync(path.join(os.tmpdir(), 'caliber-prefix-'))`
- Exec: `import { execSync } from 'child_process';`
**Verify**: All required test utilities are imported before test definitions.
### Step 3: Set up module mocking (if needed)
If testing a module that imports other modules you want to mock:
```typescript
vi.mock('../config.js', () => ({
loadConfig: vi.fn(),
writeConfigFile: vi.fn(),
}));
```
For complex mocks with test-time factory functions (hoisted):
```typescript
const { mockLoadConfig } = vi.hoisted(() => ({
mockLoadConfig: vi.fn(),
}));
vi.mock('../config.js', () => ({
loadConfig: () => mockLoadConfig(),
}));
```
For unmocking global setup mocks (e.g., to test llm/index.js itself):
```typescript
vi.unmock('../index.js');
```
Place all `vi.mock()` and `vi.unmock()` calls BEFORE importing the module under test.
**Verify**: Mock declarations appear before the import of the module being tested.
### Step 4: Organize tests in describe blocks
Group related tests with `describe()`:
```typescript
describe('functionName', () => {
it('returns X when Y', () => {
// test body
});
});
```
**Verify**: Each `it()` test has a clear, complete assertion.
### Step 5: Manage environment and process state
For tests that modify `process.env` or `process.argv`:
```typescript
describe('config tests', () => {
const originalEnv = process.env;
const originalArgv = process.argv;
beforeEach(() => {
process.env = { ...originalEnv }; // Copy, not reference
process.argv = [...originalArgv];
delete process.env.SPECIFIC_VAR; // Explicitly remove vars to test absence
});
afterEach(() => {
process.env = originalEnv;
process.argv = originalArgv;
});
it('tests env var behavior', () => {
process.env.MY_VAR = 'test';
// test code
});
});
```
**Verify**: `beforeEach` creates a copy of env/argv; `afterEach` restores originals; unused env vars are explicitly deleted with `delete process.env.VAR`.
### Step 6: Manage temporary files and directories
For file system tests, create temporary directories and clean them up:
```typescript
describe('file tree', () => {
const dirs: string[] = [];
afterEach(() => {
for (const d of dirs) {
try { fs.rmSync(d, { recursive: true, force: true }); } catch {}
}
dirs.length = 0;
});
it('processes files', () => {
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'caliber-test-'));
dirs.push(tmp);
// use tmp directory
});
});
```
**Verify**: All temporary directories are pushed to a cleanup array and removed in `afterEach`.
### Step 7: Handle mock state cleanup
Before each test, clear mock call history to avoid pollution between tests:
```typescript
beforeEach(() => {
vi.clearAllMocks(); // Reset all mock call counts and return values
});
afterEach(() => {
vi.restoreAllMocks(); // Restore original implementations
vi.resetModules(); // Reset cached module imports (if you reload modules)
});
```
**Verify**: `beforeEach` calls `vi.clearAllMocks()` for providers and `afterEach` calls `vi.restoreAllMocks()`.
### Step 8: Test assertions
Write assertions using `expect()`. Match the patterns from existing tests:
```typescript
// Simple checks
expect(value).toBe(expected);
expect(array).toContain(item);
expect(fn).toThrow('error message');
// Instance checks
expect(obj).toBeInstanceOf(ClassName);
// Mock checks
expect(mockFn).toHaveBeenCalledTimes(1);
expect(mockFn).toHaveBeenCalledWith(arg);
// File system checks
expect(fs.existsSync(path)).toBe(true);
```
**Verify**: Each test has at least one assertion and uses appropriate `expect()` matchers.
### Step 9: Run tests
Run tests locally before committing:
```bash
pnpm test # Run all tests in watch mode
pnpm test:coverage # Check coverage thresholds
pnpm test -- src/my/path/__tests__/my.test.ts # Run single test filExcerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit b38062d
git clone https://github.com/caliber-ai-org/ai-setup git -C ai-setup checkout b38062d63a05
The author documents no install command, so this uses the repository directly. Our verdict covers commit b38062d63a05 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
b38062d63a05
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/caliber-ai-org/caliber-testing/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
All testing skills →caliber-ai-org/ai-setup
Creates a new CLI command following the Commander.js pattern in src/commands/. Handles command registration in src/cli.ts, telemetry tracking via tracked() wrapper, and option parsing. Use when user says add command,…
caliber-ai-org/ai-setup
Discovers and installs community skills from the public registry. Use when the user mentions a technology, framework, or task that could benefit from specialized skills not yet installed, asks 'how do I do X', 'find a…
caliber-ai-org/ai-setup
Adds a new LLM provider implementing LLMProvider interface with call() and stream() methods. Integrates with provider factory in src/llm/index.ts, config detection in src/llm/config.ts, and error handling via tracking…
caliber-ai-org/ai-setup
Saves user instructions as persistent learnings for future sessions. Use when the user says 'remember this', 'always do X', 'from now on', 'never do Y', or gives any instruction they want persisted across sessions.…
caliber-ai-org/ai-setup
Add a new deterministic scoring check in src/scoring/checks/ that evaluates config quality. Follows the Check[] return pattern, uses point constants from src/scoring/constants.ts, and integrates via…
caliber-ai-org/ai-setup
Sets up Caliber for automatic AI agent context sync. Installs pre-commit hooks so CLAUDE.md, Cursor rules, and Copilot instructions update automatically on every commit. Use when Caliber hooks are not yet installed or…
Add this badge to your README
[](https://modelsatlas.com/skills/caliber-ai-org/caliber-testing/)
<a href="https://modelsatlas.com/skills/caliber-ai-org/caliber-testing/"><img src="https://modelsatlas.com/skills/caliber-ai-org/caliber-testing/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about Caliber Testing
What does the Caliber Testing skill do?
Is Caliber Testing safe to install?
What can Caliber Testing access on my machine?
How current is this page?
Sources
- github.com/caliber-ai-org/ai-setup/tree/master/.agents/skills/ca — the audited source at commit b38062d63a05 and every finding aboveObserved · 10 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Caliber Testing skill do?
- Is Caliber Testing safe to install?
- What can Caliber Testing access on my machine?