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
npx skills add agentsope/SkillAlchemy --skill agentsop-prompt-history-inspect --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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
- 1. 何时激活 (When to activate)
- 2. 核心心智模型 (Core mental model)
- 3. SOP 工作流 (SOP workflow)
- Step 1 — Dump the rendered prompt (≤30 sec)
- Step 2 — Diff against expectation
- Step 3 — Identify the divergence layer
- Step 4 — Fix at the correct layer, then re-dump
- 4. 操作模型 (Operational model — Trigger / Action / Output / Evidence)
- OP-1 · Inspect last N DSPy LM calls
- OP-2 · LangChain global debug / verbose
- OP-3 · LangGraph time-travel state inspection
- OP-4 · CrewAI step-by-step inspection
- OP-5 · Aider show last diff and full prompts
- OP-6 · Raw OpenAI / Anthropic SDK debug logging
export OPENAI_LOG=debug # also: OPENAI_LOG=info for less verbose export ANTHROPIC_LOG=debug
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.
