Skip to content
Back to skills

Coding

ASecurity

Score an agent's run by its tool calls and state transitions, not only its final answer: tool and parameter F1, in-order match, legal transitions, pass^k. Use when you evaluate how an agent reached an answer or need a reliability figure over repeated runs.

  • 24 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added October 14, 2026
ai-agentsgogit

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned November 22, 2026

npx -y skills add andreibesleaga/GABBE --skill coding --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Coding?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Coding
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/andreibesleaga-coding/badge)](https://www.skillsdirectory.com/skills/andreibesleaga-coding)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-trajectory-eval
description: "Score an agent's run by its tool calls and state transitions, not only its final answer: tool and parameter F1, in-order match, legal transitions, pass^k. Use when you evaluate how an agent reached an answer or need a reliability figure over repeated runs."
triggers: [evaluate agent trajectory, tool-use precision recall, in-order trajectory match, state transition check, task success rate, pass at k agent reliability]
tags: [coding, ai, agents, evaluation]
core: false
context_cost: medium
---
# Agent Trajectory Evaluation

## Goal
Evaluate an agent's **trajectory** — the sequence of tool calls, arguments, observations, and
state-machine transitions it produces — rather than scoring the final answer alone. A correct
final answer can hide a reckless or lucky path (wrong tools, illegal state jumps, wasted calls),
and a wrong answer can sit on top of a nearly-correct path worth one fix. You must score *both*
how the agent got there and where it ended up.

## Steps
1. **Capture the full execution trace.**
   - Record every step: each tool call, its arguments, the observation returned, and any
     state-machine transition. The trace is the evidence; a trajectory eval is only as good as the
     completeness of the captured trace.
2. **Compute tool-use metrics.**
   - **Tool-selection Precision / Recall / F1** — of the tools the agent called, how many were the
     right ones (precision), and of the tools it *should* have called, how many did it call
     (recall)? F1 balances both.
   - **Parameter F1** — given the right tool was chosen, were its arguments correct? A correct tool
     with wrong parameters is still a failure.
3. **Match the trajectory and verify legality.**
   - Prefer **in-order match** (the required tools appear in the correct relative sequence, with
     optional/extra steps permitted) over brittle **exact match** (every step identical) — exact
     match punishes harmless reordering and benign extra steps and is almost always too strict.
   - Verify state-machine transitions are *legal*: the agent must never take an impossible
     transition (e.g. "refund" before "authenticate"). Flag any illegal transition as a hard fail
     regardless of outcome.
4. **Measure task-success independently.**
   - Score milestone/goal achievement on its own axis: did the agent reach the required end state,
     even via a non-optimal path? Outcome success and trajectory quality are orthogonal — report
     them separately so neither masks the other.
5. **Report reliability over stochasticity.**
   - Agents are non-deterministic; one success can be luck. Run k trials and report **pass^k**
     (succeeds in *all* k trials) so a single fluke run cannot be mistaken for reliability.
   - Methodological grounding (named benchmarks, not dependencies): **tau-bench** evaluates agents
     by final-state comparison and popularized the pass^k reliability metric; **SWE-bench Verified**
     evaluates coding agents on real, human-validated GitHub issues. Borrow their methods —
     final-state checking plus pass^k, and human-validated tasks.

## Constraints
- Trajectory **exact-match is usually too strict** — use in-order / subset matching, allowing
  optional steps, unless the task genuinely requires a rigid sequence.
- Task success can hide a bad path, and a good path can still fail the task — always report
  **both** trajectory quality and outcome, never one as a proxy for the other.
- Evals **sample** the space of possible runs; they raise confidence but do not prove the agent is
  correct or safe.
- pass^k over k trials is the reliability signal; a single passing run is not evidence of
  reliability for a stochastic agent.

## Output Format
Produce a **trajectory scorecard** containing:
- Tool-selection F1 and **Parameter F1**.
- In-order trajectory match % (and a flag for any illegal state transition).
- Task-success rate (milestone/goal achievement).
- **pass^k** across k trials, with the value of k stated.
- A disclaimer that the eval samples runs and does not prove correctness.

## Limits and safety
- Run the k trials against sandboxed or mock tools only; replaying a trajectory against live systems repeats payments, deletes and emails.
- Treat any illegal state transition as a failure even when the final state is correct, and check the real end state, not only that the expected tools were called.
- Save the trace to a file before scoring and score from that file; do not edit it afterwards.
- Hold out tasks the agent has not seen; public benchmarks may be contaminated. Report pass^k with k and call the result a sample, not a proof.

Files in this skill

  • agent-trajectory-eval.skill.md5.7 KB
  • artisan-commands.skill.md3.7 KB
  • browser-tdd.skill.md7 KB
  • chaos-fault-injection.skill.md8.1 KB
  • ci-autofix.skill.md4.2 KB
  • clean-coder.skill.md4.5 KB
  • code-review.skill.md6.1 KB
  • debug.skill.md6.5 KB
  • documentation.skill.md7.3 KB
  • eval-driven-development.skill.md6.9 KB
  • evals/code-review.eval.yaml1 KB
  • excalidraw.skill.md3.7 KB
  • file-processing.skill.md4.3 KB
  • git-workflow.skill.md7.2 KB
  • metamorphic-testing.skill.md7.8 KB
  • mobile-dev.skill.md4.2 KB
  • nodejs-expert.skill.md1.6 KB
  • output-validation.skill.md5.4 KB
  • pbt-strategy.skill.md8 KB
  • performant-ai.skill.md3.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.