momentic-maintain — Claude Code skill: test failure analysis
Investigate where a Momentic run first went wrong, classify the cause, and repair a test when a lasting test change makes sense. Use it to examine failures, retries, and recovered runs.
npx skills add momentic-ai/skills --skill momentic-maintain -a claude-codeWhat momentic-maintain does
The skill investigates a specific run through MCP, tracing failed steps and their screenshots to find the earliest point where the run diverged. For a new classification it uses momentic ai classify; for automated repair and verification, it uses momentic ai triage.
It can inspect branch runs, failures on the main branch, quarantined tests, and runs that succeeded after a retry. Existing classifications and healing state are also part of the investigation. Fetching run metadata through the API requires MOMENTIC_API_KEY; keep the key out of logs and commits. The skill should not weaken a test to conceal an application bug, missing fixture, invalid credentials, outage, or Momentic defect.
What it helps with
- trace a run back to the first step that left the expected state
- classify a test failure from run evidence
- inspect tests that passed only after a retry
- fix an unstable postcondition to reduce retries
- repair a test and verify the change
Example prompts for the agent
- Investigate the Momentic run on my branch and find the first step that went wrong.
- Review failed tests on the main branch for this period and classify their causes.
- Check quarantined tests and fix the unstable condition if that won't hide an application bug.
How to install momentic-maintain
1Skills CLI (Vercel)
npx skills add momentic-ai/skills --skill momentic-maintain -a claude-code2Manually: put the files in place
~/.claude/skills/momentic-maintain/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/momentic-maintain/
1Skills CLI (Vercel)
npx skills add momentic-ai/skills --skill momentic-maintain -a codex2Manually: put the files in place
.agents/skills/momentic-maintain/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add momentic-ai/skills --skill momentic-maintain -a cursor2Manually: put the files in place
.cursor/skills/momentic-maintain/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install momentic-ai/skills momentic-maintain2Manually: put the files in place
.github/skills/momentic-maintain/SKILL.md1Skills CLI (Vercel)
npx skills add momentic-ai/skills --skill momentic-maintain -a gemini-cli2Platform CLI
gemini skills install https://github.com/momentic-ai/skills --path skills/momentic-maintainManually: put the files in place
.devin/skills/momentic-maintain/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add momentic-ai/skills --skill momentic-maintain -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about momentic-maintain
How do I install momentic-maintain in Claude Code?
Run npx skills add momentic-ai/skills --skill momentic-maintain -a claude-code. The skill file is located at ~/.claude/skills/momentic-maintain/SKILL.md.
What does momentic-maintain do?
It investigates Momentic test runs, classifies failures, and helps repair a test when a lasting test change is appropriate. It uses MCP for investigation and Momentic commands for classification and automated repair.
Do I need an API key to use momentic-maintain?
Fetching run metadata through the API requires MOMENTIC_API_KEY. Do not print the key in logs or commit it.