Agent skill · AI & Agents

agentsop-prompt-history-inspect

Tool skill — the *first move* in any LM-debugging session: dump the actual rendered prompt the framework sent to the model, before changing anything else. Activate when an LM call produced an unexpected output (wrong answer, schema violation, refusal, truncation, cost spike, latency spike, infinite loop, "model got dumber after upgrade"). The skill enforces a 30-second inspect step BEFORE any prompt edit, model swap, retry, or temperature tweak. Cross-framework cheat sheet: DSPy `inspect_history`, LangGraph `get_state_history`, CrewAI `step_callback`, LangChain `set_debug`/`set_verbose`, Aider

agentsopegithub.com/agentsopeGitHub ↗
claude-codeMIT
Install
npx skills add agentsope/SkillAlchemy --skill agentsop-prompt-history-inspect --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 5
SKILL.md size: 33 KB
Bundled scripts: none
Version: 0.1.0
Path: skills/agentsop-prompt-history-inspect/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 255
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Prompt-History Inspect — First Move Before Anything Else > *"The prompt you wrote is not the prompt the model received."* > — Operating axiom for every framework that templates, injects few-shots, appends tool definitions, or wraps system messages. --- ## 1. 何时激活 (When to activate) Activate this skill the **moment** an LM call surprises you, BEFORE any other debug move. | Trigger | Signal | |---|---| | Output wrong | "Why did it answer X?" / hallucinated fact / wrong format / refusal | | Output truncated | mid-sentence cut, partial JSON, missing fields | | Output empty / repeats | model returns `""`, repeats the same token, loops | | Behaviour changed | "It worked yesterday" / "It worked on GPT-4o but not on Llama-3" | | Cost / latency spike | tokens jumped 3× without code change → something got injected | | Tool call wrong | wrong tool picked, args malformed, tool call missing | | Schema validation failed | Pydantic / Outlines / guidance grammar refused output | | Eval regression | metric dropped after upgrading framework version | | Production bug | a user-facing thread produced a wrong answer — need to see what the LM saw | **Do NOT activate** when: - You are *authoring* a new

What's inside
Steps it walks through
  1. 1. 何时激活 (When to activate)
  2. 2. 核心心智模型 (Core mental model)
  3. 3. SOP 工作流 (SOP workflow)
  4. Step 1 — Dump the rendered prompt (≤30 sec)
  5. Step 2 — Diff against expectation
  6. Step 3 — Identify the divergence layer
  7. Step 4 — Fix at the correct layer, then re-dump
  8. 4. 操作模型 (Operational model — Trigger / Action / Output / Evidence)
  9. OP-1 · Inspect last N DSPy LM calls
  10. OP-2 · LangChain global debug / verbose
  11. OP-3 · LangGraph time-travel state inspection
  12. OP-4 · CrewAI step-by-step inspection
  13. OP-5 · Aider show last diff and full prompts
  14. OP-6 · Raw OpenAI / Anthropic SDK debug logging
Ships with 4 files
  • README.md
  • intermediate/operation_candidates.json
  • references/R1-mental-model.md
  • references/R2-framework-cheat-sheet.md
Commands it runs
export OPENAI_LOG=debug   # also: OPENAI_LOG=info for less verbose
export ANTHROPIC_LOG=debug
More from SkillAlchemy
All skills →
About this skill
What does the agentsop-prompt-history-inspect skill do?

Tool skill — the *first move* in any LM-debugging session: dump the actual rendered prompt the framework sent to the model, before changing anything else. Activate when an LM call produced an unexpected output (wrong answer, schema violation, refusal, truncation, cost spike, latency spike, infinite loop, "model got dumber after upgrade"). The skill enforces a 30-second inspect step BEFORE any prompt edit, model swap, retry, or temperature tweak. Cross-framework cheat sheet: DSPy `inspect_history`, LangGraph `get_state_history`, CrewAI `step_callback`, LangChain `set_debug`/`set_verbose`, Aider

How do I install it?

Run `npx skills add agentsope/SkillAlchemy --skill agentsop-prompt-history-inspect --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From agentsope/SkillAlchemy, a repository with 255 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going