Testing mastracode TUI features interactively in Konsole. Covers model configuration, thread lifecycle, task state isolation, and common blockers.
npx skills add https://github.com/mastra-ai/mastra --skill testing-mastracode-tui
Guide for interactive testing of mastracode's terminal UI in Konsole.
OPENROUTER_API_KEY — for using OpenRouter as a custom provider when Anthropic/OpenAI keys are unavailable cd /home/ubuntu/repos/mastra
COREPACK_ENABLE_STRICT=0 pnpm build:mastracode
This may take a few minutes. If pnpm has corepack issues, install directly: npm install -g [email protected]
@mastra/core or @mastra/memory, use --continue to let downstream packages (including mastracode) still build: COREPACK_ENABLE_STRICT=0 pnpm turbo build --filter ./mastracode --continue
@mastra/core/workspace, run pnpm build:core first.If you don't have a direct Anthropic/OpenAI API key, configure OpenRouter as a custom provider:
~/.local/share/mastracode/settings.json: {
"customProviders": [
{
"name": "OpenRouter",
"url": "https://openrouter.ai/api/v1",
"apiKey": "<OPENROUTER_API_KEY value>",
"models": ["minimax/minimax-m2.7"]
}
],
"models": {
"activeModelPackId": "custom:Custom",
"modeDefaults": {
"build": "openrouter/minimax/minimax-m2.7",
"plan": "openrouter/minimax/minimax-m2.7",
"fast": "openrouter/minimax/minimax-m2.7"
}
},
"customModelPacks": [
{
"name": "Custom",
"models": {
"build": "openrouter/minimax/minimax-m2.7",
"plan": "openrouter/minimax/minimax-m2.7",
"fast": "openrouter/minimax/minimax-m2.7"
},
"createdAt": "2026-01-01T00:00:00.000Z"
}
]
}
/models → select "Custom" → "Activate".build openrouter/minimax/minimax-m2.7).cd /home/ubuntu/repos/mastra/mastracode
COREPACK_ENABLE_STRICT=0 pnpm cli
On first launch, mastracode may show a setup wizard. Select "Skip" to proceed to the main TUI without configuring models interactively.
| Command | Action |
| ---------- | ------------------------------------------------ |
| /new | Create a new empty thread |
| /threads | Open thread selector (↑↓ navigate, Enter select) |
| /clone | Clone current thread |
| /models | Switch model pack |
| /help | Show all available commands |
For visual/rendering bugs (e.g., border alignment, padding, wrapping), writing a quick tsx script that directly renders the component is more reliable than visual inspection alone:
cd /home/ubuntu/repos/mastra/mastracode
npx tsx test-script.ts
Key approach:
UserMessageComponent from ./src/tui/components/user-message.js)Spacer components when measuringThis approach catches bugs that are hard to see visually and provides concrete pass/fail evidence.
The key scenario for thread state testing:
task_write tool explicitly. Some models (e.g., minimax) may not call it automatically — you may need to say something like: "Please use the task_write tool to create a task list with 3 items: Fix login bug, Add unit tests, Update docs"/new: The task progress component should completely disappear. The screen should show only "Ready for new conversation" and an empty input./threads switch: Switch back to the original thread — messages and tasks should restore correctly./clone: Cloned threads should start with empty tasks (tasks are ephemeral, not persisted to clones).GOOGLE_GENERATIVE_AI_API_KEY for the OM model. Fix this by setting the OM model to an OpenRouter model via /om or in settings.json (models.omModelOverride). Configure the OM model if you expect observation to trigger during testing./models in the TUI to activate the custom pack.pnpm cli fails with module resolution errors, run pnpm build:mastracode (or with --continue) from the repo root to build all transitive dependencies.cd /home/ubuntu/repos/mastra
COREPACK_ENABLE_STRICT=0 pnpm --filter mastracode exec vitest run src/tui/__tests__/
Some pre-existing test failures may exist in the broader test suite — focus on tests relevant to the feature being verified.
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Use when implementing any feature or bugfix, before writing implementation code
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development.
Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding assays, expression testing, thermostability measurements, enzyme activity assays, or protein sequence optimization. Also use for submitting experiments via API, tracking experiment status, downloading results, optimizing protein sequences for better expression using computational tools (NetSolP, SoluProt, SolubleMPNN, ESM), or managing protein design workflows with wet-lab validation.
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.
Take mastra-ai/testing-mastracode-tui from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm, npx.
Without those the skill loads but fails at the first command.