pub struct Profile {
pub name: String,
pub path: PathBuf,
/* private fields */
}Expand description
A profile containing configuration files for Claude Code
Profile aggregates related metadata with lazy loading:
PluginManifestfrom.claude-plugin/plugin.jsonProfileMetadatafrom.dot-agent.tomlFilterConfigfrom.dot-agent.tomlfilter section
Fields§
§name: String§path: PathBufImplementations§
Source§impl Profile
impl Profile
pub fn new(name: String, path: PathBuf) -> Self
Sourcepub fn manifest(&self) -> Result<Option<&PluginManifest>>
pub fn manifest(&self) -> Result<Option<&PluginManifest>>
Get plugin manifest (lazy loaded from .claude-plugin/plugin.json)
Sourcepub fn metadata(&self) -> Result<Option<&ProfileMetadata>>
pub fn metadata(&self) -> Result<Option<&ProfileMetadata>>
Get profile metadata (lazy loaded from .dot-agent.toml)
Sourcepub fn filter_config(&self) -> Result<Option<&FilterConfig>>
pub fn filter_config(&self) -> Result<Option<&FilterConfig>>
Get filter config (lazy loaded from .dot-agent.toml)
Sourcepub fn source(&self) -> Result<ProfileSource>
pub fn source(&self) -> Result<ProfileSource>
Get profile source (Local, Git, or Marketplace)
Sourcepub fn description(&self) -> Result<Option<String>>
pub fn description(&self) -> Result<Option<String>>
Get profile description
Sourcepub fn category_store(&self) -> Result<CategoryStore>
pub fn category_store(&self) -> Result<CategoryStore>
Get category store (builtin + profile overrides)
Returns a CategoryStore with builtin categories, optionally
overridden by categories defined in .dot-agent.toml.
Sourcepub fn has_plugin_features(&self) -> bool
pub fn has_plugin_features(&self) -> bool
Check if profile has plugin features (hooks, MCP, LSP)
Sourcepub fn plugin_scope(&self) -> Result<PluginScope>
pub fn plugin_scope(&self) -> Result<PluginScope>
Get plugin scope (User, Project, or Local)
Sourcepub fn plugin_enabled(&self) -> Result<bool>
pub fn plugin_enabled(&self) -> Result<bool>
Check if plugin is enabled
Sourcepub fn list_files(&self) -> Result<Vec<PathBuf>>
pub fn list_files(&self) -> Result<Vec<PathBuf>>
List all files in the profile directory (relative paths) with default ignore config
Sourcepub fn list_files_with_config(
&self,
config: &IgnoreConfig,
) -> Result<Vec<PathBuf>>
pub fn list_files_with_config( &self, config: &IgnoreConfig, ) -> Result<Vec<PathBuf>>
List all files in the profile directory (relative paths) with custom ignore config
File collection logic:
- Build allowed filter: (DEFAULT_DIRS or plugin paths) + CLAUDE.md + include - exclude
- Walk all files and collect only those matching the filter
Sourcepub fn contents_summary(&self) -> String
pub fn contents_summary(&self) -> String
Get contents summary (e.g., “skills (5), commands (3)”)
Sourcepub fn contents_summary_with_config(&self, config: &IgnoreConfig) -> String
pub fn contents_summary_with_config(&self, config: &IgnoreConfig) -> String
Get contents summary with custom ignore config