Claude Code plugin
Install the Qualflare plugin for Claude Code, run /qf-init once, then generate tests, run your suite, upload results and fix failures from the chat.
Last updated
To use Qualflare from Claude Code, install the Qualflare plugin and run /qf-init once in your project; then /qf-cover, /qf-run and /qf-fix write tests, upload results with qf <identifier> collect and fix failures from the chat.
/qf-covergenerates tests for the source files you changed, or for a whole file or directory with--all, and writes them after your approval./qf-runruns your test suite and uploads the results to Qualflare, or uploads a report you produced yourself./qf-fixreads the last run's failures, makes the smallest source fix and re-runs once.
An optional coverage nudge reminds you, after each response, when you edited source files but no tests.
Before you begin
You need:
- Claude Code, the CLI or desktop app.
- The Qualflare CLI (
qf) on your PATH; see Installation. - Node.js on your PATH, for the coverage nudge: its hook runs
node. - A Qualflare project and a project access token. Creating a token: Editor+ · project (requires the Editor role or higher in the project). Uploading results doesn't need Allow writes. See Access tokens.
Let your coding agent install qf
Optional: paste this prompt into Claude Code to install qf for you.
Install the Qualflare CLI (`qf`) on my machine.
1. Detect my operating system (macOS, Linux, or Windows) and CPU architecture
(amd64 or arm64).
2. If Homebrew is available (macOS/Linux), run: brew install qualflare/tap/qf
3. Otherwise, open https://github.com/qualflare/qualflare-cli/releases/latest,
download the asset matching my OS and architecture
(qf_<version>_<os>_<arch>.tar.gz, or .zip on Windows), extract it, and move
the `qf` binary into a directory on my PATH.
4. Run `qf version` to confirm the install succeeded.Install the plugin
Add the Qualflare marketplace
/plugin marketplace add Qualflare/qualflare-claude-codeInstall the qualflare plugin
/plugin install qualflare@qualflareThe first command adds the Qualflare marketplace. The second installs the qualflare plugin from it, and the plugin stays installed in later sessions. Claude Code's plugin documentation explains where a plugin can be installed.
You should see the /qf-* commands in Claude Code.
Set up your project
Run qf-init from the project root
/qf-init/qf-init:
- detects your tech stack (languages, test frameworks and file counts) across the project, or each workspace in a monorepo;
- confirms the detection with you and accepts corrections;
- writes
.qualflare/test-state.md, a context file that every later session reads at startup, so/qf-coverand/qf-runknow your frameworks from the first message; - prints one
qf login <identifier>line for each identifier that isn't logged in yet, and waits; - asks whether to turn on the coverage nudge, and writes
.qualflare/config.json; - writes a Qualflare section between markers in your project's
CLAUDE.md, so later sessions load the test context.
Log in from your own terminal
When /qf-init prints the qf login <identifier> lines, run each one in your own terminal, not in Claude Code:
qf login <identifier>Then reply done in the chat, or skip to log in later.
qf login asks for the token at a hidden prompt. Never paste a token into the Claude Code chat: the chat is saved in the session transcript. If you did, revoke that token (or ask a Maintainer or Owner to) and create a new one. In CI, set QF_TOKEN instead and run qf login <identifier> --force.
Answer the coverage nudge question
Reply yes to turn the coverage nudge on, or no to leave it off.
Create tokens in your project's Project Settings > Access Tokens (https://app.qualflare.com/project/<project-identifier>/settings/access-tokens). The identifier is only a local name for the CLI, so it doesn't have to match the project. Uploading results doesn't need Allow writes. In a monorepo, each package gets its own identifier — run qf login once per package.
/qf-init is safe to re-run at any time. It overwrites .qualflare/test-state.md with fresh detection results and re-prompts for hook preference and authentication.
Generate, run and fix tests
Once setup is done, three commands cover the typical cycle.
Generate tests for what you changed
After writing or editing source files:
/qf-cover/qf-cover reads .qualflare/test-state.md to know your frameworks, finds the source files changed in this session that lack tests, proposes 2 to 5 test cases per function, and writes them after your approval. Pass a path or glob to scope it:
/qf-cover src/auth/login.ts
/qf-cover packages/api/src/**By default /qf-cover only covers code you changed this session. Pass --all to cover an entire file or directory regardless of recent changes:
/qf-cover --all src/utils/With --all, or in a project with no tests yet, it asks you to narrow the scope to 8 files or fewer per round.
Run the suite and upload results
When you're ready to verify:
/qf-run/qf-run runs your test suite and uploads the results to Qualflare via qf <identifier> collect. Pass a framework slug, such as /qf-run jest, or a package path, optionally followed by a slug, such as /qf-run packages/web jest, to run part of the suite. To upload a report you produced yourself, pass its path and slug: /qf-run zap-report.json zap. For a directory the slug is required, and without one /qf-run asks. For a file without a slug, it detects the format with qf validate and asks you to confirm. Cypress results upload as Mochawesome JSON, so add mochawesome as a dev dependency first. Uploads go to the environment named in QF_ENVIRONMENT, or to development when it is unset. Qualflare refuses an environment the project doesn't have.
/qf-run jest
/qf-run playwrightSee Environments for QF_ENVIRONMENT, and the /qf-run reference for the frameworks it runs itself.
/qf-run requires each identifier to be registered locally with qf login before it can upload. Run /qf-doctor if the upload fails.
Fix failing tests
When tests are red:
/qf-fix/qf-fix reads the last run's result files in .qualflare/results/ and makes the smallest source change for each failing test. It edits source files, not tests: it skips a test whose assertion looks wrong. It then re-runs the affected frameworks once and reports what still fails; run /qf-fix again for another pass. It doesn't upload, so run /qf-run to send the new results to Qualflare. Pass a slug or path to scope which failures to fix:
/qf-fix jest
/qf-fix packages/apiTurn on the coverage nudge
When the nudge is on, the plugin checks the session each time Claude finishes a response. If you edited a source file and no test file, and at least one of those edits was substantive, it prints:
🔍 Qualflare: 3 source file(s) changed without test updates. Run /qf-cover to add coverage.It appears after each response until you edit a test file or turn it off with /qf-hook off. Config files, type definitions and trivial edits don't count. Turn it on or off at any time:
/qf-hook on
/qf-hook offOr check the current setting with /qf-hook (no argument).
Keep the state current
Inspect current state:
/qf-stateShows detected frameworks, file counts, hook setting, and which CLI identifiers are configured locally.
Refresh counts after adding tests:
/qf-updateFaster than a full re-init — re-globs each framework row and updates .qualflare/test-state.md in place. Pass a slug or path to scope the refresh.
Update the plugin
Pull the latest version at any time:
/plugin update qualflareCheck that it works
- Run
/qf-state: each identifier showsconfigured. - After
/qf-run, the summary ends withUploaded to Qualflare ✅, and the launch appears in your project (Analyze launch results).
Troubleshoot
Run /qf-doctor first when something feels wrong:
/qf-doctorIt checks the qf CLI, each package's login, the slug list, config.json and the hook, the age of test-state.md, file-count drift and your framework tooling. It reports ✅, ⚠️ or ❌ per check with a fix command; /qf-doctor lists the checks and thresholds.
When an upload fails, /qf-run prints the CLI's error. Upload errors explains each exit code, and CLI troubleshooting covers the CLI itself.
Most issues are a missing CLI or a missing qf login. Fix what the doctor flags and re-run.
How the plugin differs from Quo and MCP
The Qualflare plugin runs in Claude Code, where you write code, and drives the qf CLI on your machine to write tests, run them and upload results. Quo is the agent inside the Qualflare web app: it works on the project's data, analyzing coverage, suggesting cases and generating steps. The MCP server gives any MCP client, Claude Code included, a live connection to the project's data; the plugin uses no MCP connection.
Related
- Guides: Quo agent · Connect a coding agent (MCP)
- Reference: Claude Code plugin reference · Collect command
- CLI and API: Installation · Configuration · Access tokens
AI filter in Explore
Describe the test cases you want in plain English, and the Qualflare AI filter turns it into Explore filters for state, priority, test type and automation.
Claude Code plugin reference
Reference for the Qualflare plugin for Claude Code: every /qf- command, the coverage nudge rules, state files, authentication and the formats it knows.