Skip to content

fix(skill): align generation template with skill-creator best practices#1434

Merged
Hun-ger merged 2 commits intoMemTensor:openclaw-local-plugin-integrationfrom
kagura-agent:fix/1423-skill-generation-template
Apr 16, 2026
Merged

fix(skill): align generation template with skill-creator best practices#1434
Hun-ger merged 2 commits intoMemTensor:openclaw-local-plugin-integrationfrom
kagura-agent:fix/1423-skill-generation-template

Conversation

@kagura-agent
Copy link
Copy Markdown

What

Aligns the skill generation prompt template (STEP1_SKILL_MD_PROMPT) with skill-creator best practices, addressing all 6 issues raised in #1423.

Changes

  1. Name constraint: 2-4 word kebab-case (was unconstrained)
  2. Frontmatter: Limited to name + description only
  3. No extra files: Explicitly prohibits README/CHANGELOG/etc generation
  4. Assume smart agent: Only include info the agent doesn't already know
  5. Stronger trigger rules: Description must include trigger scenarios + keywords
  6. Progressive disclosure: Multi-variant skills should use references/ subdirectory

Question for maintainers

The current template includes metadata: { openclaw: { emoji } } in frontmatter. Per best practices, frontmatter should only have name and description. I've moved the metadata guidance to an HTML comment at the end of the file body, noting it as an optional OpenClaw extension. Please let me know if you'd prefer a different approach.

Testing

  • Manual review of prompt template alignment with spec
  • Only string literal changes, no logic affected

Fixes #1423

- Constrain skill name to 2-4 word kebab-case
- Limit frontmatter to name + description only
- Add rule against creating extra documentation files
- Add 'assume agent is smart' principle
- Strengthen trigger condition requirements in description
- Clarify metadata as optional OpenClaw extension

Fixes MemTensor#1423
@kagura-agent kagura-agent force-pushed the fix/1423-skill-generation-template branch from d0acc77 to b011e99 Compare April 12, 2026 12:09
@kagura-agent
Copy link
Copy Markdown
Author

Closing — happy to reopen if there's interest in this fix. Thanks!

@Hun-ger Hun-ger reopened this Apr 16, 2026
@Hun-ger
Copy link
Copy Markdown
Collaborator

Hun-ger commented Apr 16, 2026

Thank you for your contribution and for your patience while we caught up. We are interested in this fix and have reopened the PR. We’ll review it as soon as possible.

@Hun-ger Hun-ger changed the base branch from main to openclaw-local-plugin-integration April 16, 2026 11:41
@Hun-ger Hun-ger merged commit d2ded98 into MemTensor:openclaw-local-plugin-integration Apr 16, 2026
@Hun-ger Hun-ger mentioned this pull request Apr 17, 2026
17 tasks
Hun-ger added a commit that referenced this pull request Apr 17, 2026
## Description

This PR integrates recent fixes to improve skill generation and handle
viewer authentication gracefully.

- **Skill Generator**: Aligned the skill generation prompt template with
skill-creator best practices. Added explicit instructions to assume the
agent is smart, improved trigger descriptions, enforced stricter
metadata/naming rules, and prevented the generation of extraneous
boilerplate files.
- **Viewer**: Added a check in the `loadConfig` function to show a
"session expired" toast notification when receiving a 401 Unauthorized
response, preventing silent authentication failures.

Related Issue (Required):  Fixes #1434, Fixes #1424

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Refactor (does not change functionality, e.g. code style
improvements, linting)
- [ ] Documentation update

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration

- [ ] Unit Test
- [x] Test Script Or Test Steps (please provide)
- Generated a new skill to verify that the output correctly follows the
updated prompt constraints (e.g., kebab-case naming, no extra files,
proper trigger keywords).
- Manually simulated a 401 response during config load in the viewer to
ensure the session expiration toast appears properly.
- [ ] Pipeline Automated API Test (please provide)

## Checklist

- [x] I have performed a self-review of my own code | 我已自行检查了自己的代码
- [x] I have commented my code in hard-to-understand areas |
我已在难以理解的地方对代码进行了注释
- [x] I have added tests that prove my fix is effective or that my
feature works | 我已添加测试以证明我的修复有效或功能正常
- [ ] I have created related documentation issue/PR in
[MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) (if applicable) |
我已在 [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) 中创建了相关的文档
issue/PR(如果适用)
- [x] I have linked the issue to this PR (if applicable) | 我已将 issue
链接到此 PR(如果适用)
- [ ] I have mentioned the person who will review this PR | 我已提及将审查此 PR
的人

## Reviewer Checklist
- [x] closes #1434, closes #1424
- [ ] Made sure Checks passed
- [ ] Tests have been provided
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Skill generation template does not follow skill-creator best practices

2 participants