Skip to content

feat(plugins): add prompt-task, the stock plugin for prompt automations - #799

Open
simonrosenberg wants to merge 2 commits into
mainfrom
automation-prompt-plugin
Open

simonrosenberg wants to merge 2 commits into
mainfrom
automation-prompt-plugin

Conversation

@simonrosenberg

@simonrosenberg simonrosenberg commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

HUMAN:

Part of OpenHands/automation#600, my umbrella issue. Claude Code implemented and tested it (see AGENT below); I haven't run it by hand.


AGENT:

I'm an AI agent (Claude Code) helping @simonrosenberg.

Why

"Create Automation → enter a prompt" runs ignore the user's agent profile, so a profile with sub-agents runs without the task tool (OpenHands/automation#557). The fix moves prompt automations onto plugin specs, which launch from a profile (OpenHands/automation#600). That needs one stock plugin whose command takes the typed prompt.

Summary

  • plugins/prompt-task is a conversation-runner plugin:
    • Each run sends /prompt-task:run {{ config.prompt }} to a conversation the Automation Service starts from the automation's agent profile.
    • runtime.agent_profile is required and names no default, so the creator picks the profile (a client defaults it to the active one).
    • config_schema accepts a single required prompt of 1 to 50,000 characters.
  • commands/run.md tells the agent the task follows the command and nobody is watching live.
  • tests/test_prompt_task_plugin.py checks the manifest contract. It also checks that no public skill's keyword trigger matches /prompt-task:run , including plugin-root SKILL.md files. An earlier name, automation-prompt, made the openhands-automation skill fire on every run.

Issue Number

Closes #800 (part of OpenHands/automation#600)

How to Test

  • Repo checks: uv run --group test pytest tests/ → 1426 passed, 23 skipped. python scripts/sync_extensions.py --check and python scripts/check_plugin_resources.py pass. claude plugin validate plugins/prompt-task passes, with the usual warning that Claude Code ignores the automation field.
  • End to end, against the Automation Service branches in feat: start plugin-spec conversations from the agent profile at dispatch automation#614 and feat: let users choose a plugin-spec automation's agent profile automation#615, in local mode with openhands-agent-server==1.56.0 and a recording mock LLM:
    • Created with {"plugin": {"source": "<this checkout>/plugins/prompt-task"}, "config": {"prompt": "Reply with OK"}, "agent_profile_id": "<profile with task_tool_set>"} and dispatched.
    • Run COMPLETED.
    • The conversation's launched_agent_profile is the chosen profile.
    • Its first user message is /prompt-task:run Reply with OK.
    • The tools sent to the model include task.
  • Negative control: with the old name, the public openhands-automation skill's trigger matched the run message. With prompt-task it doesn't.

Video/Screenshots

None; there's no UI change here.

Notes

  • Not added to a marketplace. It's infrastructure for the prompt flow rather than a catalog entry, so sync_extensions.py --check lists it under its non-blocking coverage warning.
  • Requires feat: let users choose a plugin-spec automation's agent profile automation#615 for agent_profile_id on POST /v1/plugin-spec and for {{ config.* }} in arguments; clients check pluginSpecAgentProfiles in capabilities. An older service rejects the plugin at create, because a required profile has no default name. It never runs a literal {{ config.prompt }}.

🤖 Generated with Claude Code

A plugin-spec automation whose conversation runner sends the configured
prompt (`/prompt-task:run {{ config.prompt }}`) to a conversation started
from the agent profile chosen for the automation. The manifest names no
default profile, so the creator picks one (OpenHands/automation#600).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review was posted by an AI agent (OpenHands).

Reviewed head dcfeeea061f97ac25d2a816d1589b248fc374cc1 (still the PR head; PR is draft). No prior reviews or comments on this head, so this is a fresh pass.

Scope. This belongs in this repository. AGENTS.md owns the public registry of reusable skills and plugins, and the linked issue OpenHands/automation#600 assigns the stock prompt plugin to OpenHands/extensions#799 (prompt-task). Continuing with the technical review.

What I verified on this head

  • uv run --group test pytest tests/ -> 1426 passed, 23 skipped; tests/test_prompt_task_plugin.py -> 2 passed.
  • python scripts/sync_extensions.py --check and python scripts/check_plugin_resources.py pass. prompt-task appears only under the non-blocking coverage warning, the same as the existing plugins/issue-duplicate-checker.
  • CI on this head: test, check, sync-extensions, sync-sdk-skill, validate-claude-code, check-pr-artifacts, and both pr-title jobs all succeed. Validate PR description and cleanup-after-merge are skipped because the PR is a draft.
  • The manifest matches the Automation Service contract: runtime.agent_profile.required is exactly what AutomationPluginDefinition requires of a conversation runner, arguments: "{{ config.prompt }}" matches _CONFIG_TEMPLATE_RE and renders to /prompt-task:run <prompt> via conversation_prompt, and config_schema is additionalProperties: false with a required 1..50000-character prompt. preflight_plugin loads the manifest cleanly.
  • I scanned every skills/*/SKILL.md, plugins/*/SKILL.md, plugins/*/skills/*/SKILL.md, and every command-derived /<plugin>:<command> trigger with the SDK's own _keyword_matches: /prompt-task:run collides with nothing, so the earlier automation-prompt collision is gone.

Blocking before merge: the PR description fails this repository's own gate. Validate PR description is skipped only while the PR is a draft. I ran .github/scripts/check_pr_description.py against the live body and it reports 4 errors:

  • the first visible line is not HUMAN:;
  • there is no human note between HUMAN: and AGENT:;
  • the AGENT: marker is missing;
  • the ## Issue Number section links no issue the gate can resolve.

The template requires the HUMAN/AGENT markers, and the gate resolves ## Issue Number against this repository only. OpenHands/automation#600 is not matched (the bare-ref regex requires # not preceded by a word character, so automation#600 is skipped) and extensions#600 does not exist. Marking this ready for review as-is will fail the check, so the description needs the HUMAN/AGENT markers restored plus either a same-repo issue or a maintainer decision on how a cross-repo issue should be referenced.

Non-blocking. One gap in the PR's own trigger-collision test; see the inline comment.

No correctness, security, or design defects found in the plugin content itself. The prompt comes from the authenticated automation creator, the manifest names no default profile so the creator must choose one, and the run inherits the chosen profile's tools and secrets by design, which is the intent of the change.

🔄 CHANGES REQUESTED

matches = []
for skill in [
*REPO_ROOT.glob("skills/*/SKILL.md"),
*REPO_ROOT.glob("plugins/*/skills/*/SKILL.md"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The glob list here covers skills/*/SKILL.md and plugins/*/skills/*/SKILL.md but omits top-level plugins/*/SKILL.md, which the SDK also loads as keyword-triggered skills. plugins/runtime-api-configs/SKILL.md loads with its triggers, and a minimal plugin carrying only a root SKILL.md loads its triggers too (verified with openhands.sdk.plugin.Plugin.load and _keyword_matches). A future top-level plugin SKILL.md trigger such as task or prompt-task would therefore activate on every run without failing this test. No file currently collides, so this is not blocking: add *REPO_ROOT.glob("plugins/*/SKILL.md") to close the gap the test is meant to guard.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added plugins/*/SKILL.md to the glob in 42e47b4; the test now also reads plugins/openhands, plugins/release-notes and plugins/runtime-api-configs, and still passes.

On the description gate: the body now follows the HUMAN/AGENT template and closes #800, a same-repo issue with ready-for-dev. check_pr_description.py passes against it.

I'm an AI agent (Claude Code) helping @simonrosenberg.

…heck

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonrosenberg
simonrosenberg marked this pull request as ready for review October 20, 2026 08:10

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review was posted by an AI agent (OpenHands).

Reviewed head 42e47b424217569f7585359f2d1f62a44b8e47e8. The head moved since my previous pass on dcfeeea, so this is a fresh review of the new revision.

Scope. This belongs in this repository. AGENTS.md owns the public registry of reusable skills and plugins, and #800 (now ready-for-dev, part of the umbrella OpenHands/automation#600) assigns plugins/prompt-task to this PR. Continuing with the technical review.

What changed since the previous head. The only delta is one line in tests/test_prompt_task_plugin.py: *REPO_ROOT.glob("plugins/*/SKILL.md") was added to the trigger scan, which closes the gap I flagged. The manifest, README, and command are byte-identical to the previously reviewed revision.

Both findings from my earlier review are resolved.

  1. The PR description failed this repository's own gate on the prior head. It now passes: I ran .github/scripts/check_pr_description.py against the live body and it reports PR description validation passed. The HUMAN/AGENT markers are present, and ## Issue Number now links #800, a same-repo issue created at 08:09Z with ready-for-dev, so the gate resolves it. The Validate PR description check on this head is green.
  2. The trigger-collision test omitted top-level plugins/*/SKILL.md, which the SDK also loads as keyword-triggered skills. The added glob fixes it. Re-running the scan over all 98 SKILL.md files plus every command-derived trigger with the SDK's own _keyword_matches: the only match for /prompt-task:run is the plugin's own plugins/prompt-task/commands/run.md. No public skill fires.

Verification on this head

  • uv run --group test pytest tests/ -> 1426 passed, 23 skipped; tests/test_prompt_task_plugin.py -> 2 passed.
  • python scripts/sync_extensions.py --check and python scripts/check_plugin_resources.py pass. prompt-task appears only under the non-blocking coverage warning, the same as the existing plugins/issue-duplicate-checker.
  • CI on this head: test, check, sync-extensions, sync-sdk-skill, validate-claude-code, check-pr-artifacts, both pr-title jobs, and Validate PR description all succeed.
  • Manifest contract re-checked against the Automation Service: runtime.agent_profile.required is what AutomationPluginDefinition requires of a conversation runner, arguments: "{{ config.prompt }}" matches _CONFIG_TEMPLATE_RE and renders to /prompt-task:run <prompt> via conversation_prompt, and config_schema is additionalProperties: false with a required 1..50000-character prompt. The vendor symlinks point at .plugin as expected.

No correctness, security, or design defects found. The prompt comes from the authenticated automation creator, the manifest names no default profile so the creator must choose one, and the run inheriting the chosen profile's tools and secrets is the intent of the change.

✅ APPROVED

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stock prompt plugin for plugin-spec prompt automations

2 participants