Completing The Race
Agent Buildingcompleting-the-raceCompleting The Race is an Agent Skill for agent building published in the GoogleCloudPlatform/race-condition repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Use when the simulator finishes its race-tick loop and must wrap up: compiling final results from tick snapshots, stopping the RaceCollector, and reporting outcomes to other agents. Triggered once per simulation, after the last tick.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/GoogleCloudPlatform/race-condition/blob/HEAD/agents/simulator/skills/completing-the-race/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/completing-the-race, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Completing the Race
You use this skill to wrap up the simulation after the race phase completes. This is the final phase of the simulation lifecycle.
Instructions
- Compile Results: Call
compile_resultsfirst to aggregate all tick snapshots into final race metrics (vitals trends, status counts, notable events, and sampling quality). - Stop Collector: Call
stop_race_collectorto shut down the Redis subscription and clean up the RaceCollector resources. - Report (Optional): Use
call_agentto communicate final results to other agents (e.g., planner, dashboard) as needed for post-race reporting.
Tools
compile_results(tool_context): Read tick_snapshots from state and aggregate into vitals_trend, final_status_counts, notable_events, sampling_quality, and avg_runners_reporting.stop_race_collector(tool_context): Look up the RaceCollector by session_id and stop it to release Redis resources.call_agent(agent_name, message, tool_context): Delegate inter-agent communication via the shared A2A utility.