test-count-artifacts

Count regular files under workspace/test and write the count to count.txt.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/skaile-ai/ai-assets --skill test-count-artifacts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-count-artifacts
Source: https://github.com/skaile-ai/ai-assets/tree/main/testing/skills/test-count-artifacts
Command: npx skills add https://github.com/skaile-ai/ai-assets --skill test-count-artifacts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Count files in a specific workspace path and write the resulting number to a file, enabling deterministic test fixtures and artifact tracking.

Core Features & Use Cases

  • Deterministic file counting for test fixtures.
  • Writes the exact count to workspace/test/count.txt.
  • Use case: validate workspace contents and artifact pipelines in tests.

Quick Start

Execute the skill to count files in workspace/test and write the resulting number to workspace/test/count.txt.

Frequently Asked Questions about test-count-artifacts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I count files in a workspace directory for test fixtures?

Counting files in a workspace directory for test fixtures involves scanning regular files directly under workspace/test/ and writing the resulting numeric count to workspace/test/count.txt for deterministic test assertions.

What is a deterministic file count artifact used for in testing?

A deterministic file count artifact provides a single numeric value representing the exact number of regular files in a directory, which test harnesses assert against to validate workspace contents and artifact pipeline integrity.

Does the file count include subdirectories or hidden files?

No, the file count excludes subdirectories and hidden files. It specifically counts only regular files located directly under the workspace/test/ path to ensure a precise and deterministic numeric output.

How do I write a file count to a text file for automated tests?

You can write a file count to a text file for automated tests by executing this skill, which reads the workspace/test directory and outputs the total count directly to workspace/test/count.txt.

Can I use this file counting approach for validating artifact pipelines?

Yes, you can validate artifact pipelines by reading the numeric count generated in workspace/test/count.txt, allowing your test harness to assert expected file quantities and confirm pipeline integrity.

What is the best way to assert the number of files in a test directory?

The best way to assert the number of files in a test directory is to generate a deterministic count artifact at workspace/test/count.txt, which your test suite can read and compare against expected values.