Agent skill

Counterfact CLI Runtime

by counterfact in counterfact/api-simulator

Update Counterfact CLI option behavior, config resolution, telemetry-safe startup handling, and bootstrap/runtime entrypoint flow.

MITAuto-check passedBackend & APIs

Install Counterfact CLI Runtime

skills CLI
$ npx skills add counterfact/api-simulator --skill counterfact-cli-runtime -a claude-code

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

GitHub CLI
$ gh skill install counterfact/api-simulator counterfact-cli-runtime --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/counterfact/api-simulator.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/counterfact-cli-runtime .claude/skills/counterfact-cli-runtime && 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
counterfact-cli-runtime
GitHub stars
170
Token cost
~584 tokens
SKILL.md length
195 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Update Counterfact CLI option behavior, config resolution, telemetry-safe startup handling, and bootstrap/runtime entrypoint flow.

  • Tasks that involve OpenAPI specifications
  • SKILL.md covers When to use this skill, Files to inspect first, Existing conventions to follow and Common mistakes to avoid, plus 1 more section
  • Calls yarn

What it does

Counterfact CLI Runtime is an agent skill from counterfact/api-simulator. Update Counterfact CLI option behavior, config resolution, telemetry-safe startup handling, and bootstrap/runtime entrypoint flow.

Its SKILL.md is about 580 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 Backend & APIs, covering OpenAPI specifications. It works with OpenAPI. The repository describes itself as: Turn an OpenAPI spec into a local API in one command. Build and test your frontend with custom responses, shared state, and simulated failures, without waiting for the backend. The licence is MIT.

When your agent uses it

  • Tasks that involve OpenAPI specifications

Example prompts

  • “/counterfact-cli-runtime”

What it can do on your machine

Read from SKILL.md and the folder at commit ad1a2a3. 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

    Shell commands in SKILL.md call:

    • yarn

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

  • Network

    No URLs in SKILL.md. Its commands use yarn, which can reach the network depending on how they are called.

    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

Counterfact CLI Runtime loads about 584 tokens when it runs. Until then it costs about 39 tokens; SKILL.md has 195 words of instructions outside code blocks.

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

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 counterfact/api-simulator at commit ad1a2a3, republished under its MIT licence (© counterfact). 195 words, ~584 tokens.

Download SKILL.mdSave it as .claude/skills/counterfact-cli-runtime/SKILL.md (or your agent's skills folder).
name
counterfact-cli-runtime
description
Update Counterfact CLI option behavior, config resolution, telemetry-safe startup handling, and bootstrap/runtime entrypoint flow.
applyTo
packages/counterfact/bin/counterfact.js, packages/counterfact/src/cli/**/*.ts, packages/counterfact/src/util/load-config-file.ts…

Counterfact CLI Runtime Skill

When to use this skill

Use this skill for CLI flags, option precedence, config file loading, startup diagnostics, Node/runtime bootstrap behavior, or telemetry option changes.

Files to inspect first

  • packages/counterfact/bin/counterfact.js
  • packages/counterfact/src/cli/run.ts
  • packages/counterfact/src/cli/telemetry.ts
  • packages/counterfact/src/util/load-config-file.ts
  • packages/counterfact/test/cli/run.test.ts
  • packages/counterfact/docs/reference.md (CLI reference)

Existing conventions to follow

  • Keep packages/counterfact/bin/counterfact.js minimal: version gate + runtime capability probe + delegate to runCli.
  • Keep CLI precedence explicit: CLI flags override config file values (program.getOptionValueSource).
  • Treat sensitive values carefully in logs/telemetry (hash file locations, avoid raw secrets/paths).
  • Preserve existing defaults where no action flags are passed (serve/repl/watch/generate/buildCache behavior).
  • Keep startup status truthful and compact: report only work that has actually completed, do not expose local input/output paths in normal status lines, and use ANSI colour only for an interactive stdout that has not opted out through NO_COLOR.

Common mistakes to avoid

  • Adding heavy logic to packages/counterfact/bin/counterfact.js instead of packages/counterfact/src/cli/.
  • Breaking positional argument shifting with --spec string mode.
  • Logging tokens/secrets or raw private locations.
  • Changing defaults without updating tests and docs in lockstep.

How to validate the change

  • Run: yarn lint, yarn build, yarn test.
  • Run CLI-focused tests: packages/counterfact/test/cli/run.test.ts, packages/counterfact/test/cli/telemetry.test.ts, packages/counterfact/test/cli/check-for-updates.test.ts.
  • For user-facing CLI behavior changes, update docs under packages/counterfact/docs/ and add a changeset.

© counterfact, 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 .github/skills/counterfact-cli-runtime of counterfact/api-simulator.

Open the folder on GitHubat commit ad1a2a3

Compare with similar skills

Counterfact CLI Runtime 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.

Counterfact CLI Runtime compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Counterfact CLI Runtime this skillcounterfact/api-simulator170—~584Automated safety check: PassMIT
ToolJet Marketplace Plugin BuilderToolJet/ToolJet41k—~2.1kAutomated safety check: PassAGPL-3.0
Step Partsearthtojake/text-to-cad18k1 repos~1.5kAutomated safety check: PassMIT
API DesignerJeffallan/claude-skills12k2 repos~2kAutomated safety check: PassMIT
OpenAPI to MCP Servermcp-use/mcp-use11k—~5.2kAutomated safety check: PassApache-2.0
Use Yaakmountain-loop/yaak19k—~1.9kAutomated safety check: PassMIT

Similar skills

  • Turns an API description, such as an OpenAPI file or a Postman collection, into a connector plugin for ToolJet's marketplace and checks it with the repo's validator.

    41k GitHub stars~2.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Step Parts

    earthtojake/text-to-cad

    Find, evaluate, and download common purchasable CAD parts from step.parts, including named off-the-shelf actuators, servos, motors, electronics boards, connectors, screws, bolts, nuts, washers…

    18k GitHub starsUsed in 1 repo~1.5k tokens
    Backend & APIsAuto-check passed
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 2 repos~2k tokens
    Backend & APIsAuto-check passed
  • OpenAPI to MCP Server

    mcp-use/mcp-use

    Turns an OpenAPI or Swagger spec into an MCP server with the mcp-use TypeScript SDK, mapping each operation to a tool, wiring auth, testing and deploying.

    11k GitHub stars~5.2k tokensUpdated today
    Backend & APIsAuto-check passed
  • Use Yaak

    mountain-loop/yaak

    A skill your agent uses when the user mentions Yaak, a Yaak workspace, or the yaak command, or asks to call, hit, or smoke test HTTP/REST endpoints, save or organize API requests for reuse or manual…

    19k GitHub stars~1.9k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Old Coder API Design

    AmazingAng/old-coder

    Reviews or designs an HTTP/JSON API's endpoints, auth, pagination, versioning and deprecations, guarding against inventing a bespoke interface or silently breaking consumers.

    749 GitHub starsUsed in 1 repo~3.4k tokens
    Backend & APIsAuto-check passed

More from counterfact/api-simulator

All 12 skills in this repo
  • Counterfact PR Creation

    counterfact/api-simulator

    Create Counterfact pull requests with the required agent-authored acceptance and repository-learning notes; do not use to review another PR.

    170 GitHub stars~918 tokensUpdated today
    Auto-check passed
  • Counterfact Repl

    counterfact/api-simulator

    Interact with Counterfact mock API server programmatically. An agent skill from counterfact/api-simulator.

    170 GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Build Simulation

    counterfact/api-simulator

    Build a fully simulated API from an OpenAPI spec using Counterfact.

    170 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Counterfact Maintenance

    counterfact/api-simulator

    Keep contributor changes aligned with repository test patterns, diagnostics, black-box test boundaries, release/versioning workflow, documentation requirements, and compatibility.

    170 GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Counterfact Repo Basics

    counterfact/api-simulator

    Provide Counterfact repository orientation, high-level architecture, and the canonical command reference for install/build/test/lint workflows.

    170 GitHub stars~868 tokensUpdated today
    Auto-check passed
  • Route

    counterfact/api-simulator

    Edit Counterfact route files to add endpoint behavior while keeping handlers thin and delegating business logic to context classes.

    170 GitHub stars~341 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Counterfact CLI Runtime

What does Counterfact CLI Runtime do?

Update Counterfact CLI option behavior, config resolution, telemetry-safe startup handling, and bootstrap/runtime entrypoint flow. Counterfact CLI Runtime is an agent skill from counterfact/api-simulator. Update Counterfact CLI option behavior, config resolution, telemetry-safe startup handling, and bootstrap/runtime entrypoint flow.

When should I use Counterfact CLI Runtime?

Counterfact CLI Runtime fits situations like: tasks that involve OpenAPI specifications.

How do I install Counterfact CLI Runtime in Claude Code?

Run `npx skills add counterfact/api-simulator --skill counterfact-cli-runtime -a claude-code`. Or copy the skill folder (.github/skills/counterfact-cli-runtime in counterfact/api-simulator) into .claude/skills/counterfact-cli-runtime in your project. Claude Code loads it when a task matches its description.

How do I install Counterfact CLI Runtime in Codex?

Run `npx skills add counterfact/api-simulator --skill counterfact-cli-runtime -a codex`. Or copy the skill folder (.github/skills/counterfact-cli-runtime in counterfact/api-simulator) into .agents/skills/counterfact-cli-runtime in your project. Codex loads it when a task matches its description.

Can I use Counterfact CLI Runtime 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 counterfact/api-simulator --skill counterfact-cli-runtime -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/counterfact-cli-runtime, .gemini/skills/counterfact-cli-runtime, .github/skills/counterfact-cli-runtime and .opencode/skills/counterfact-cli-runtime in your project.

What does Counterfact CLI Runtime need to run?

Going by SKILL.md and its folder, Counterfact CLI Runtime needs the command-line tools its instructions call (yarn).

Does Counterfact CLI Runtime 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 Counterfact CLI Runtime 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 Counterfact CLI Runtime use?

Counterfact CLI Runtime 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 Counterfact CLI Runtime use?

About 584 tokens (SKILL.md is roughly 2.3k 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 Counterfact CLI Runtime?

Skills that share tags, products or a category with Counterfact CLI Runtime: ToolJet Marketplace Plugin Builder (ToolJet/ToolJet, 41k stars), Step Parts (earthtojake/text-to-cad, 18k stars), API Designer (Jeffallan/claude-skills, 12k stars) and OpenAPI to MCP Server (mcp-use/mcp-use, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Counterfact CLI Runtime?

counterfact (a GitHub organization) maintains it in counterfact/api-simulator, which has 170 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 8, 2026.

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