Skip to content

feat: Add Agent Skills support to system prompt#125

Merged
spachava753 merged 2 commits intomainfrom
feat/agent-skills-support
Jan 4, 2026
Merged

feat: Add Agent Skills support to system prompt#125
spachava753 merged 2 commits intomainfrom
feat/agent-skills-support

Conversation

@spachava753
Copy link
Copy Markdown
Owner

This PR adds support for the Agent Skills specification to CPE's system prompt templating.

What's New

A new skills template function that scans directories for skill folders and injects their metadata into the system prompt. Skills are reusable modules of instructions, scripts, and resources that extend the agent's capabilities for specialized tasks.

Example usage in a system prompt template:

{{ skills "./skills" "~/.cpe/skills" }}

This renders XML-formatted skill metadata that makes the agent aware of available skills:

<skills>
  <skill name="pdf-processing">
    <description>Extract text and tables from PDF files.</description>
    <path>/path/to/pdf-processing</path>
  </skill>
</skills>

Why

Skills provide a standardized way to package domain-specific knowledge into self-contained, shareable modules. Unlike AGENTS.md files which are project-specific, skills can be reused across projects and shared with others. The agent loads full skill instructions on-demand only when relevant, reducing context usage.

Closes #124

The system prompt now supports loading Agent Skills metadata via a new `skills` template function. This allows users to organize domain-specific instructions into reusable, shareable skill modules that follow the Agent Skills specification (agentskills.io).

Skills are discovered by scanning directories for folders containing SKILL.md files with YAML frontmatter. The function outputs XML-formatted metadata including skill name, description, and path for agent awareness.

Closes #124
…nd improvements

The example system prompt now includes a Skills section demonstrating the new `skills` template function for loading Agent Skills metadata. This enables users to extend the agent's capabilities with reusable, modular skill packages.

Additional updates align the example prompt with current best practices: clearer code mode description, guidance on understanding external libraries, improved AGENTS.md discovery via `find`, and consolidated reminders section.
@spachava753 spachava753 merged commit 4651c66 into main Jan 4, 2026
@spachava753 spachava753 deleted the feat/agent-skills-support branch April 10, 2026 00:23
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.

[Enhancement]: Add Agent Skills support to system prompt

1 participant