Skip to content

Conversation

@ecielam
Copy link

@ecielam ecielam commented Jan 19, 2026

PR: Fix CreateSkill Trigger Patterns for Natural Language Matching

Summary

The CreateSkill skill fails to trigger on common natural language patterns like "create a new copywriting skill" because the existing keyword-based triggers don't match how users actually phrase requests.

Problem

Current triggers: create skill, new skill, skill structure, canonicalize

User request: "Let's create a new copywriting skill"

What happens: The phrase "copywriting skill" is parsed as the focal noun, so Claude interprets this as a request to help with copywriting rather than invoking the CreateSkill workflow.

Root cause: The triggers are bare keywords that don't account for natural language grammatical patterns where the skill domain (e.g., "copywriting") appears between "create" and "skill".

Solution

Updated triggers to match grammatical patterns users actually use:

Old Triggers New Triggers
create skill create a skill
new skill create a new skill
new skill for
build a skill
make a skill
skill for managing
skill for handling
skill structure skill structure
canonicalize canonicalize skill
validate skill

Changes

  • Packs/pai-createskill-skill/src/skills/CreateSkill/SKILL.md - Pack source
  • Releases/v2.3/.claude/skills/CreateSkill/SKILL.md - Current release

Testing

Before fix:

User: "Let's create a new copywriting skill"
Result: No skill triggered, Claude treats as general request

After fix:

User: "Let's create a new copywriting skill"
Result: CreateSkill skill triggers, workflow executes

Additional test cases that now work:

  • "Create a skill for managing my recipes"
  • "I want to build a skill for handling deployments"
  • "Make a skill for research tasks"
  • "New skill for tracking expenses"

Risk Assessment

  • Low risk: Only changes trigger patterns in YAML frontmatter
  • Non-breaking: All previous trigger phrases still work (superset)
  • No logic changes: Workflow execution unchanged

Future Considerations

This is a minimum viable fix to address the immediate triggering failure. The triggers may benefit from further refinement to be more intent-based per Anthropic's guidance on skill descriptions.

Anthropic recommends descriptions that capture user intent rather than specific phrases. A future iteration might explore:

  • More semantic trigger patterns
  • Intent classification rather than keyword matching
  • Alignment with how Claude Code's skill routing actually parses descriptions

This PR solves the immediate problem while leaving room for a more principled approach if the community wants to explore it.

Checklist

  • Tested locally with multiple phrasings
  • Updated both Pack source and Release
  • Commit message follows conventional format
  • No breaking changes to existing functionality

Jeremy Noetzelman and others added 3 commits January 19, 2026 08:10
Add OS detection to support both macOS and Linux filesystem paths.

Problem:
SessionHarvester hardcoded macOS path structure (-Users-) causing
complete failure on Linux systems which use -home- paths.

Solution:
- Added os module import
- Detect platform using os.platform()
- Dynamically select path prefix (darwin -> Users, linux -> home)
- Updated PROJECTS_DIR construction to use dynamic prefix

Testing:
- Tested on Linux (Ubuntu) with 857 session transcripts
- Maintains macOS compatibility
- No breaking changes to existing functionality

This fix enables Linux users to harvest learnings from session
transcripts, which was previously impossible.
Problem:
ActivityParser.ts hardcoded macOS-specific path pattern `-Users-${USERNAME}--claude`
for the Claude Code projects directory. This fails on Linux systems where the
home directory is `/home/` instead of `/Users/`.

Solution:
- Import `os` module for platform detection
- Use `os.platform()` to detect macOS ("darwin") vs Linux
- Dynamically construct PATH_PREFIX: "Users" on macOS, "home" on Linux
- Replace `require("os")` with proper `os` import for consistency

This is the same fix pattern applied to SessionHarvester.ts.

Tested on:
- Linux (Ubuntu): Correctly resolves to `-home-username--claude`
- Expected macOS behavior: `-Users-username--claude`

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The existing triggers ("create skill", "new skill") failed to match
common natural language patterns like "create a new copywriting skill"
because the noun phrase "copywriting skill" was parsed as the focal
object rather than triggering the CreateSkill workflow.

Updated triggers to match grammatical patterns users actually use:
- "create a skill" / "create a new skill"
- "new skill for" / "build a skill" / "make a skill"
- "skill for managing" / "skill for handling"
- More specific: "canonicalize skill", "validate skill"

Tested with: "Let's create a new copywriting skill" - now triggers correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant