Skip to content

fix(skill): clarify active skill prompts#598

Open
liruifengv wants to merge 2 commits into
mainfrom
fix-skill-reminder
Open

fix(skill): clarify active skill prompts#598
liruifengv wants to merge 2 commits into
mainfrom
fix-skill-reminder

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue. This PR addresses a prompt-shaping bug in slash-triggered skills.

Problem

Slash-triggered skills were injected as system reminders, which made the active skill body look like host-level reminder context rather than the user's current request. This could cause the model to treat a user-invoked skill as if no user task had been provided.

What changed

  • Render active skill prompts as self-contained user-context messages instead of system reminders.
  • Add concise provenance text for user slash activations and model-loaded skills.
  • Keep kimi-skill-loaded as the skill wrapper with trigger, source, and args metadata.
  • Add regression coverage for slash activation, model tool activation, argument escaping, and session resume.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Test Plan

  • pnpm oxlint packages/agent-core/src/agent/skill/index.ts packages/agent-core/src/agent/skill/prompt.ts packages/agent-core/src/tools/builtin/collaboration/skill-tool.ts packages/agent-core/test/harness/skill-session.test.ts packages/agent-core/test/tools/skill-tool.test.ts packages/agent-core/test/tools/skill-tool-dispatch.test.ts packages/agent-core/test/agent/skill-tool-manager.test.ts packages/node-sdk/test/session-skills.test.ts
  • pnpm vitest run packages/agent-core/test/harness/skill-session.test.ts packages/node-sdk/test/session-skills.test.ts packages/agent-core/test/tools/skill-tool.test.ts packages/agent-core/test/tools/skill-tool-dispatch.test.ts packages/agent-core/test/agent/skill-tool-manager.test.ts
  • pnpm --filter @moonshot-ai/agent-core run typecheck && pnpm --filter @moonshot-ai/kimi-code-sdk run typecheck
  • git diff --exit-code -- packages/agent-core/src/profile/default/system.md

@changeset-bot

changeset-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f76f4ad

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@moonshot-ai/agent-core Patch
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 9, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@f76f4ad
npx https://pkg.pr.new/@moonshot-ai/kimi-code@f76f4ad

commit: f76f4ad

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 091fe3e055

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/agent-core/src/agent/skill/prompt.ts Outdated
@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

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