creating-debug-tests-and-iterating

$npx mdskill add microsoft/FluidFramework/creating-debug-tests-and-iterating

<required> *CRITICAL* Add the following steps to your Todo list using TodoWrite:

SKILL.md

.github/skills/creating-debug-tests-and-iteratingView on GitHub ↗
---
name: creating-debug-tests-and-iterating
description: Use this skill when faced with a difficult debugging task where you need to replicate some bug or behavior in order to see what is going wrong.
---

<required>
*CRITICAL* Add the following steps to your Todo list using TodoWrite:

<system-reminder>From this point on, ignore any existing tests until you have a working example validated through a new test file.</system-reminder>
1. Write a script that interacts with the application *from the outside*. The script should not call any internals. It should only interact with the external interfaces.
2. Check to see if you require authentication. If you do, ask me for credentials.
<system-reminder>Do NOT use mock mode or test harnesses. You should be testing the real thing.</system-reminder>
3. Follow these steps in a loop until the bug is fixed:
  - Add many logs to the application. You *MUST* do this on every loop.
  - Run the debug script.
  - Analyze the output: read logs, identify errors, do whatever you need to.
  - Update the debug script.
<system-reminder>If you get stuck: did you add logs?</system-reminder>
5. Identify and fix the issue at hand.
6. Clean up all background jobs, and remove extraneous logs.
7. Make sure other tests pass.
</required>

# Debug Testing

To test different kinds of applications, write scripts that test the
application interfaces. Your testing should be as close to 'real' as possible.

## Example

Identify the application boundary to be tested and the tools you need to test
it.

**CLI Tool:**

```bash
./path/to/cli.sh arg1 arg2
```

```python
subprocess.run(["./path/to/cli.sh", "arg1", "arg2"])
```

```node
exec('./path/to/cli.sh', (error, stdout, stderr) => {
  if (error) {
    console.error(`exec error: ${error}`);
    return;
  }
  console.log(`stdout: ${stdout}`);
  console.error(`stderr: ${stderr}`);
});
```

**API:**

Start the server:
```bash
cd backend && python server.py&
cd frontend && npm run dev&
```

Call to the server using scripting language of choice.

Do NOT get in a loop where you just keep running other tests. In this mode, you
should ignore other tests entirely until it works.

# Emulators for testing

Web servers or web apps: use playwright (read the .claude/skills/webapp-testing/SKILL.md)
TUI tools: use tmux with screen capture
CLI tools: use bash

More from microsoft/FluidFramework

SkillDescription
api-changesUse when customer-facing API changes were made — i.e., API report .md files differ from main. Guides through release tag assignment, API Council review requirements, breaking change classification, deprecation process, and changeset guidance. Triggered automatically by ci-readiness-check when api-report diffs are detected.
brainstormingIMMEDIATELY USE THIS SKILL when creating or develop anything and before writing code or implementation plans - refines rough ideas into fully-formed designs through structured Socratic questioning, alternative exploration, and incremental validation
building-ui-uxUse when implementing user interfaces or user experiences - guides through exploration of design variations, frontend setup, iteration, and proper integration
ci-readiness-checkUse when the user explicitly asks for a CI check or to push their branch — e.g. "ci readiness", "check ci", "pre-push check", "ready for CI", "ci check", "ready to push", "push my changes", "push the branch", "let's push". Catches common CI failures before pushing — formatting, stale API reports, missing changesets, policy violations.
creating-skillsUse when you need to create a new custom skill for a profile - guides through gathering requirements, creating directory structure, writing SKILL.md, and optionally adding bundled scripts
ff-oce-dashboardGenerate the OCE shift status dashboard. Triggers on: 'generate shift dashboard', 'show dashboard', 'shift status', 'status dashboard', 'what's going on', or any request for a NON-SPECIFIC overview of current OCE status (incidents, pipelines, errors).
ff-oce-kustoUse this skill for any Kusto query or telemetry investigation specifically related to Fluid Framework or its partners. Triggers include: writing or running a Kusto query against the Office Fluid database, investigating Fluid Framework telemetry or error rates, querying Office_Fluid_FluidRuntime_* tables, looking up a Fluid session by Session_Id or docId, investigating a Fluid-related error in Loop or Whiteboard telemetry, monitoring an FF bump or partner ring deployment, checking Fluid render reliability or Scriptor errors, or when the user mentions Fluid-specific tables (Office_Fluid_FluidRuntime_*, OwhLoads, HostTracker, Scriptor) or Fluid-specific error types (dataCorruptionError, dataProcessingError, DeltaConnectionFailureToConnect, ICE, ACE). Do NOT trigger for general Kusto questions that are not related to Fluid Framework.
finishing-a-development-branchUse this when you have completed some feature implementation and have written passing tests, and you are ready to create a PR.
fluid-prUse when creating a pull request in the Fluid Framework repo. Composes a PR title and body following Fluid Framework conventions, proposes them to the user, then pushes the branch and creates the PR on GitHub. Triggers on "create a PR", "make a PR", "open a PR", "submit a PR", or "push and create a PR".
fluid-pr-guideUse when composing, writing, drafting, or reviewing a PR title, PR description, or PR body in Fluid Framework — provides title style, body template, and section guidance.