Agent skill

Agent Recorder Fixtures

by SwiftedMind in SwiftedMind/SwiftAgent

Record real OpenAI/Anthropic HTTP back-and-forth (requests + responses, including streaming text/event-stream) and print paste-ready Swift fixtures for SwiftAgent unit tests (ReplayHTTPClient) using…

MITAuto-check passedMobile

Install Agent Recorder Fixtures

skills CLI
$ npx skills add SwiftedMind/SwiftAgent --skill agent-recorder-fixtures -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SwiftedMind/SwiftAgent agent-recorder-fixtures --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SwiftedMind/SwiftAgent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/agent-recorder-fixtures .claude/skills/agent-recorder-fixtures && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-recorder-fixtures
GitHub stars
227
Token cost
~906 tokens
SKILL.md length
309 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Record real OpenAI/Anthropic HTTP back-and-forth (requests + responses, including streaming text/event-stream) and print paste-ready Swift fixtures for SwiftAgent unit tests (ReplayHTTPClient) using…

  • Adding/updating any provider adapter tests (text
  • SKILL.md covers Overview, Workflow and Notes
  • Calls xcodebuild; needs OPENAI_API_KEY and ANTHROPIC_API_KEY
  • Structured outputs

What it does

Agent Recorder Fixtures is an agent skill from SwiftedMind/SwiftAgent. Record real OpenAI/Anthropic HTTP back-and-forth (requests + responses, including streaming text/event-stream) and print paste-ready Swift fixtures for SwiftAgent unit tests (ReplayHTTPClient) using the AgentRecorder CLI or HTTPReplayRecorder. Use when adding/updating any provider adapter tests (text, streaming, structured outputs, tool calls), when payload formats change, or when debugging agent loop mismatches by inspecting recorded JSON/SSE payloads.

Its SKILL.md is about 910 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering iOS development, Autonomous loops and Unit testing. It works with OpenAI and Xcode. The repository describes itself as: Native Swift SDK for building autonomous AI agents with Apple's FoundationModels design philosophy. The licence is MIT.

When your agent uses it

  • Adding/updating any provider adapter tests (text
  • Structured outputs
  • Payload formats change
  • Debugging agent loop mismatches by inspecting recorded JSON/SSE payloads

Example prompts

  • “/agent-recorder-fixtures”

Requirements

  • A credential in OPENAI_API_KEY
  • A credential in ANTHROPIC_API_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit 48bfda9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • xcodebuild

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • OPENAI_API_KEY
    • ANTHROPIC_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Recorder Fixtures loads about 906 tokens when it runs. Until then it costs about 120 tokens; SKILL.md has 309 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~120
When it runs · the whole SKILL.md, loaded when a task matches
~906

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from SwiftedMind/SwiftAgent at commit 48bfda9, republished under its MIT licence (© SwiftedMind). 309 words, ~906 tokens.

Download SKILL.mdSave it as .claude/skills/agent-recorder-fixtures/SKILL.md (or your agent's skills folder).
name
agent-recorder-fixtures
description
Record real OpenAI/Anthropic HTTP back-and-forth (requests + responses, including streaming text/event-stream) and print paste-ready Swift fixtures for SwiftAgent unit tests (ReplayHTTPClient) using the AgentRecorder CLI or HTTPReplayRecorder. Use when adding/updating any provider adapter tests (text, streaming, structured outputs, tool calls), when payload formats change, or when debugging agent loop mismatches by inspecting recorded JSON/SSE payloads.

Agent Recorder Fixtures

Overview

Use AgentRecorder to capture real provider payloads and generate paste-ready Swift fixtures for tests using ReplayHTTPClient. This is the fastest loop for keeping SwiftAgent’s unit tests (and agent-loop behavior) in sync with real OpenAI/Anthropic traffic.

Workflow

  1. Pick the right scenario
  • Existing scenarios live in AgentRecorder/AgentRecorder/Scenarios/ (grouped by provider + one file per scenario).
  • List them quickly with AgentRecorder --list-scenarios.
  • If no scenario matches your test, add one (keep it small and deterministic).
  1. Set API keys
  • Preferred: use a local Secrets.plist in the repo root (not committed).
    • Run with --secrets-plist Secrets.plist
    • Plist keys: OpenAI_API_Key_Debug / Anthropic_API_Key_Debug

Optional:

  • Env vars fallback (useful for CI or quick runs): OPENAI_API_KEY, ANTHROPIC_API_KEY
  • AGENT_RECORDER_SECRETS_PLIST is also supported (fallback if env vars are missing).

Legacy:

  • If you already have Secrets.plist under Examples/Example App/ExampleApp/Secrets.plist, either move/symlink it to the repo root or pass the full path via --secrets-plist.
  1. Run the recorder (Xcode or Terminal)
  • Xcode: select AgentRecorder scheme, set env vars, Run → copy stdout from Debug console.
  • Terminal:
bash
# Run from repo root.
# Apple Silicon: add `arch=arm64` to avoid “multiple matching destinations” warnings.
xcodebuild -workspace SwiftAgent.xcworkspace -scheme AgentRecorder -destination "platform=macOS,arch=arm64" -derivedDataPath .tmp/DerivedData build -quiet
./.tmp/DerivedData/Build/Products/Debug/AgentRecorder --list-scenarios
./.tmp/DerivedData/Build/Products/Debug/AgentRecorder --secrets-plist Secrets.plist --provider openai --scenario openai/streaming-tool-calls/weather --no-include-headers
  1. Paste fixtures into tests
  • Output is already formatted for ReplayHTTPClient(recordedResponses:).
  • Paste into the relevant test file (common locations):
    • Tests/SwiftAgentTests/OpenAISession/...
    • Tests/SwiftAgentTests/AnthropicSession/...
  1. Run tests
  • xcodebuild -workspace SwiftAgent.xcworkspace -scheme SwiftAgentTests -testPlan SwiftAgentTests test -quiet

Notes

  • Headers may include secrets. HTTPReplayRecorder redacts common auth header fields, but always review before committing.
  • Prefer --no-include-headers unless you’re explicitly testing header handling.
  • Always pass -quiet to xcodebuild to keep logs readable.
  • xcodebuild may print noisy destination warnings; ignore if the build succeeds.
  • Streaming fixtures are raw text/event-stream. If the SDK stops consuming early, the recorded payload may be partial (this is usually fine for replaying the SDK’s behavior).
  • If you need request bodies for debugging, re-run with --include-requests.
  • OpenAI scenarios: keep models pinned/stable (scenario-defined). Change only when you’re updating fixtures/tests.
  • Cleanup: if you used .tmp/DerivedData (and/or wrote capture files like .tmp/AgentRecorderOutput/*.txt), delete them after you’ve pasted fixtures into tests.

© SwiftedMind, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .codex/skills/agent-recorder-fixtures of SwiftedMind/SwiftAgent.

Open the folder on GitHubat commit 48bfda9

Compare with similar skills

Agent Recorder Fixtures next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Recorder Fixtures compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Recorder Fixtures this skillSwiftedMind/SwiftAgent227—~906Automated safety check: PassMIT
Foundation Models Os27 Updaterrryam/FoundationModelsKit162—~2.9kAutomated safety check: PassMIT
Native Testing Strategybladeofgod/flutter-ai-harness116—~345Automated safety check: PassMIT
Afmscouzi1966/maclocal-api346—~1.2kAutomated safety check: PassMIT
LangchainOrchestra-Research/AI-Research-SKILLs13k2 repos~3.2kAutomated safety check: PassMIT
Tanstack AIsecondsky/claude-skills227—~3.6kAutomated safety check: NotesMIT

Similar skills

  • Foundation Models Os27 Updater

    rryam/FoundationModelsKit

    Upgrade any Apple Foundation Models Swift app or package from OS 26-era APIs to OS 27 and Xcode 27 APIs.

    162 GitHub stars~2.9k tokensUpdated 10 days ago
    MobileAuto-check passed
  • Native Testing Strategy

    bladeofgod/flutter-ai-harness

    适用:设计或审查 Kotlin/Swift 原生模块、Bridge Adapter、Host 编译、模拟器/设备和系统能力验证。不适用:纯 Dart/Flutter 测试或用 Fake 代替相机和权限真机验证。触发词:JUnit、XCTest、Robolectric、instrumented test、Swift Testing、Framework Fake、Gradle…

    116 GitHub stars~345 tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Afm

    scouzi1966/maclocal-api

    Maintain and extend AFM (maclocal-api), a Swift OpenAI-compatible local LLM server and CLI for Apple Foundation Models, MLX models, API gateway proxying, and Vision OCR.

    346 GitHub stars~1.2k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Langchain

    Orchestra-Research/AI-Research-SKILLs

    Framework for building LLM-powered applications with agents, chains, and RAG.

    13k GitHub starsUsed in 2 repos~3.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Tanstack AI

    secondsky/claude-skills

    TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.

    227 GitHub stars~3.6k tokensUpdated 13 days ago
    AI & LLM EngineeringAuto-check: notes
  • Building Agents

    ericrisco/rsc-harness

    A skill your agent uses when building or restructuring an LLM agent — provider adapter, tool calling, structured output, RAG, agent loop, eval gate, cost routing, tracing, MCP server —…

    180 GitHub stars~5k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed

Works with

Questions about Agent Recorder Fixtures

What does Agent Recorder Fixtures do?

Record real OpenAI/Anthropic HTTP back-and-forth (requests + responses, including streaming text/event-stream) and print paste-ready Swift fixtures for SwiftAgent unit tests (ReplayHTTPClient) using…. Agent Recorder Fixtures is an agent skill from SwiftedMind/SwiftAgent. Record real OpenAI/Anthropic HTTP back-and-forth (requests + responses, including streaming text/event-stream) and print paste-ready Swift fixtures for SwiftAgent unit tests (ReplayHTTPClient) using the AgentRecorder CLI or HTTPReplayRecorder.

When should I use Agent Recorder Fixtures?

Agent Recorder Fixtures fits situations like: adding/updating any provider adapter tests (text; structured outputs; payload formats change; debugging agent loop mismatches by inspecting recorded JSON/SSE payloads.

How do I install Agent Recorder Fixtures in Claude Code?

Run `npx skills add SwiftedMind/SwiftAgent --skill agent-recorder-fixtures -a claude-code`. Or copy the skill folder (.codex/skills/agent-recorder-fixtures in SwiftedMind/SwiftAgent) into .claude/skills/agent-recorder-fixtures in your project. Claude Code loads it when a task matches its description.

How do I install Agent Recorder Fixtures in Codex?

Run `npx skills add SwiftedMind/SwiftAgent --skill agent-recorder-fixtures -a codex`. Or copy the skill folder (.codex/skills/agent-recorder-fixtures in SwiftedMind/SwiftAgent) into .agents/skills/agent-recorder-fixtures in your project. Codex loads it when a task matches its description.

Can I use Agent Recorder Fixtures in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SwiftedMind/SwiftAgent --skill agent-recorder-fixtures -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-recorder-fixtures, .gemini/skills/agent-recorder-fixtures, .github/skills/agent-recorder-fixtures and .opencode/skills/agent-recorder-fixtures in your project.

What does Agent Recorder Fixtures need to run?

Going by SKILL.md and its folder, Agent Recorder Fixtures needs the command-line tools its instructions call (xcodebuild) and credentials named OPENAI_API_KEY and ANTHROPIC_API_KEY. Our summary lists: A credential in OPENAI_API_KEY; A credential in ANTHROPIC_API_KEY.

Does Agent Recorder Fixtures access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Agent Recorder Fixtures safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agent Recorder Fixtures use?

Agent Recorder Fixtures is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Recorder Fixtures use?

About 906 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agent Recorder Fixtures?

Skills that share tags, products or a category with Agent Recorder Fixtures: Foundation Models Os27 Updater (rryam/FoundationModelsKit, 162 stars), Native Testing Strategy (bladeofgod/flutter-ai-harness, 116 stars), Afm (scouzi1966/maclocal-api, 346 stars) and Langchain (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Recorder Fixtures?

SwiftedMind (a GitHub user) maintains it in SwiftedMind/SwiftAgent, which has 227 GitHub stars. The repository was last updated on January 23, 2026.

Source: SwiftedMind/SwiftAgent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.