Zakira.Imprint
Ship AI Skills, custom instructions, and MCP server configs alongside your NuGet packages. Supports GitHub Copilot, Claude, OpenCode, Roo code, and Cursor.
Install / Use
/learn @MoaidHathot/Zakira.ImprintQuality Score
Category
Customer SupportSupported Platforms
README
Imprint
Distribute AI Skills and MCP configurations via NuGet packages
Overview
Imprint is a pattern for distributing AI Skills (those SKILLS.md files for GitHub Copilot, Claude, Cursor, Roo Code, and other AI assistants) and MCP Server configuration via NuGet packages. When you add an Imprint package to your project:
- On
dotnet build: Skills are automatically copied to each AI agent's native directory - On
dotnet clean: Skills are removed (including empty parent directories) - Multi-agent support: Targets Copilot, Claude, Cursor, Roo Code, OpenCode, and Windsurf simultaneously — each gets files in its native location (if exists)
- All file types supported: Not just
.md— scripts, configs, and any other files in theskills/folder are included - MCP Server Injection: Packages can inject MCP (Model Context Protocol) server configurations into each agent's
mcp.json - Code + Skills: Packages can ship both a compiled DLL library and AI skills — consumers get runtime APIs and AI guidance from a single NuGet install
This enables scenarios like:
- Compliance skills: Organization-wide coding standards distributed as a package
- Framework skills: Best practices for specific frameworks (e.g., Azure, EF Core)
- Team skills: Shared knowledge across team projects
- MCP servers: Ship MCP server configs alongside skills — consumers get both AI knowledge and tool access from a single NuGet install
- Library + Skills: Ship a utility library with AI guidance on how to use it
Library authors can choose if Skills and MCP fragments are opt-in or opt-out for consumers. By setting ImprintEnabledByDefault in the package's .csproj, authors control the default behavior:
<PropertyGroup>
<ImprintEnabledByDefault>false</ImprintEnabledByDefault> <!-- Opt-in: disabled unless user enables -->
</PropertyGroup>
Consumers can always override this per-package using metadata on their PackageReference:
<PackageReference Include="SomePackage" Version="1.0.0">
<ImprintEnabled>false</ImprintEnabled> <!-- Disable or enable this package's skills/MCP -->
</PackageReference>
The consumer's explicit setting always takes priority over the package author's default.
Quick Start
Consuming an Imprint Package
# Add the package
dotnet add package <some-Imprint-package>
# Build to install skills (happens automatically before build)
dotnet build
# Skills are now at .github/skills/, .claude/skills/, .cursor/rules/, .roo/rules/ etc.
Imprint auto-detects which AI agents you use by scanning for their configuration directories (.github/, .claude/, .cursor/, .roo/, .opencode/, .windsurf/). Skills are copied to each detected agent's native location.
A shared .gitignore is automatically generated at .imprint/.gitignore, so no manual .gitignore configuration is needed.
Creating Your Own Imprint Package
Create a new class library project and add <Imprint> items to declare your content:
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="Zakira.Imprint.Sdk" Version="1.0.0-preview" />
</ItemGroup>
<!-- Declare your content using <Imprint> items -->
<ItemGroup>
<Imprint Include="skills\**\*" />
<Imprint Include="mcp\*.mcp.json" Type="Mcp" /> <!-- MCP server configs -->
</ItemGroup>
</Project>
Create your skills in a skills/ folder, then pack:
dotnet pack -o ./packages
The SDK automatically generates the .targets file at pack time — no manual MSBuild authoring required!
Multi-Agent Support
Imprint includes multi-agent support. Instead of targeting only GitHub Copilot, Imprint can distribute skills and MCP configurations to multiple AI agents simultaneously, placing files in each agent's native directory structure.
Supported Agents
| Agent | Detection | Skills Path | MCP Path | MCP Root Key |
|-------|-----------|-------------|----------|--------------|
| copilot | .github/ exists | .github/skills/ | .vscode/mcp.json | servers |
| claude | .claude/ exists | .claude/skills/ | .claude/mcp.json | mcpServers |
| cursor | .cursor/ exists | .cursor/rules/ | .cursor/mcp.json | mcpServers |
| roo | .roo/ exists | .roo/rules/ | .roo/mcp.json | mcpServers |
| opencode | .opencode/ exists | .opencode/skills/ | opencode.json (project root) | mcp |
| windsurf | .windsurf/ exists | .windsurf/rules/ | .windsurf/mcp.json | mcpServers |
| agents | .agents/ exists | .agents/skills/ | .agents/mcp.json | mcpServers |
Unknown agent names fall back to .{name}/rules/ for skills and .{name}/mcp.json for MCP.
Agent Resolution
Imprint determines which agents to target using a priority hierarchy:
-
Explicit configuration — Set
ImprintTargetAgentsin your.csproj:<PropertyGroup> <ImprintTargetAgents>claude;cursor</ImprintTargetAgents> </PropertyGroup> -
Auto-detection (default, ON) — Scans for agent directories at build time. If
.github/and.claude/exist, bothcopilotandclaudeare targeted. Supported detection directories:.github/(copilot),.claude/(claude),.cursor/(cursor),.roo/(roo),.opencode/(opencode),.windsurf/(windsurf),.agents/(agents). -
Default fallback — If no directories are detected:
<PropertyGroup> <ImprintDefaultAgents>copilot</ImprintDefaultAgents> </PropertyGroup>
Configuration Properties
| Property | Default | Purpose |
|----------|---------|---------|
| ImprintTargetAgents | (empty) | Explicit agent list (semicolon-separated). Overrides auto-detection. |
| ImprintAutoDetectAgents | true | Scan for agent directories at build time |
| ImprintDefaultAgents | (empty) | Fallback when no agents are detected |
| ImprintRootDirectory | (auto-detected) | Repository root where skills are placed. See Root Directory. |
Root Directory
By default, Imprint auto-detects the repository root by walking up from the project directory. Markers are checked in priority order:
- VCS directories -
.git/,.svn/,.hg/(most authoritative) - IDE directories -
.vs/(Visual Studio),.idea/(JetBrains) - Solution files -
*.sln,*.slnx(fallback)
This ensures that in multi-project solutions, skills are placed at the repository root (where .git/ lives) rather than inside individual project directories:
/repo-root/ <-- Skills placed here (correct)
├── .git/
├── .github/skills/ <-- Not inside src/MyProject/.github/
├── src/
│ └── MyProject/
│ └── MyProject.csproj
└── MyApp.sln
If auto-detection doesn't work for your setup, you can explicitly set the root directory:
<PropertyGroup>
<ImprintRootDirectory>$(MSBuildThisFileDirectory)..\</ImprintRootDirectory>
</PropertyGroup>
If no repository root is found and no explicit override is set, Imprint falls back to the project directory.
Example Output
With .github/ and .claude/ directories present, installing Zakira.Imprint.Sample produces:
.github/
skills/
personal/
SKILL.md # Copilot sees this
.claude/
skills/
personal/
SKILL.md # Claude sees this
.vscode/
mcp.json # MCP servers for Copilot/VS Code
.claude/
mcp.json # MCP servers for Claude
.imprint/
manifest.json # Unified tracking manifest (v2)
.gitignore # Prevents tracking of managed files
Available Packages
| Package | Version | Description |
|---------|---------|-------------|
| Zakira.Imprint.Sdk | 1.0.0-preview | Core MSBuild task engine — auto-generates .targets, content copying, cleaning, MCP merging, multi-agent support |
How It Works
Architecture
All Imprint skill packages depend on Zakira.Imprint.Sdk, which provides the MSBuild task engine. Package authors declare <Imprint> items in their .csproj — the SDK auto-generates the .targets file at pack time, then handles agent resolution, file copying, MCP merging, manifest tracking, and cleanup at build/clean time.
┌───────────────────────────┐ ┌────────────────────────────────────┐
│ Sample │ │ Sample.FilesOnly │
│ (skills + MCP + code) │ │ (skills-only) │
└──────┬────────────────────┘ └──────┬─────────────────────────────┘
│ │
▼ ▼
┌─────────────────────────────────────────────────────────────────────┐
│ Zakira.Imprint.Sdk │
│ - Auto-generates .targets at pack time (ImprintGenerateTargets) │
│ - Copies skills to all agents (ImprintCopyContent) │
│ - Merges MCP servers (ImprintMergeMcpServers) │
│ - Cleans on dotnet clean (ImprintCleanContent, ImprintCleanMcp) │
└─────────────────────────────────────────────────────────────────────┘
Build-Time Flow
-
NuGet Restore: NuGet restores skill packages, which transitively pull in
Zakira.Imprint.Sdk. MSBuild auto-imports the SDK's props and targets via thebuildTransitive/folder. -
Agent Resolution: Before any file operations,
AgentConfig.ResolveAgents()determines which agents to target:- If
ImprintTargetAgentsis set, use that explicit list - Else if
ImprintAutoDetectAgentsis true, scan for.github/,.claude/,.cursor/,.roo/,.opencode/,.windsurf/directories - Else fall
- If
