Skip to content

feat: 实现 Skills 支持#2

Merged
BukeLy merged 16 commits intomainfrom
feature/support-agent-skill
Jan 4, 2026
Merged

feat: 实现 Skills 支持#2
BukeLy merged 16 commits intomainfrom
feature/support-agent-skill

Conversation

@BukeLy
Copy link
Owner

@BukeLy BukeLy commented Jan 4, 2026

Summary

  • 添加 hello-world 示例 Skill(演示 Skills 基本结构)
  • Dockerfile: 复制 skills 到 /opt/claude-skills
  • agent_session.py: 运行时复制到 /tmp/.claude-code/skills/,配置 setting_sources=['user']
  • 更新 README.md 移除 Skills TODO

Test plan

  • 验证 Docker 构建成功
  • 验证 Skills 在运行时被正确加载
  • 测试 hello-world Skill 调用

- 添加 hello-world 示例 Skill(SKILL.md + reference + scripts)
- Dockerfile: 复制 skills 到 /opt/claude-skills
- agent_session.py: 运行时复制到 /tmp/.claude-code/skills/,配置 setting_sources=['user']
- 更新 README.md 移除 Skills TODO
- 添加 tests/test_skills_location.py 验证 SDK Skills 加载位置
Copilot AI review requested due to automatic review settings January 4, 2026 01:30
@BukeLy
Copy link
Owner Author

BukeLy commented Jan 4, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements Skills support for the Claude Agent SDK integration by adding a hello-world example skill, configuring Docker to bundle skills, and updating the runtime to copy skills to the appropriate location. The implementation updates documentation to reflect that Skills are now supported.

  • Adds hello-world example skill demonstrating basic skill structure with reference files and scripts
  • Configures Dockerfile and agent_session.py to copy skills from /opt/claude-skills to /tmp/.claude-code/skills at runtime
  • Updates setting_sources configuration to enable skill loading

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/test_skills_location.py Adds exploratory test to verify skill loading from different filesystem locations
agent-sdk-server/claude-config/skills/hello-world/SKILL.md Defines example skill with description and usage instructions
agent-sdk-server/claude-config/skills/hello-world/scripts/print_message.py Script that reads and outputs content from reference JSON file
agent-sdk-server/claude-config/skills/hello-world/reference/message.json Sample JSON data referenced by the skill script
agent-sdk-server/agent_session.py Adds runtime logic to copy skills to writable location and configures setting_sources=['user']
agent-sdk-server/Dockerfile Copies skills directory to /opt/claude-skills for runtime access
README.md Updates feature list and project structure to reflect Skills support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

BukeLy added 12 commits January 4, 2026 09:39
- template.yaml中引用Parameter时必须使用`!Ref`
- agents/*.md文件必须包含YAML frontmatter定义`name`字段
- Lambda容器中uvx不可用,需要创建符号链接
在Dockerfile中创建uv到uvx的符号链接,确保Claude Code CLI能正常工作
使用CloudFormation的`!Ref`而非字面字符串`$\{ParamName\}`正确引用Parameter
aws-support agent添加YAML frontmatter,定义name、description、model和tools字段
移除冗余说明,只保留核心使用步骤
详细说明response在Telegram中的MarkdownV2格式要求,包括支持格式、转义规则和嵌套限制
- 升级parse_mode从MARKDOWN到MARKDOWN_V2
- 添加parse error异常处理和自动fallback机制
- 使用escape_markdown确保特殊字符正确转义
删除agent-sdk-client/pyproject.toml使其成为普通子文件夹,将python-telegram-bot依赖合并到根项目
- 简化提示词结构,突出转义规则
- 添加正确/错误示例对比
- 明确禁止使用#标题语法
- 代码块示例使用正常语法
@BukeLy
Copy link
Owner Author

BukeLy commented Jan 4, 2026

Code review

Found 1 issue:

  1. SubAgent Sources preservation guidance deleted - The system_prompt.md was rewritten and removed the "Important: Preserving SubAgent Sources" section. This guidance instructed the main agent to preserve Sources sections from SubAgent responses. The aws-support SubAgent explicitly requires returning Sources with documentation URLs (lines 24, 33 in aws-support.md), but without the preservation guidance in the system prompt, these sources may be lost when the main agent reformats responses.

https://github.com/BukeLy/OmniCloud-Ops-Agent/blob/6e6d72d001b2958407c596250caebc881401eb98/agent-sdk-server/claude-config/system_prompt.md#L1-L55

Suggestion: Add back the SubAgent Sources preservation guidance to system_prompt.md, adapted to MarkdownV2 format:

## SubAgent Sources Preservation

When using SubAgents, preserve any "Sources" section verbatim in your response\.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

BukeLy added 3 commits January 4, 2026 11:19
- 使用QEMU模拟ARM64架构
- 使用docker/build-push-action替代原生docker build
- 添加hadolint进行Dockerfile语法检查
- 启用GitHub Actions缓存加速构建
- 扩大触发路径到整个agent-sdk-server目录
- 添加WORKDIR设置(DL3045)
- 添加dnf clean all清理缓存(DL3040)
- 使用./*.py避免glob被解释为选项(SC2035)
- 忽略版本固定警告(DL3016,DL3041)以支持自动更新
@BukeLy BukeLy merged commit 15c00db into main Jan 4, 2026
4 checks passed
@BukeLy BukeLy deleted the feature/support-agent-skill branch January 4, 2026 03:35
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.

2 participants