* refactor(repo): move OpenWork apps into apps and ee layout Rebase the monorepo layout migration onto the latest dev changes so the moved app, desktop, share, and cloud surfaces keep working from their new paths. Carry the latest deeplink, token persistence, build, Vercel, and docs updates forward to avoid stale references and broken deploy tooling. * chore(repo): drop generated desktop artifacts Ignore the moved Tauri target and sidecar paths so local cargo checks do not pollute the branch. Remove the accidentally committed outputs from the repo while keeping the layout migration intact. * fix(release): drop built server cli artifact Stop tracking the locally built apps/server/cli binary so generated server outputs do not leak into commits. Also update the release workflow to check the published scoped package name for @openwork/server before deciding whether npm publish is needed. * fix(workspace): add stable CLI bin wrappers Point the server and router package bins at committed wrapper scripts so workspace installs can create shims before dist outputs exist. Keep the wrappers compatible with built binaries and source checkouts to avoid Vercel install warnings without changing runtime behavior.
3.2 KiB
Skill Creator: Better Trigger Selection
Branch: feat/skill-creator-triggers
Priority: P2
Problem
Skills don't auto-trigger reliably because the "when to use" descriptions in frontmatter are weak and vague.
From demo: "I should have triggered it earlier. So that's something I need to I guess."
Root Cause
The skill creator doesn't emphasize writing strong, specific trigger phrases. Users write vague descriptions like "when adding content" instead of specific triggers like "when user mentions 'content pipeline' or 'add to my content database'".
Location
Primary file in OpenWork: packages/app/src/app/data/skill-creator.md
Also update: vendor/openwork-enterprise skill-creator template (same guidance, different repo)
The skill creator needs to:
- Explicitly ask for trigger phrases
- Show examples of good vs bad triggers
- Validate trigger specificity
Code findings
- Template file:
packages/app/src/app/data/skill-creator.md:1 - Used in skill creation flow:
packages/app/src/app/context/extensions.ts:600,660 - Frontmatter parsing:
packages/server/src/frontmatter.ts:1 - Frontmatter validation:
packages/server/src/skills.ts:83andpackages/server/src/validators.ts:7 - Example of strong trigger phrasing:
.opencode/skills/get-started/SKILL.md:6("Always load this skill when the user says …")
Changes to Skill Creator
Add trigger phrase guidance
In the skill creator flow, add explicit step:
## Step: Define Trigger Phrases
The description field is HOW Claude decides when to use your skill.
It must include specific trigger phrases.
**Bad example:**
> "Use when working with content"
**Good examples:**
> "Use when user mentions 'content pipeline', 'add to content database', or 'schedule a post'"
> "Triggers on: 'rotate PDF', 'flip PDF pages', 'change PDF orientation'"
Write 2-3 specific phrases that should trigger this skill:
Update frontmatter template
---
name: my-skill
description: |
[What it does in one sentence]
Triggers when user mentions:
- "[specific phrase 1]"
- "[specific phrase 2]"
- "[specific phrase 3]"
---
Add validation
When skill is created, warn if description lacks specific trigger phrases:
- Must contain at least one quoted phrase or specific keyword
- Should be >50 chars
- Should include "when" or "triggers" language
UI Changes (Context Panel)
Also update context-panel.tsx to display trigger phrases prominently.
The skill subtitle should show the trigger phrase, not the generic description:
// Extract trigger from description
const extractTrigger = (description: string): string | null => {
// Look for "Triggers when" or "Use when" patterns
const match = description.match(/(?:triggers?|use) when[:\s]+(.+?)(?:\.|$)/i);
return match?.[1]?.trim() ?? null;
};
const subtitle = extractTrigger(skill.description) ?? skill.description?.slice(0, 60);
Testing
- Create a skill with vague description → verify warning shown
- Create a skill with specific triggers → verify no warning
- Check context panel → verify trigger phrase shown as subtitle
- Use the skill → verify it triggers on the specified phrases