Embeds static assets into .NET assemblies and reads/overrides them at runtime via the ABP Virtual File System. Useful for shipping JS/CSS/images with reusable ABP modules.
Ships in abp-files. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The Virtual File System (VFS) lets you treat files that are embedded into assemblies (or otherwise not on disk) as if they were physical files at runtime. It's how reusable ABP modules ship their js/css/image and localization assets, and how an application overrides those assets without editing the module.
Package: Volo.Abp.VirtualFileSystem (AbpVirtualFileSystemModule). It usually comes pre-installed via the startup templates; otherwise abp add-package Volo.Abp.VirtualFileSystem + [DependsOn(typeof(AbpVirtualFileSystemModule))].
AbpVirtualFileSystemOptions.FileSets.IVirtualFileProvider.Mark files as Embedded Resource (Build Action in the IDE, or edit the .csproj). To embed a whole folder recursively:
<ItemGroup>
<EmbeddedResource Include="MyResources\**\*.*" />
<Content Remove="MyResources\**\*.*" />
</ItemGroup>
Strongly recommended (avoids problems with special characters in file names): add the Microsoft.Extensions.FileProviders.Embedded package and set <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> in a <PropertyGroup>.
Register the assembly's embedded files with AbpVirtualFileSystemOptions.FileSets.AddEmbedded<TModule>() in your module's ConfigureServices. Pass any type from the target assembly — AddEmbedded scans the assembly of that type.
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<MyModule>();
});
}
AddEmbedded<T> takes two optional arguments:
baseNamespace — only needed if you skipped GenerateEmbeddedFilesManifest and your root namespace is non-empty; set it to the root namespace.baseFolder — expose only a subfolder (and its children) instead of the whole project.options.FileSets.AddEmbedded<MyModule>(
baseNamespace: "Acme.BookStore",
baseFolder: "/MyResources"
);
Inject IVirtualFileProvider (it implements Microsoft.Extensions.FileProviders.IFileProvider) to read the unified virtual tree. Paths are virtual (start at /), not physical disk paths.
using Microsoft.Extensions.FileProviders;
using Volo.Abp.DependencyInjection;
using Volo.Abp.VirtualFileSystem;
public class MyService : ITransientDependency
{
private readonly IVirtualFileProvider _virtualFileProvider;
public MyService(IVirtualFileProvider virtualFileProvider)
{
_virtualFileProvider = virtualFileProvider;
}
public string ReadJs()
{
// single file — IFileInfo
IFileInfo file = _virtualFileProvider.GetFileInfo("/MyResources/js/test.js");
var content = file.ReadAsString(); // ABP extension; ReadAsStringAsync also available
// everything under a directory
var dir = _virtualFileProvider.GetDirectoryContents("/MyResources/js");
return content;
}
}
Check file.Exists before reading if the path may be absent.
The VFS merges files from every module into one tree. When two modules register a file at the same virtual path (e.g. my-path/my-file.css), the one added later wins — and module dependency order determines that order. Because a depending module is registered after the modules it depends on, this is how you override an asset shipped by a module you depend on:
To replace a file from a depended-on module, put a file at the exact same virtual path in your own module/application.
Two important rules:
FileSets in reverse registration order, so the last file set registered for a given virtual path wins. To override a module's asset, register a file set (embedded or physical) at the same virtual path after that module — dependency order already puts your module later.Pages, Views, Components and Themes folders (not just wwwroot).Recompiling to see an embedded-file change is tedious while developing a module. Use ReplaceEmbeddedByPhysical<TModule>(physicalPath) (guarded to development only) so the app reads the module's files directly from disk and a browser refresh reflects edits:
[DependsOn(typeof(MyModule))]
public class MyWebAppModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var env = context.Services.GetHostingEnvironment();
if (env.IsDevelopment())
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.ReplaceEmbeddedByPhysical<MyModule>(
Path.Combine(env.ContentRootPath,
$"..{Path.DirectorySeparatorChar}MyModuleProject"));
});
}
}
}
The startup templates already use this technique for localization files.
Assembly.GetManifestResourceNames()); if they're missing there, the EmbeddedResource item isn't set. GenerateEmbeddedFilesManifest is optional — without it ABP falls back to AbpEmbeddedFileProvider, so leaving it unset does not stop resources from being embedded or served.IVirtualFileProvider.GetFileInfo("/...") and check file.Exists / ReadAsString() returns the embedded content.ReplaceEmbeddedByPhysical, edit a file on disk in development and confirm a browser refresh shows the change without recompiling.<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> (plus the Microsoft.Extensions.FileProviders.Embedded package) to avoid problems with special characters in file names; if you skip it and have a non-empty root namespace, you must pass baseNamespace to AddEmbedded<T>./ and are not physical disk paths.ReplaceEmbeddedByPhysical is a development-only technique — keep it guarded behind IsDevelopment().What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 skills in this plugin
/abp-files:manage-virtual-filesfrom abp-files
npx claudepluginhub abpframework/abp-skills --plugin abp-filesOther plugins' skills for the same job