AgentSkills.Sdk
1.1.1
dotnet add package AgentSkills.Sdk --version 1.1.1
NuGet\Install-Package AgentSkills.Sdk -Version 1.1.1
<PackageReference Include="AgentSkills.Sdk" Version="1.1.1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="AgentSkills.Sdk" Version="1.1.1" />
<PackageReference Include="AgentSkills.Sdk"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add AgentSkills.Sdk --version 1.1.1
#r "nuget: AgentSkills.Sdk, 1.1.1"
#:package AgentSkills.Sdk@1.1.1
#addin nuget:?package=AgentSkills.Sdk&version=1.1.1
#tool nuget:?package=AgentSkills.Sdk&version=1.1.1
AgentSkills.Sdk
Ship agentskills.io-compliant agent skills inside your NuGet package. At dotnet pack time the SDK composes a SKILL.md (two variants: Claude Code and spec-pure) plus your reference docs, assets and scripts into the nupkg, together with a generated, self-contained build/<framework>/<PackageId>.targets — one copy per framework the package targets. When a consumer opts in, that targets file copies the skill into their workspace's agent directories (.claude/skills/, .agents/skills/, …) on build.
- Zero consumer footprint — no transitive packages, no DLLs, no tasks on the consumer side; only declarative MSBuild XML.
- Explicit opt-in — nothing is written unless the consumer sets the Consumer Flag.
- Monorepo-safe — versioned skill directories, stamp-guarded no-op rebuilds,
Copyretries for parallel builds. - Repo hygiene — every synced skill directory gitignores itself.
- Toolchain range — pack and consume verified on .NET 8, 9 and 10 SDKs (CI-guarded); the package ships no binaries, so no runtime dependency exists.
Agent-assisted setup
Maintainers can install this repo's Maintainer Skills and let their coding agent do the wiring:
npx skills add Rebel028/AgentSkills.Sdk
Then call /setup-agentskills-sdk or ask the agent to "setup AgentSkills.Sdk" in your library repo — it installs the package, wires doc sources into the .csproj, and verifies the pack. When your package's API changes, /update-skill-docs refreshes the existing skill docs against the new surface; /author-skill-docs drafts them from scratch when the repo has none.
Maintainer quick start
- Reference the SDK (pack-time only —
PrivateAssets="all"):
<ItemGroup>
<PackageReference Include="AgentSkills.Sdk" Version="1.0.0" PrivateAssets="all" />
</ItemGroup>
dotnet pack. That's it — with no further configuration the skill body is scaffolded from your<Description>andPackageReadmeFile.Optionally shape the skill:
<PropertyGroup>
<GenerateAgentSkills>true</GenerateAgentSkills>
<AgentSkillBodyFile>$(MSBuildProjectDirectory)/../agent/instructions.md</AgentSkillBodyFile>
<AgentSkillDescriptionOverride>Expert rules for MyAwesomeEngine APIs.</AgentSkillDescriptionOverride>
<AgentSkillUserInvocable>true</AgentSkillUserInvocable>
<AgentSkillContextStrategy>fork</AgentSkillContextStrategy>
</PropertyGroup>
<ItemGroup>
<AgentSkillReferenceFiles Include="$(MSBuildProjectDirectory)/../docs/**/*.md" />
<AgentSkillAssetFiles Include="$(MSBuildProjectDirectory)/../templates/appsettings.default.json" />
<AgentSkillScriptFiles Include="$(MSBuildProjectDirectory)/../tools/diagnose.sh" />
</ItemGroup>
Consumer usage
Consumers of your package opt in per project (or once in Directory.Build.props):
<PropertyGroup>
<MyAwesomeEngineAgentSkills>claude-code;universal</MyAwesomeEngineAgentSkills>
</PropertyGroup>
To opt every AgentSkills.Sdk-powered package in at once — instead of setting each package's flag — use the generic catch-all <AgentSkills>:
<PropertyGroup>
<AgentSkills>claude-code;universal</AgentSkills>
</PropertyGroup>
A package's own flag, when set, wins over the catch-all for that package (restate the full token list to widen it). Set a package's flag to none to opt that one package out while the catch-all stays on for the rest.
Tokens follow the vercel-labs/skills --agent ids: claude-code targets .claude/skills/; universal, opencode, codex, cursor, gemini-cli, github-copilot, amp, cline, zed, warp target .agents/skills/; a token containing / is a custom destination relative to the workspace root. Unknown tokens warn (AGSK101) and are skipped.
The workspace root resolves via $(AgentSkillsRoot) → $(SolutionDir) → .git walk-up (8 levels) → project directory (with warning AGSK102).
Skill directories are named use-<packageid>-v<version> — versions coexist; deleting .agents/skills/use-<pkg>-* is always safe (the current version re-syncs on the next build).
The generated targets file is scoped to the frameworks your package targets (build/net8.0/, build/netstandard2.0/, …). A consumer on a framework your package does not support therefore gets the correct NU1202 from restore.
Diagnostics
| Code | Severity | Condition |
|---|---|---|
| AGSK001 | error | Computed skill name exceeds 64 chars (set AgentSkillNameOverride) |
| AGSK002 | error | AgentSkillNameOverride violates agentskills.io name rules |
| AGSK003 | error | AgentSkillBodyFile set but not found |
| AGSK004 | error | Description exceeds 1024 chars |
| AGSK005 | error | AgentSkillFullFile set but not found |
| AGSK006 | error | Both AgentSkillFullFile and AgentSkillBodyFile set |
| AGSK101 | warning | Unknown Agent Token in the Consumer Flag (skipped) |
| AGSK102 | warning | Workspace root fell back to the project directory |
Source & issues
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.