flaky-test-investigation
Investigate a flaky or failing test using evidence before proposing a fix.
Skill by jshepelsky
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jshepelsky-flaky-test-investigation
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/flaky-test-investigation
What's inside
- Skill name
flaky-test-investigation- Description
- Investigate a flaky or failing test using evidence before proposing a fix. Detects the test layer (unit/integration vs end-to-end), classifies the failure mode, and gathers proof. Use when a test fails intermittently or a fix isn't obvious.
- License
- MIT
- Instructions
- 49 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Flaky test investigation ## Purpose Investigate a flaky or failing test using evidence before proposing a fix. Works across stacks and across both **fast suites** (unit/integration) and **end-to-end** suites — detect the layer first, then follow the matching workflow. ## Required inputs - the failing command (e.g. `make test`, `npm test`, `pytest -k ...`, `go test ./...`, the E2E runner) - the test name or file - the relevant failure output > **Project profile:** if a `.claude/essentials-profile.md` file exists in the repo, read it first and trust it for this codebase's stack, commands, layout, and conventions. ## Step 0 — Detect the test layer & toolchain ```bash cat package.json 2>/dev/null | grep -A20 '"scripts"' ls Makefile pytest.ini pyproject.toml go.mod Cargo.toml Rakefile playwright.config.* cypress.config.* 2>/dev/null ``` Classify the failure: - **Fast suite** (unit/integration) — runs in-process or against a test harness; failure output names a test framework (PHPUnit/pytest/Jest/Vitest/go test/RSpec) and source-relative test paths. - **End-to-end** — drives the running app (browser or HTTP); spec files under an `e2e/`/`tests/e2e/`/`cypress/` dir, a Playwright/Cypress/Selenium runner, screenshots/traces on failure. The investigation differs by layer. ## Fast-suite failure workflow 1. Capture the exact assertion failure and stack trace. 2. Classify the failure mode: - **Broken logic** — production code returns the wrong value; a real bug. - **Contract mismatch** — the test asserts on the wrong thing (e.g. HTTP status when the handler returns 200 with an error flag in the body; assert on the body's success field instead). - **Auth/setup** — the request needs a valid CSRF token, session, or fixture the test didn't establish. - **Fixture/state** — depends on data the test didn't provision, or state not reset between tests (shared DB rows, rate-limit/lockout counters, global singletons). - **Guard-clause gap** — a new production branch no test exercises. 3. Use the Explore agent (breadth: medium) to find the test file, the production code under test, and shared test support (base test case, HTTP/client helpers, fixture/factory setup, bootstrap). 4. Propose the next narrow action. Don't propose a full fix until the failure mode is confirmed. ## End-to-end failure workflow 1. Capture the exact command and failure excerpt (and any trace/screenshot path). 2. Classify the failure mode: timing/await, shared state, environment difference, non-determinism, order-dependence, or a real server-side logic regression. 3. Identify what dynamic evidence would confirm the classification (a re-run, a trace, a log line, a network capture). 4. Use the Explore agent (breadth: medium) to find the spec file, the fixtures it relies on and how they're provisioned, the wait/await patterns it uses, and any environment differences (target URL, seed data). 5. Propose the next narrow action based on the findings. ## Outputs Explore-agent findings with evidence, the inferred failure mode, and a single next step. Do not propose a full fix until the failure mode is confirmed.
From jshepelsky/claude-essential-plugin, MIT.
More from jshepelsky/claude-essential-plugin
- 0.565score
humanize
jshepelsky
Rewrite text to remove signs of AI-generated writing — inflated significance, promotional language, em-dash overuse, rule of three, AI vocabulary, copula…
SkillAFreshness: AClaude Code +9 - 0.561score
phase-plan
jshepelsky
Order the work into phases with dependencies and blockers so development runs in the most efficient sequence.
SkillAFreshness: AClaude Code +9 - 0.561score
env-test
jshepelsky
Run the feature's tests against a deployed environment - full suites on staging, read-only and data-safe checks on production.
SkillAFreshness: AClaude Code +9 - 0.561score
develop
jshepelsky
Build one phase from the phase plan - code, planned tests, every test type, per-phase code review - then hand off with a branch name, commit message, and a…
SkillAFreshness: AClaude Code +9 - 0.561score
document
jshepelsky
Write and audit documentation after a feature ships - CLAUDE.md, process docs, and anything a future session or developer needs.
SkillAFreshness: AClaude Code +9 - 0.561score
mockup
jshepelsky
Create HTML mockups when no design was supplied, with real research, then review them with a critical eye.
SkillAFreshness: AClaude Code +9 - 0.561score
deploy
jshepelsky
Get the feature deployed to staging (preferred) or production using the project's real mechanism, with preflight, confirmation, and verification.
SkillAFreshness: AClaude Code +9 - 0.561score
dev-setup
jshepelsky
Create and refresh the files that help Claude develop this feature well - CLAUDE.md, the essentials profile, and per-area notes.
SkillAFreshness: AClaude Code +9 - 0.558score
commit
jshepelsky
Stage logical change groups and write a clean commit message from the diff.
SkillAFreshness: AClaude Code +9 - 0.558score
changelog
jshepelsky
Generate release notes from git history since the last tag (or a given range).
SkillAFreshness: AClaude Code +9 - 0.558score
first-run
jshepelsky
One-time setup — detect this codebase and write a profile the essentials agents specialize to.
SkillAFreshness: AClaude Code +9 - 0.553score
dependency-audit
jshepelsky
Audit dependencies for known vulnerabilities, outdated versions, and unused packages.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jun 27, 2026 (4 months ago)
- Last release
- Oct 22, 2026 (6 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from jshepelsky
- 0.565score
humanize
jshepelsky
Rewrite text to remove signs of AI-generated writing — inflated significance, promotional language, em-dash overuse, rule of three, AI vocabulary, copula…
SkillAFreshness: AClaude Code +9 - 0.561score
phase-plan
jshepelsky
Order the work into phases with dependencies and blockers so development runs in the most efficient sequence.
SkillAFreshness: AClaude Code +9 - 0.561score
env-test
jshepelsky
Run the feature's tests against a deployed environment - full suites on staging, read-only and data-safe checks on production.
SkillAFreshness: AClaude Code +9 - 0.561score
deploy
jshepelsky
Get the feature deployed to staging (preferred) or production using the project's real mechanism, with preflight, confirmation, and verification.
SkillAFreshness: AClaude Code +9 - 0.561score
dev-setup
jshepelsky
Create and refresh the files that help Claude develop this feature well - CLAUDE.md, the essentials profile, and per-area notes.
SkillAFreshness: AClaude Code +9 - 0.561score
develop
jshepelsky
Build one phase from the phase plan - code, planned tests, every test type, per-phase code review - then hand off with a branch name, commit message, and a…
SkillAFreshness: AClaude Code +9
Cite this page
flaky-test-investigation skill. Agent Mart. https://agentmart.dev/skills/jshepelsky-flaky-test-investigation (last updated 2026-10-24)