openclaw - 💡(How to fix) Fix feat(skills): support rule-type skills with post-task / post-error trigger phases

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

After completing any task (including error recovery), check before responding: triggerPhase: post-task # or: post-error, pre-response As the skill ecosystem grows, more skills will be "rule-type" (post-task checks, error handling, compliance). Without a proper trigger mechanism, each agent ends up hardcoding these rules in AGENTS.md — which defeats the purpose of reusable, shared skills.

Root Cause

As the skill ecosystem grows, more skills will be "rule-type" (post-task checks, error handling, compliance). Without a proper trigger mechanism, each agent ends up hardcoding these rules in AGENTS.md — which defeats the purpose of reusable, shared skills.

Fix Action

Fix / Workaround

  • After task completion: e.g., experience capture, scoreboard updates
  • After errors: e.g., pitfall logging, workaround recording
  • After config changes: e.g., checking if cron/AGENTS.md need sync

Current Workaround

RAW_BUFFERClick to expand / collapse

Problem

Skill descriptions are injected into the system prompt and matched against user keywords — this works well for tool-type skills (e.g., weather, browser automation) that should trigger when the user makes a specific request.

However, there's a growing category of rule-type skills that need to trigger at different moments:

  • After task completion: e.g., experience capture, scoreboard updates
  • After errors: e.g., pitfall logging, workaround recording
  • After config changes: e.g., checking if cron/AGENTS.md need sync

These skills currently rely on the AI "remembering" to scan the skill list at the right time — but in practice, once the AI answers the user's question, it considers the task complete and doesn't scan for post-task skills. No amount of description wording fixes this because the trigger point (post-task) is outside the user-keyword-matching flow.

Example

User: "What's the weather in Dongguan?" AI: reads weather skill → runs curl → curl fails (PowerShell alias) → switches to curl.exe → succeeds → answers the user ✅ ... but never triggers the experience-capture skill ❌

The AI completed the task, but there's no mechanism saying "before you respond, check these rule-type skills."

Current Workaround

I've added a "task behavior framework" to AGENTS.md:

`markdown

Task Behavior Framework

After completing any task (including error recovery), check before responding:

  1. Encountered a pitfall? → record in taskhub
  2. Found a better tool? → update scoreboard
  3. Changed SKILL.md or rules? → check cron/AGENTS.md/MEMORY.md sync
  4. User preference change? → update USER.md `

This works because AGENTS.md is always loaded. But it's agent-specific — every agent needs its own copy, and it doesn't scale to reusable community skills.

Proposed Solutions (any would help)

Option A: skills.instructions config field

json { "skills": { "instructions": "After every task completes, check: 1) pitfalls encountered? 2) better tools discovered? 3) config changes need sync? 4) user preferences changed?" } } Injects into the system prompt as hard rules (like AGENTS.md but at config level, shared across all agents).

Option B: Skill-level riggerPhase metadata

`yaml

name: experience-capture triggerPhase: post-task # or: post-error, pre-response

` When riggerPhase is set, the framework ensures the skill description is re-evaluated at that phase, not just at the initial user-keyword-matching phase.

Option C: skills.alwaysLoad config

json { "skills": { "alwaysLoad": ["experience-capture", "taskhub"] } } Force certain skills to always be in context (their description is always visible), so the AI doesn't need to "discover" them.

Why This Matters

As the skill ecosystem grows, more skills will be "rule-type" (post-task checks, error handling, compliance). Without a proper trigger mechanism, each agent ends up hardcoding these rules in AGENTS.md — which defeats the purpose of reusable, shared skills.

Environment

  • OpenClaw: 2026.5.12
  • Model: xiaomi-coding/mimo-v2.5
  • OS: Windows

Thanks for considering this!

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix feat(skills): support rule-type skills with post-task / post-error trigger phases