Agent skill

Fs Fixture

by privatenumber in privatenumber/fs-fixture

Create disposable file system test fixtures from objects, templates, or empty directories with automatic cleanup.

MITAuto-check passedTesting & QA

Install Fs Fixture

skills CLI
$ npx skills add privatenumber/fs-fixture --skill fs-fixture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install privatenumber/fs-fixture fs-fixture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/privatenumber/fs-fixture.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/fs-fixture .claude/skills/fs-fixture && rm -rf skills-src

Use ~/.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/

Facts

Skill name
fs-fixture
GitHub stars
100
Token cost
~1.2k tokens
SKILL.md length
345 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Create disposable file system test fixtures from objects, templates, or empty directories with automatic cleanup.

  • Writing tests that need temporary files
  • SKILL.md covers Quick Start, createFixture(source?, options?), FsFixture Methods and FileTree Values, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • JSON fixtures on disk

What it does

Fs Fixture is an agent skill from privatenumber/fs-fixture. Create disposable file system test fixtures from objects, templates, or empty directories with automatic cleanup. Use when writing tests that need temporary files, directories, symlinks, or JSON fixtures on disk. Keywords - fs, tmp, temp, fixture, testing utility, cleanup, dispose.

Its SKILL.md is about 1.2k 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 data and fixtures. The repository describes itself as: Simple API to create test fixtures on disk. The licence is MIT.

When your agent uses it

  • Writing tests that need temporary files
  • JSON fixtures on disk

Example prompts

  • “/fs-fixture”

What it can do on your machine

Read from SKILL.md and the folder at commit 121f1b9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fs Fixture loads about 1.2k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 345 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from privatenumber/fs-fixture at commit 121f1b9, republished under its MIT licence (© privatenumber). 345 words, ~1,180 tokens.

Download SKILL.mdSave it as .claude/skills/fs-fixture/SKILL.md (or your agent's skills folder).
name
fs-fixture
description
Create disposable file system test fixtures from objects, templates, or empty directories with automatic cleanup. Use when writing tests that need temporary files, directories, symlinks, or JSON fixtures on disk. Keywords - fs, tmp, temp, fixture, testing utility, cleanup, dispose.

Quick Start

ts
import { createFixture } from 'fs-fixture'

// From object — keys are paths, values are content
const fixture = await createFixture({
    'package.json': JSON.stringify({ name: 'test' }),
    'src/index.js': 'export default 42',
})

// Use fixture.path, fixture.readFile(), etc.
await fixture.rm() // Cleanup when done

Auto-cleanup with using (TypeScript 5.2+):

ts
await using fixture = await createFixture({ 'file.txt': 'content' })
// Automatically cleaned up when scope exits

createFixture(source?, options?)

SourceBehavior
{ path: content }Create files from object. Nested objects create directories.
'./path'Copy template directory into fixture
(fixture) => ...Run complex, imperative, or ordered setup and optionally return a FileTree
(omitted)Empty temporary directory
OptionTypeDefaultDescription
tempDirstring | URLos.tmpdir()Custom parent directory
templateFilter(src, dest) => boolean—Filter files when copying template

FsFixture Methods

MethodDescription
fixture.pathAbsolute path to fixture root
getPath(...paths)Resolve path relative to fixture root
exists(path?)Check existence (returns boolean)
readFile(path, encoding?)Read file — 'utf8' returns string, omit for Buffer
writeFile(path, content)Write string or Buffer
readJson<T>(path)Read and parse JSON with type parameter
writeJson(path, data, space?)Write JSON (default: 2-space indent, 0 for minified)
readdir(), readdir(path, options?)List fixture root or directory. Pass '' for root options. { withFileTypes: true } returns Dirent[].
mkdir(path)Create directory recursively
cp(source, dest?)Copy external file/directory into fixture
mv(source, dest)Move or rename within fixture
rm(path?)Delete path, or entire fixture if omitted

FileTree Values

TypeExample
string'file content'
BufferBuffer.from([0x89, 0x50])
Nested object{ dir: { 'file.txt': 'content' } }
Function({ fixturePath, filePath, getPath, symlink }) => symlink('./target')

Path syntax — these are equivalent:

ts
// Nested objects
{ src: { utils: { 'helper.js': 'code' } } }

// Slash-separated keys
{ 'src/utils/helper.js': 'code' }

[!TIP] Slash-separated keys can also group a shared prefix:

ts
await createFixture({
    'file.js': 'import { a } from "my-pkg";',

    'node_modules/my-pkg': {
        'package.json': JSON.stringify({
            name: 'my-pkg',
            type: 'module',
            exports: './index.js'
        }),
        'index.js': 'export const a = 1;'
    }
})

Patterns

Choosing a source
  • Prefer a FileTree for files and directories.
  • Use an initializer function for complex, imperative, or ordered setup, such as initializing a Git repository or running a project setup helper.
  • Return a FileTree from an initializer for declarative files that should be created after setup completes.
  • Use a FileTree entry function for isolated dynamic file content.
ts
const fixture = await createFixture({
    'target.txt': 'real file',
    'link.txt': ({ symlink }) => symlink('./target.txt'),
    'node_modules/pkg': ({ symlink }) => symlink(process.cwd()),
})
Dynamic content
ts
const fixture = await createFixture({
    'info.txt': ({ fixturePath }) => `Root: ${fixturePath}`,
})
Initialization
ts
const fixture = await createFixture(async ({ path, writeJson }) => {
    await writeJson('package.json', { name: 'test-package' })

    // Test-specific setup that needs the fixture path.
    await initializeProject(path)

    return {
        'src/index.js': 'export default 42',
    }
})

The initializer receives the fixture before it is returned. It contains setup with the fixture it configures and can return a FileTree to create after setup completes. Returned files overwrite regular files created during setup, but the tree does not replace the fixture directory. If setup fails, fs-fixture removes the fixture before it rethrows the error.

Commonly used with manten test framework.

© privatenumber, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/fs-fixture of privatenumber/fs-fixture.

Open the folder on GitHubat commit 121f1b9

Compare with similar skills

Fs Fixture 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.

Fs Fixture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fs Fixture this skillprivatenumber/fs-fixture100—~1.2kAutomated safety check: PassMIT
Dev Tenant APInightscout/nocturne139—~1.4kAutomated safety check: PassNone
Rsibench Data Factoryevolvent-ai/RSIBench-Data171—~640Automated safety check: NotesNone
Eval Designagentscope-ai/OpenJudge871—~2.8kAutomated safety check: WarnApache-2.0
Data GenerationRed-Hat-AI-Innovation-Team/sdg_hub164—~381Automated safety check: PassApache-2.0
Migrate Mstest V1v2 To V3dotnet/skills5.6k1 repos~5.5kAutomated safety check: PassMIT

Similar skills

  • Dev Tenant API

    nightscout/nocturne

    Interact with Nocturne's local dev-only API: seed a loginable tenant preloaded with realistic sample data, obtain a browser session (loginLink) or bearer token headlessly, export/re-seed the dev…

    139 GitHub stars~1.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Rsibench Data Factory

    evolvent-ai/RSIBench-Data

    Use inside RSIBench-Data when testing whether an automation agent can improve a target model on a configured benchmark through synthetic Tinker SFT data, Tinker sampling, and E2B-based Harbor…

    171 GitHub stars~640 tokensUpdated 1 mo ago
    Testing & QAAuto-check: notes
  • Eval Design

    agentscope-ai/OpenJudge

    A skill your agent uses when the user needs to design evaluation datasets, create test cases, stratify samples, generate adversarial examples, extract eval dimensions from traces/specs, or build a…

    871 GitHub stars~2.8k tokensUpdated 1 mo ago
    Testing & QAAuto-check: warnings
  • Data Generation

    Red-Hat-AI-Innovation-Team/sdg_hub

    A skill your agent uses when the user wants to run synthetic data generation via scripts — detect environment, execute a flow, and present results.

    164 GitHub stars~381 tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Official

    Use this skill before answering or editing whenever an MSTest v1/v2 project is being upgraded or repaired for v3.

    5.6k GitHub starsUsed in 1 repo~5.5k tokens
    Testing & QAAuto-check passed
  • App Verification

    mblode/agent-skills

    Builds and maintains a repo's own verification harness (verify CLI, doctor, worktree isolation, feature map, seed data) and a reproduce-first bug handoff.

    144 GitHub stars~2.3k tokensUpdated today
    Testing & QAAuto-check passed

Categories

Questions about Fs Fixture

What does Fs Fixture do?

Create disposable file system test fixtures from objects, templates, or empty directories with automatic cleanup. Fs Fixture is an agent skill from privatenumber/fs-fixture. Create disposable file system test fixtures from objects, templates, or empty directories with automatic cleanup.

When should I use Fs Fixture?

Fs Fixture fits situations like: writing tests that need temporary files; JSON fixtures on disk.

How do I install Fs Fixture in Claude Code?

Run `npx skills add privatenumber/fs-fixture --skill fs-fixture -a claude-code`. Or copy the skill folder (skills/fs-fixture in privatenumber/fs-fixture) into .claude/skills/fs-fixture in your project. Claude Code loads it when a task matches its description.

How do I install Fs Fixture in Codex?

Run `npx skills add privatenumber/fs-fixture --skill fs-fixture -a codex`. Or copy the skill folder (skills/fs-fixture in privatenumber/fs-fixture) into .agents/skills/fs-fixture in your project. Codex loads it when a task matches its description.

Can I use Fs Fixture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add privatenumber/fs-fixture --skill fs-fixture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fs-fixture, .gemini/skills/fs-fixture, .github/skills/fs-fixture and .opencode/skills/fs-fixture in your project.

What does Fs Fixture need to run?

SKILL.md names no scripts, command-line tools or credentials: Fs Fixture is instructions for the agent only.

Does Fs Fixture access the network?

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.

Is Fs Fixture safe to install?

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.

What licence does Fs Fixture use?

Fs Fixture is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fs Fixture use?

About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Fs Fixture?

Skills that share tags, products or a category with Fs Fixture: Dev Tenant API (nightscout/nocturne, 139 stars), Rsibench Data Factory (evolvent-ai/RSIBench-Data, 171 stars), Eval Design (agentscope-ai/OpenJudge, 871 stars) and Data Generation (Red-Hat-AI-Innovation-Team/sdg_hub, 164 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fs Fixture?

privatenumber (a GitHub user) maintains it in privatenumber/fs-fixture, which has 100 GitHub stars. The repository was last updated on September 3, 2026.

Source: privatenumber/fs-fixture on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.