nexus-testing

A testing guide for finding the real causes of flaky tests—tests that sometimes pass and sometimes fail without code changes. It focuses on intermittent failures, timing problems, and differences between local runs and continuous integration (automated checks run in a shared environment).

In plain words
What is it for?
Use it to investigate intermittent test failures, race conditions, retry-only passes, and unexplained skip or expected-failure markers. It helps document reproduction steps, the likely cause, the smallest durable fix, and how to prevent a repeat.
Why use it?
It helps replace unreliable retries, skips, and temporary workarounds with a reproducible explanation and lasting fix. This reduces false alarms and can reveal concurrency or data problems that may also affect the application.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/aayushostwal/nexus/testing
Any agent
npx skills add aayushostwal/nexus --skill testing
Clone the repo
git clone --depth 1 https://github.com/aayushostwal/nexus

Made for: Claude Code, Codex.

Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,974 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00069 $0.01974
Opus 5 $0.00034 $0.00987
Sonnet 5 $0.00014 $0.00395
Haiku 4.5 $0.00007 $0.00197

Measured 2d ago against content hash 583630d3c3df, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nexus-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/testing/SKILL.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Nexus Flaky Test Root Cause Analyzer

Structured protocol for diagnosing, isolating, and permanently eliminating non-deterministic test failures. Not a retry wrapper — treats flakiness as a first-class defect.

name:             nexus-testing
category:         testing / quality
required_context: test file path, failure frequency, CI log or local output, stack trace if available
expected_inputs:  test name, framework, failure pattern, environment (local/CI/both), reproduction rate
expected_outputs: flakiness type, reproduction steps, root cause (one sentence), narrowest fix +
                  verification command, prevention recommendation

Core Principles

  1. A test failing 1-in-20 runs is still failing — it is a false alarm factory.
  2. A retry without investigation ships unknown risk.
  3. Fix the root cause, not the symptom — masking a race condition makes it fail more often.
  4. Never mark xfail/skip without a linked issue and expiry date.
  5. Test flakiness often mirrors a real production concurrency or data integrity hazard.

Step 1 — Collect Context

Required before any investigation:

Signal How
Failure rate Estimate from CI history (1/5? 1/100?)
Stack trace Full verbatim trace from a failing run
Test path Exact: tests/users/test_create.py::test_create_user
Framework + version pytest --version, jest --version, go version
CI vs local Fails only in CI, only locally, or both?
Parallelism config -n auto, --workers, t.Parallel()?
Recent changes git log --oneline -10 on test file and its imports

If CI-only failure, diff these before reading code: runtime version, OS/arch, parallelism, TZ / NTP, network access, env vars (missing vars silently produce defaults), I/O speed, Docker layer cache.


Step 2 — Classify Flakiness Type

Type Signature Mechanism
Ordering Fails after specific other tests; passes alone Shared mutable state not reset
Timing Fails on slow machines or under load Hard-coded delays, no backoff, wall-clock assertions
Resource Fails parallel, passes single-threaded Port conflicts, shared temp dirs, DB row locks
Environment Fails in CI only Runtime delta, missing env var, OS behavior
External Network errors, connection refused, timeouts Real HTTP/DB calls in test
Concurrency Assertion error varies each run; stack trace differs Thread/async race, missing lock

Read the full file on GitHub · 197 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 197 lines · 69 tokens per session scan A 583630d3c3df

Subscribe to this mod's changes

nexus-testing is a skill published in the GitHub repository aayushostwal/nexus (18 stars, last pushed 23d ago), licensed MIT. It adds 69 tokens to every session and 1,974 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

productize-yourself

当用户在纠结职业/副业/自由职业方向、问「我该做什么才能赚钱/不被替代」、或想找到自己的独特优势时调用。 核心理念: 特殊知识(不可培训、对你像玩对别人像工作) × 产品化(杠杆规模化) = 无可替代的致富定位。 不适用于: 纯求职投递、写简历、已有明确方向的执行细节。 Triggers: 找方向/独特优势/副业/不可替代/productize/special knowledge/moat.

kangarooking/cangjie-skill · 127 tokens

screen-detox

当用户刷手机/短视频/社交媒体上瘾、感觉空虚、想戒断多巴胺零食时调用。 核心理念: 所有屏幕活动与更少幸福相关(作者断言无例外); 屏幕=用长期后果换短期快感的多巴胺零食; 用习惯替换五步戒断。 不适用于: 工作需要屏幕的职业场景(区分工作屏幕与消费屏幕)。 Triggers: 刷手机/上瘾/短视频/社交媒体/多巴胺/戒断/屏幕时间/screen time/dopamine/addiction.

kangarooking/cangjie-skill · 148 tokens

happiness-skill

当用户问「怎么才能更幸福/为什么得到了还不满足/怎么减少焦虑」时调用。 核心理念: 幸福是缺憾感清空的默认状态, 是可训练的技能; 欲望是与自己的契约(得到前不快乐), 同时只留一个重大欲望; 活在当下。 不适用于: 临床抑郁等需要专业治疗的场景(本书方法不能替代医疗)。 Triggers: 幸福/不快乐/欲望/焦虑/知足/活在当下/happiness/desire/anxiety.

kangarooking/cangjie-skill · 136 tokens

long-term-compounding

当用户在选择合作者/生意模式/人生策略、问「要不要长期投入这段关系/这个项目」「如何积累声誉」时调用。 核心理念: 财富、知识、声誉、关系都遵循复利; 只玩长期正和游戏, 与能想象共事一辈子的人合作, 拒绝短期思维交易。 不适用于: 紧急止损、短期现金周转等必须立即决策的场景。 Triggers: 长期/复利/声誉/合作/信任/compounding/long-term/trust.

kangarooking/cangjie-skill · 136 tokens

monkey-mind-meditation

当用户脑子停不下来、焦虑反刍、想学冥想/提升专注力时调用。 核心理念: 内心独白(心猴)是失控程序不是"我"; 用调试模式逐条观察念头, 意识到即失去控制; 冥想=收件箱归零/心灵间歇性禁食。 不适用于: 严重精神疾病急性发作(先就医); 需要立刻处理的实际问题(先做事)。 Triggers: 冥想/焦虑/脑子停不下来/胡思乱想/专注/心猴/monkey mind/meditation/anxiety.

kangarooking/cangjie-skill · 158 tokens

hook-craft

Specializes in chapter openings (hooks) and chapter endings (pulls). Every chapter must start with a reason to keep reading and end with a reason to turn the page. Runs after prose-craft, before chaos-engine. The skill that prevents the reader from putting the book down.

felipelobomotta-blip/book-genesis-v4 · 61 tokens