Skip to content

Improve skill guidance for Playwright screenshot handoff and simplify skill routing #149

@Aaronontheweb

Description

@Aaronontheweb

Problem

During live Slack + Playwright sessions, agents often generate screenshots in one session folder and then fail to attach them in the next turn/session because attach_file historically required current-session paths.

Observed failure pattern in daemon logs:

  • Tool [attach_file] ... Error: File path must be within the session directory (...)
  • Agent then manually copies files into the current session directory and retries.

This is partially mitigated by PR #148 (cross-session import support in attach_file), but the agent behavior is still brittle because skill guidance is not explicit or discoverable enough.

Why this matters

  • Extra tool calls and retries waste tokens and latency.
  • Agents appear unreliable even when tools are technically available.
  • Skills are becoming too ad hoc; we need a narrower, predictable route for common workflows.

Proposed scope

  1. Add a first-class skill for screenshot handoff (playwright-screenshot-handoff) that teaches agents to:
    • save screenshots into the current session workspace when possible, and
    • use attach_file directly (or import path) without manual copy loops.
  2. Add explicit trigger metadata for this skill so it activates for terms like:
    • playwright, screenshot, attach, send image, upload file.
  3. Add a concise skill-system cleanup pass (tapering):
    • reduce overlapping skill prompts,
    • improve deterministic routing for high-frequency operational workflows.

Acceptance criteria

  • Agents can complete navigate -> screenshot -> attach in one pass without path-related retries.
  • Session logs show no repeated attach_file path errors for this workflow.
  • Skill triggers are explicit and testable.
  • Add tests or scripted evals that assert successful screenshot handoff behavior.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions