Skip to content

feat(skills): ship dd-apm sub-skills via agent-skills submodule#530

Closed
rachelyangdog wants to merge 3 commits into
DataDog:mainfrom
rachelyangdog:feat/dd-apm-subskills-from-submodule
Closed

feat(skills): ship dd-apm sub-skills via agent-skills submodule#530
rachelyangdog wants to merge 3 commits into
DataDog:mainfrom
rachelyangdog:feat/dd-apm-subskills-from-submodule

Conversation

@rachelyangdog
Copy link
Copy Markdown
Contributor

Pull dd-apm's SKILL.md and all 11 nested sub-skill files (service-remapping, k8s-ssi/, linux-ssi/) from the datadog-labs/agent-skills repo via a git submodule, instead of the standalone pup/skills/dd-apm/SKILL.md that previously had no sub-skills attached.

  • Add agent-skills as a submodule at pup/agent-skills
  • Point dd-apm's include_str! at the submodule's router SKILL.md
  • Add SubSkillFile struct + SUB_SKILLS array embedding the 11 nested SKILL.md files at compile time
  • Extend skills install to write sub-skills under the parent skill's install directory (gated on InstallFormat::SkillMd)

pup skills install dd-apm now writes 12 files (1 root + 11 sub-skills) instead of just the root. Refreshing sub-skills is a git submodule update + rebuild; no manual copies.

What does this PR do?

Motivation

Additional Notes

Checklist

  • The code change follows the project conventions (see CONTRIBUTING.md)
  • Tests have been added/updated (if applicable)
  • Documentation has been updated (if applicable)
  • All CI checks pass
  • Code coverage is maintained or improved

Related Issues

Pull dd-apm's SKILL.md and all 11 nested sub-skill files
(service-remapping, k8s-ssi/*, linux-ssi/*) from the
datadog-labs/agent-skills repo via a git submodule, instead of
the standalone pup/skills/dd-apm/SKILL.md that previously had no
sub-skills attached.

- Add agent-skills as a submodule at pup/agent-skills
- Point dd-apm's include_str! at the submodule's router SKILL.md
- Add SubSkillFile struct + SUB_SKILLS array embedding the 11
  nested SKILL.md files at compile time
- Extend skills install to write sub-skills under the parent
  skill's install directory (gated on InstallFormat::SkillMd)

pup skills install dd-apm now writes 12 files (1 root + 11
sub-skills) instead of just the root. Refreshing sub-skills is a
git submodule update + rebuild; no manual copies.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rachelyangdog rachelyangdog requested a review from a team as a code owner May 27, 2026 17:02
@rachelyangdog rachelyangdog marked this pull request as draft May 27, 2026 17:02
…-from-submodule

# Conflicts:
#	src/commands/skills.rs
#	src/skills.rs
@datadog-datadog-prod-us1-2

This comment has been minimized.

The dd-apm sub-skill files are embedded via include_str! against
paths in the agent-skills submodule. Without `submodules: recursive`
on actions/checkout, that directory is empty in CI and the build
fails on every platform with "couldn't read … agent-skills/dd-apm/…".

Add `submodules: recursive` to all 12 checkout steps across ci.yml,
release.yml, and release-prepare.yml.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rachelyangdog rachelyangdog marked this pull request as ready for review May 27, 2026 18:27
Copy link
Copy Markdown
Collaborator

@platinummonkey platinummonkey left a comment

Choose a reason for hiding this comment

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

We should avoid git submodules. It's always an awkward format. Ideally pup maintains it's own skills only and agent-skills should move out into here.

If we want separate ones make agent-skills a crate that can be imported and updated or have the skills install do a fetch dynamically.

platinummonkey pushed a commit that referenced this pull request May 28, 2026
The previous commit vendored the agent-skills content into a local
crates/ directory, which is equivalent to Option 1 (direct copy).
This commit corrects that: remove crates/agent-skills/ entirely and
point Cargo.toml at the upstream repo directly.

Cargo.toml now uses a git dep pinned to the same commit referenced by
PR #530, matching the pattern already used for datadog-api-client:

  agent-skills = {
    git = "https://github.com/datadog-labs/agent-skills",
    rev = "c447f4d42f05fa8497c6fa0d1ee3889b7020dce3"
  }

The SKILL.md files stay in the agent-skills repo only. Updating means
bumping the rev in Cargo.toml — a single, reviewable line change.

This PR requires a companion change to datadog-labs/agent-skills to
add a Cargo.toml and src/lib.rs that expose DD_APM_SKILL and
DD_APM_SUB_SKILLS as compile-time constants (the same API consumed in
src/skills.rs).

https://claude.ai/code/session_01BfYL9qPvktFuLXHNyH3rPB
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