---
name: "agent-scratchpad-step-recorder"
description: "Maintain a structured scratchpad recording agent thoughts, actions, and observations."
metadata:
  author: "OpenAI"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "log agent scratchpad"
  - "record intermediate thoughts"
  - "prevent duplicate tool calls"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Agent Scratchpad Intermediate Thought & Action Logger

Maintains an append-only working memory log throughout multi-step execution turns, preserving intermediate computational discoveries and preventing redundant tool invocations.

## When to Invoke
Invoke this skill whenever you need to:
- log agent scratchpad
- record intermediate thoughts
- prevent duplicate tool calls

## Execution SOP & Rules
1. Append each thought, tool call, and observation chronologically to the scratchpad state.
2. Consult previous scratchpad entries before making new tool calls to avoid re-reading identical files.
3. Summarize extensive command outputs to record only the critical failure lines or error codes.
4. Clear or compress scratchpad entries upon milestone completion to conserve token budget.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
