microsoft/accordant/async-operations
Claude Code and agent skill by microsoft/accordant
- vendor
Checking that the SKILL.md file is still in the repository.
How to model background work, step functions, and polling - use this skill when testing async workflows, job queues, or operations that complete in the background
Install
npx vskill@latest install microsoft/accordant/async-operationsSKILL.md
The same SKILL.md was published earlier as microsoft/accordant/async-operations.
Async Operations in Accordant
Some operations don't complete when the API call returns. You call an endpoint, it returns "Pending," and background work finishes later. Accordant models this with step functions and handles testing with polling.
The Pattern
- API returns immediately (status: Pending)
- Background work happens asynchronously
- Later API calls observe the completed state
Modeling Background Work
Use .Triggers() with AsyncOperation.Create:
Key Parameters
- `isTerminal`: Predicate returning true when background work is done
- `transitions`: Array of possible outcomes (non-determinism — job could complete or fail)
How State Tracking Works
After CreateJob returns, the system could be in either state:
Jobs["job123"] = Pending(still processing)Jobs["job123"] = Completed(already done)Jobs["job123"] = Failed(already failed)
Accordant tracks all possibilities until you observe a response that narrows it down.
Observation Narrows Down State
When GetJob returns { status: "Completed" }:
- States where status = Pending → Eliminated (doesn't match)
- States where status = Completed → Kept (matches!)
- States where status = Failed → Eliminated (doesn't match)
Setting Up Polling
For test execution, configure polling to wait for background work:
Using PollingSetup
How Polling Works
- Execute
CreateJob→ Returns Pending - Wait
WaitTimeInMs - Execute
GetJob→ Check if terminal - If not terminal, repeat from step 2
- If terminal, continue to next operation
- If
MaxRetryCountexceeded → Liveness failure
Liveness Testing
MaxRetryCount acts as a liveness check. If background work never completes:
This catches "stuck" systems — a job that stays Pending forever is wrong, even if no individual response violates the spec.
Manual Polling
If writing tests manually instead of using spec.RunTests():
Single Transition (Simpler Case)
When only one outcome is possible:
Multiple Possible Outcomes
When background work can end in different states:
All three outcomes are valid until observation tells us which actually occurred.
Complete Example: Job Queue
Common Patterns
Polling Until Specific State
Timeout with Validation
Best Practices
- Keep isTerminal simple: Should be a quick check on state
- Cover all outcomes: Include both success and failure transitions
- Set reasonable poll intervals: Not too fast (hammers API), not too slow (slow tests)
- Always set MaxRetryCount: Prevents infinite loops on stuck jobs
- Test liveness: Ensure background work actually completes
Next Steps
- Patterns: Response-dependent state, request derivations
- Troubleshooting: Debug async test failures
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 1 Oct 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagent/skills/async-operations/SKILL.md
Popularity
- Repository stars
- 62
- Repository forks
- 9
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/microsoft/accordant/async-operations)