feat(skills): source dd-apm sub-skills via agent-skills Cargo git dep (alternative to #530)#536
Draft
platinummonkey wants to merge 2 commits into
Draft
feat(skills): source dd-apm sub-skills via agent-skills Cargo git dep (alternative to #530)#536platinummonkey wants to merge 2 commits into
platinummonkey wants to merge 2 commits into
Conversation
Replace the submodule approach proposed in #530 with a Cargo path dependency. No .gitmodules, no `submodules: recursive` peppered across every CI checkout step. - crates/agent-skills/: new crate vendoring the 12 dd-apm SKILL.md files from datadog-labs/agent-skills@c447f4d (root router + 11 nested sub-skills under k8s-ssi/, linux-ssi/, service-remapping/) - Cargo.toml: add `agent-skills = { path = "crates/agent-skills" }`; a comment shows how to flip to a git dep once agent-skills ships a Cargo.toml, with no other pup changes needed - src/skills.rs: use agent_skills::DD_APM_SKILL / DD_APM_SUB_SKILLS instead of bare include_str!(); extend install_paths to write nested sub-skill files alongside the root SKILL.md (SkillMd format only); update files field doc; add two new tests for sub-skill install paths https://claude.ai/code/session_01BfYL9qPvktFuLXHNyH3rPB
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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Alternative to #530 that avoids git submodules entirely.
Instead of a
.gitmodulesentry andsubmodules: recursiveon every CI checkout step, this PR treatsdatadog-labs/agent-skillsas a Cargo git dependency — the same pattern already used fordatadog-api-client:src/skills.rsconsumes two constants from the crate:agent_skills::DD_APM_SKILL— the routerSKILL.mdagent_skills::DD_APM_SUB_SKILLS— the 11 nested sub-skill paths + contentpup skills install dd-apmwrites 12 files (root + 11 sub-skills) exactly as in #530, with no change to developer workflow or CI.Why not submodules
git clonewithout--recurse-submodulessilently produces a broken buildsubmodules: recursivegit submodule update --remote+ rebuild rather than a single rev bump inCargo.tomlCargo.lockChanges in this PR (pup side only)
Cargo.tomlagent-skillsgit dep, pinned to revsrc/skills.rsdd-apmentry uses crate constants;install_pathsextended to write nested sub-skill files;filesfield doc updatedsrc/skills.rs(tests)AgentMdformatNo
.gitmodules. No CI changes.Prerequisite: companion PR to agent-skills
This PR is a draft and will not build until
datadog-labs/agent-skillsships aCargo.toml+src/lib.rsexposing:Once that lands, update the
revhere to point at the new commit and mark this PR ready for review.Updating sub-skills going forward
Then
cargo update -p agent-skillsto refreshCargo.lock. No submodule commands, no CI changes.Generated by Claude Code