ConfigFormat
Supported configuration file formats. - "json" - Standard JSON - "jsonc" - JSON with comments (comment-preserving via jsonc-parser) - "yaml" - YAML (via js-yaml) - "toml" - TOML (via iarna/toml)
View in API reference
TransportType
MCP server transport protocol type. - "stdio" - Standard input/output (local process) - "sse" - Server-Sent Events (remote) - "http" - HTTP/Streamable HTTP (remote)
View in API reference
DetectionConfig
Configuration for detecting whether a provider is installed.
View in API reference
Provider
A resolved AI agent provider definition with platform-specific paths.
View in API reference
McpServerConfig
Canonical MCP server configuration.
View in API reference
ParsedSource
Result of parsing a source string into its typed components.
View in API reference
SkillMetadata
Metadata extracted from a SKILL.md frontmatter.
View in API reference
SkillEntry
A discovered skill entry with its location and metadata.
View in API reference
LockEntry
A single entry in the CAAMP lock file tracking an installed skill or MCP server.
View in API reference
CaampLockFile
The CAAMP lock file structure, stored at the resolved canonical lock path.
View in API reference
MarketplaceSkill
A skill listing from a marketplace search result.
View in API reference
MarketplaceSearchResult
Paginated search results from a marketplace API.
View in API reference
AuditRule
A security audit rule definition with a regex pattern to match against skill content.
View in API reference
AuditFinding
A single finding from a security audit scan, with line-level location.
View in API reference
AuditResult
Aggregate audit result for a single file.
View in API reference
InjectionCheckResult
Result of checking a single instruction file for CAAMP injection status.
View in API reference
McpServerEntry
An MCP server entry read from a provider’s config file.
View in API reference
GlobalOptions
Global CLI options shared across all CAAMP commands.
View in API reference
getPlatformPaths()
Get OS-appropriate paths for CAAMP’s global directories.
View in API reference
getSystemInfo()
Get a cached system information snapshot.
View in API reference
getPlatformLocations()
Resolves platform-specific directory locations for the current OS.
View in API reference
getAgentsHome()
Returns the global agents home directory path.
View in API reference
getProjectAgentsDir()
Returns the project-local .agents directory path.
View in API reference
resolveProjectPath()
Resolves a relative path against a project directory.
View in API reference
getCanonicalSkillsDir()
Returns the canonical skills storage directory path.
View in API reference
getLockFilePath()
Returns the path to the CAAMP lock file.
View in API reference
getAgentsMcpDir()
Gets the MCP directory within the .agents/ standard structure.
View in API reference
getAgentsMcpServersPath()
Gets the MCP servers.json path within the .agents/ standard structure.
View in API reference
getAgentsInstructFile()
Gets the primary AGENTS.md instruction file path within .agents/.
View in API reference
getAgentsConfigPath()
Gets the config.toml path within the .agents/ standard structure.
View in API reference
getAgentsWikiDir()
Gets the wiki directory within the .agents/ standard structure.
View in API reference
getAgentsSpecDir()
Gets the spec directory within the .agents/ standard structure.
View in API reference
getAgentsLinksDir()
Gets the links directory within the .agents/ standard structure.
View in API reference
resolveRegistryTemplatePath()
Resolves a registry template path by substituting platform variables.
View in API reference
resolveProviderConfigPath()
Resolves the configuration file path for a provider at the given scope.
View in API reference
resolvePreferredConfigScope()
Determines the preferred configuration scope for a provider.
View in API reference
resolveProviderSkillsDir()
Resolves the skills directory path for a provider at the given scope.
View in API reference
resolveProviderSkillsDirs()
Gets all target directories for skill installation based on provider precedence.
View in API reference
resolveProviderProjectPath()
Resolves a provider’s project-level path against a project directory.
View in API reference
resolveProvidersRegistryPath()
Locates the providers registry.json file by searching up from a start directory.
View in API reference
normalizeSkillSubPath()
Normalizes a skill sub-path by cleaning separators and removing SKILL.md suffix.
View in API reference
buildSkillSubPathCandidates()
Builds a list of candidate sub-paths for skill file resolution.
View in API reference
getAllProviders()
Retrieve all registered providers with resolved platform paths. Providers are lazily loaded from providers/registry.json on first call and cached for subsequent calls.
View in API reference
getProvider()
Look up a provider by its ID or any of its aliases.
View in API reference
resolveAlias()
Resolve an alias to its canonical provider ID. If the input is already a canonical ID (or unrecognized), it is returned as-is.
View in API reference
getProvidersByPriority()
Filter providers by their priority tier.
View in API reference
getPrimaryProvider()
Get the single primary harness provider, if any is registered.
View in API reference
getProvidersByStatus()
Filter providers by their lifecycle status.
View in API reference
getProvidersByInstructFile()
Filter providers that use a specific instruction file. Multiple providers often share the same instruction file (e.g. many use "AGENTS.md").
View in API reference
getInstructionFiles()
Get the set of all unique instruction file names across all providers.
View in API reference
getProviderCount()
Get the total number of registered providers.
View in API reference
getRegistryVersion()
Get the semantic version string of the provider registry.
View in API reference
getProvidersByHookEvent()
Filter providers that support a specific hook event.
View in API reference
getCommonHookEvents()
Get hook events common to all specified providers. If providerIds is provided, returns the intersection of their supported events. If providerIds is undefined or empty, uses all providers.
View in API reference
providerSupports()
Check whether a provider supports a specific capability via dot-path query. The dot-path addresses a value inside provider.capabilities. For boolean fields the provider “supports” the capability when the value is true. For non-boolean fields the provider “supports” it when the value is neither null nor undefined (and, for arrays, non-empty).
View in API reference
getSpawnCapableProviders()
Filter providers that support spawning subagents.
View in API reference
getProvidersBySpawnCapability()
Filter providers by a specific boolean spawn capability flag.
View in API reference
resetRegistry()
Reset cached registry data, forcing a reload on next access.
View in API reference
getProvidersBySkillsPrecedence()
Filter providers by their skills precedence value.
View in API reference
getEffectiveSkillsPaths()
Get the effective skills paths for a provider, ordered by precedence.
View in API reference
buildSkillsMap()
Build a full skills map for all providers.
View in API reference
getProviderCapabilities()
Get capabilities for a provider by ID or alias.
View in API reference
providerSupportsById()
Check if a provider supports a capability using ID/alias lookup. Convenience wrapper that resolves the provider first, then delegates to the provider-level providerSupports.
View in API reference
buildInjectionContent()
Build injection content from a structured template. Produces a string suitable for injection between CAAMP markers. References are output as @ lines, content blocks are appended as-is.
View in API reference
parseInjectionContent()
Parse injection content back into template form. Lines starting with @ are treated as references. All other non-empty lines are treated as content blocks.
View in API reference
generateInjectionContent()
Generate a standard CAAMP injection block for instruction files. Produces markdown content suitable for injection between CAAMP markers. Optionally includes MCP server and custom content sections.
View in API reference
generateSkillsSection()
Generate a skills discovery section for instruction files.
View in API reference
getInstructFile()
Get the correct instruction file name for a provider.
View in API reference
groupByInstructFile()
Group providers by their instruction file name. Useful for determining which providers share the same instruction file (e.g. multiple providers using AGENTS.md).
View in API reference
checkInjection()
Check the status of a CAAMP injection block in an instruction file. Returns the injection status: - "missing" - File does not exist - "none" - File exists but has no CAAMP markers - "current" - CAAMP block exists and matches expected content (or no expected content given) - "outdated" - CAAMP block exists but differs from expected content
View in API reference
inject()
Inject content into an instruction file between CAAMP markers. Behavior depends on the file state: - File does not exist: creates the file with the injection block → "created" - File exists without markers: prepends the injection block → "added" - File exists with multiple markers (duplicates): consolidates into single block → "consolidated" - File exists with markers, content differs: replaces the block → "updated" - File exists with markers, content matches: no-op → "intact" This function is idempotent — calling it multiple times with the same content will not modify the file after the first write.
View in API reference
removeInjection()
Remove the CAAMP injection block from an instruction file. If removing the block would leave the file empty, the file is deleted entirely.
View in API reference
checkAllInjections()
Check injection status across all providers’ instruction files. Deduplicates by file path since multiple providers may share the same instruction file (e.g. many providers use AGENTS.md).
View in API reference
injectAll()
Inject content into all providers’ instruction files. Deduplicates by file path to avoid injecting the same file multiple times.
View in API reference
ensureProviderInstructionFile()
Ensure a provider’s instruction file exists with the correct CAAMP block. This is the canonical API for adapters and external packages to manage provider instruction files. Instead of directly creating/modifying CLAUDE.md, GEMINI.md, etc., callers should use this function to delegate instruction file management to CAAMP. The instruction file name is resolved from CAAMP’s provider registry (single source of truth), not hardcoded by the caller.
View in API reference
ensureAllProviderInstructionFiles()
Ensure instruction files for multiple providers at once. Deduplicates by file path — providers sharing the same instruction file (e.g. many providers use AGENTS.md) are only written once.
View in API reference
setVerbose()
Enable or disable verbose (debug) logging mode. When enabled, debug messages are written to stderr.
View in API reference
setQuiet()
Enable or disable quiet mode. When enabled, info and warning messages are suppressed. Errors are always shown.
View in API reference
debug()
Log a debug message to stderr when verbose mode is enabled.
View in API reference
info()
Log an informational message to stdout.
View in API reference
warn()
Log a warning message to stderr.
View in API reference
error()
Log an error message to stderr.
View in API reference
isVerbose()
Check if verbose (debug) logging is currently enabled.
View in API reference
isQuiet()
Check if quiet mode is currently enabled.
View in API reference
setHuman()
Enable or disable human-readable output mode. When enabled, commands output human-readable format instead of JSON.
View in API reference
isHuman()
Check if human-readable output mode is currently enabled.
View in API reference
DetectionResult
Result of detecting whether a provider is installed on the system.
View in API reference
detectProvider()
Detect if a single provider is installed on the system. Checks each detection method configured for the provider (binary, directory, appBundle, flatpak) and returns which methods matched.
View in API reference
detectProjectProvider()
Detect if a provider has project-level config in the given directory.
View in API reference
detectAllProviders()
Detect all registered providers and return their installation status. Runs detection for every provider in the registry.
View in API reference
getInstalledProviders()
Get only providers that are currently installed on the system. Convenience wrapper that filters detectAllProviders results to only those with installed === true.
View in API reference
detectProjectProviders()
Detect all providers and enrich results with project-level presence. Extends detectAllProviders by also checking whether each provider has a project-level config file in the given directory.
View in API reference
resetDetectionCache()
Reset the detection result cache, forcing fresh detection on next call.
View in API reference
SkillInstallResult
Result of installing a skill to the canonical location and linking to agents.
View in API reference
installToCanonical()
Copy skill files to the canonical location.
View in API reference
installSkill()
Install a skill from a local path to the canonical location and link to agents.
View in API reference
removeSkill()
Remove a skill from the canonical location and all agent symlinks.
View in API reference
listCanonicalSkills()
List all skills installed in the canonical skills directory.
View in API reference
selectProvidersByMinimumPriority()
Filters providers by minimum priority and returns them in deterministic tier order.
View in API reference
installBatchWithRollback()
Installs multiple skills across filtered providers with rollback.
View in API reference
updateInstructionsSingleOperation()
Updates instruction files across providers as a single operation.
View in API reference
resolveFormat()
Resolves output format based on flags and defaults.
View in API reference
buildEnvelope()
Builds a standard LAFS envelope.
View in API reference
emitError()
Emits a JSON error envelope to stderr and exits the process.
View in API reference
emitJsonError()
Emits a JSON error envelope without exiting (for catch blocks).
View in API reference
outputSuccess()
Outputs a successful LAFS envelope to stdout.
View in API reference
handleFormatError()
Handles format resolution errors consistently.
View in API reference
emitSuccess()
Emits a successful LAFS result envelope to stdout.
View in API reference
emitError()
Emits a failed LAFS error envelope to stderr.
View in API reference
runLafsCommand()
Runs an async action and emits the result as a LAFS success or error envelope.
View in API reference
parsePriority()
Parses and validates a provider priority tier string.
View in API reference
resolveProviders()
Resolves the set of target providers from CLI targeting options.
View in API reference
readJsonFile()
Reads and parses a JSON file from disk.
View in API reference
readSkillOperations()
Reads and validates a JSON file containing skill batch operations.
View in API reference
readTextInput()
Reads text input from either inline content or a file path, enforcing mutual exclusivity.
View in API reference
registerAdvancedBatch()
Registers the advanced batch subcommand for rollback-capable batch install of skills.
View in API reference
registerAdvancedInstructions()
Registers the advanced instructions subcommand for single-operation instruction updates.
View in API reference
registerAdvancedProviders()
Registers the advanced providers subcommand for selecting providers by priority tier.
View in API reference
registerAdvancedCommands()
Registers the advanced command group with providers, batch, and instructions subcommands.
View in API reference
deepMerge()
Deep merge two objects, with source values winning on conflict. Recursively merges nested plain objects. Arrays and non-object values from source overwrite target values.
View in API reference
setNestedValue()
Set a nested value using a dot-notation key path.
View in API reference
getNestedValue()
Get a nested value from an object using a dot-notation key path.
View in API reference
ensureDir()
Ensure that the parent directories of a file path exist. Creates directories recursively if they do not exist.
View in API reference
readJsonConfig()
Read and parse a JSON or JSONC config file.
View in API reference
writeJsonConfig()
Write a server config entry to a JSON/JSONC file, preserving comments.
View in API reference
removeJsonConfig()
Remove a server entry from a JSON/JSONC config file.
View in API reference
readTomlConfig()
Read and parse a TOML config file.
View in API reference
writeTomlConfig()
Write a server config entry to a TOML file.
View in API reference
removeTomlConfig()
Remove a server entry from a TOML config file.
View in API reference
readYamlConfig()
Read and parse a YAML config file.
View in API reference
writeYamlConfig()
Write a server config entry to a YAML file.
View in API reference
removeYamlConfig()
Remove a server entry from a YAML config file.
View in API reference
readConfig()
Read and parse a config file in the specified format. Dispatches to the appropriate format handler (JSON/JSONC, YAML, or TOML).
View in API reference
writeConfig()
Write a server entry to a config file, preserving existing content. Dispatches to the appropriate format handler. For JSONC files, comments are preserved using jsonc-parser.
View in API reference
removeConfig()
Remove a server entry from a config file in the specified format.
View in API reference
registerConfigCommand()
Registers the config command group with show and path subcommands for viewing provider configurations.
View in API reference
readLockFile()
Read and parse the CAAMP lock file from disk.
View in API reference
writeLockFile()
Write the lock file atomically under a process lock guard.
View in API reference
updateLockFile()
Safely read-modify-write the lock file under a process lock guard.
View in API reference
getCaampVersion()
Retrieve the current CAAMP package version from the nearest package.json.
View in API reference
registerDoctorCommand()
Registers the doctor command for diagnosing configuration issues and overall system health.
View in API reference
registerInstructionsCheck()
Registers the instructions check subcommand for verifying injection status across providers.
View in API reference
registerInstructionsInject()
Registers the instructions inject subcommand for injecting instruction blocks into provider files.
View in API reference
registerInstructionsUpdate()
Registers the instructions update subcommand for refreshing all instruction file injections.
View in API reference
registerInstructionsCommands()
Registers the instructions command group with inject, check, and update subcommands.
View in API reference
resetHookMappings()
Reset the cached hook mappings data.
View in API reference
getCanonicalEvent()
Get the canonical event definition (category, description, canBlock).
View in API reference
getAllCanonicalEvents()
Get all canonical event definitions.
View in API reference
getCanonicalEventsByCategory()
Get canonical events filtered by category.
View in API reference
getProviderHookProfile()
Get the full hook profile for a provider.
View in API reference
getMappedProviderIds()
Get all provider IDs that have hook mappings.
View in API reference
toNative()
Translate a CAAMP canonical event name to the provider’s native name.
View in API reference
toCanonical()
Translate a provider-native event name to the CAAMP canonical name.
View in API reference
toNativeBatch()
Batch-translate multiple canonical events to native names for a provider.
View in API reference
supportsHook()
Check if a provider supports a specific canonical hook event.
View in API reference
getHookSupport()
Get full hook support details for a canonical event on a provider.
View in API reference
getSupportedEvents()
Get all supported canonical events for a provider.
View in API reference
getUnsupportedEvents()
Get all unsupported canonical events for a provider.
View in API reference
getProvidersForEvent()
Get providers that support a specific canonical event.
View in API reference
getCommonEvents()
Get canonical events common to all specified providers.
View in API reference
getProviderSummary()
Get a summary of hook support for a provider.
View in API reference
buildHookMatrix()
Build a cross-provider hook support matrix.
View in API reference
getHookSystemType()
Get the hook system type for a provider.
View in API reference
getHookConfigPath()
Get the resolved hook config path for a provider.
View in API reference
getProviderOnlyEvents()
Get provider-only events (native events with no canonical mapping).
View in API reference
translateToAll()
Translate a canonical event to native names across multiple providers.
View in API reference
resolveNativeEvent()
Find the best canonical match for a native event name across all providers.
View in API reference
getHookMappingsVersion()
Get the version of the hook mappings data.
View in API reference
registerProvidersCommand()
Registers the providers command group with list, detect, show, skills-map, hooks, and capabilities subcommands.
View in API reference
getRulesByCategory()
Get audit rules filtered by category.
View in API reference
getRulesBySeverity()
Get audit rules filtered by severity level.
View in API reference
getCategories()
Get all unique rule categories.
View in API reference
scanFile()
Scan a single file against security audit rules.
View in API reference
scanDirectory()
Scan a directory of skills for security issues.
View in API reference
toSarif()
Convert audit results to SARIF 2.1.0 format (Static Analysis Results Interchange Format).
View in API reference
registerSkillsAudit()
Registers the skills audit subcommand for security scanning skill files.
View in API reference
parseSource()
Parse and classify a source string into a typed ParsedSource.
View in API reference
isMarketplaceScoped()
Check if a source string looks like a marketplace scoped name (@author/name).
View in API reference
recordSkillInstall()
Record a skill installation in the lock file.
View in API reference
removeSkillFromLock()
Remove a skill entry from the lock file.
View in API reference
getTrackedSkills()
Get all skills tracked in the lock file.
View in API reference
checkSkillUpdate()
Check if a skill has updates available by comparing the installed version against the latest remote commit SHA.
View in API reference
checkAllSkillUpdates()
Check for updates across all tracked skills.
View in API reference
registerSkillsCheck()
Registers the skills check subcommand for checking available skill updates.
View in API reference
fetchWithTimeout()
Fetch a URL with an automatic timeout via AbortSignal.timeout.
View in API reference
ensureOkResponse()
Assert that a Response has an OK status, throwing on failure.
View in API reference
formatNetworkError()
Format a network error into a user-friendly message string.
View in API reference
MarketplaceClient
Unified marketplace client that aggregates results from multiple marketplace adapters. Queries all configured marketplaces in parallel, deduplicates results by scoped name, and sorts by star count.
View in API reference
tokenizeCriteriaValue()
Splits a comma-separated criteria string into normalized tokens.
View in API reference
validateRecommendationCriteria()
Validates recommendation criteria input for correctness and consistency.
View in API reference
normalizeRecommendationCriteria()
Normalizes raw recommendation criteria into a consistent tokenized form.
View in API reference
scoreSkillRecommendation()
Computes a recommendation score for a single skill against normalized criteria.
View in API reference
recommendSkills()
Validates, normalizes, scores, and ranks a list of skills against criteria.
View in API reference
formatSkillRecommendations()
Format skill recommendation results for display or serialization.
View in API reference
searchSkills()
Search for skills via marketplace APIs.
View in API reference
recommendSkills()
Search and rank skills based on query and recommendation criteria.
View in API reference
registerSkillsFind()
Registers the skills find subcommand for searching marketplaces and recommending skills.
View in API reference
registerSkillsInit()
Registers the skills init subcommand for scaffolding new SKILL.md templates.
View in API reference
loadLibraryFromModule()
Load a SkillLibrary from a module (index.js) at the given root directory.
View in API reference
buildLibraryFromFiles()
Build a SkillLibrary from raw files in a directory.
View in API reference
registerSkillLibrary()
Registers a SkillLibrary instance directly as the active catalog.
View in API reference
registerSkillLibraryFromPath()
Registers a skill library by loading it from a directory path.
View in API reference
clearRegisteredLibrary()
Clears the registered skill library instance.
View in API reference
isCatalogAvailable()
Checks whether a skill library is available for use.
View in API reference
getSkills()
Returns all skill entries from the catalog.
View in API reference
getManifest()
Returns the parsed skill library manifest.
View in API reference
listSkills()
Lists all available skill names in the catalog.
View in API reference
getSkill()
Gets skill metadata by name from the catalog.
View in API reference
getSkillPath()
Resolves the absolute path to a skill’s SKILL.md file.
View in API reference
getSkillDir()
Resolves the absolute path to a skill’s directory.
View in API reference
readSkillContent()
Reads a skill’s SKILL.md content as a string.
View in API reference
getCoreSkills()
Returns all skills marked as core in the catalog.
View in API reference
getSkillsByCategory()
Returns skills filtered by category.
View in API reference
getSkillDependencies()
Gets the direct dependency names for a skill.
View in API reference
resolveDependencyTree()
Resolves the full dependency tree for a set of skill names.
View in API reference
listProfiles()
Lists all available profile names in the catalog.
View in API reference
getProfile()
Gets a profile definition by name from the catalog.
View in API reference
resolveProfile()
Resolves a profile to its full skill list including inherited skills.
View in API reference
listSharedResources()
Lists all available shared resource names in the catalog.
View in API reference
getSharedResourcePath()
Gets the absolute path to a shared resource file.
View in API reference
readSharedResource()
Reads a shared resource file’s content as a string.
View in API reference
listProtocols()
Lists all available protocol names in the catalog.
View in API reference
getProtocolPath()
Gets the absolute path to a protocol file.
View in API reference
readProtocol()
Reads a protocol file’s content as a string.
View in API reference
validateSkillFrontmatter()
Validates a single skill’s frontmatter against the schema.
View in API reference
validateAll()
Validates all skills in the catalog and returns results per skill.
View in API reference
getDispatchMatrix()
Gets the dispatch matrix from the skill library manifest.
View in API reference
getVersion()
Returns the skill library version string.
View in API reference
getLibraryRoot()
Returns the absolute path to the skill library root directory.
View in API reference
parseSkillFile()
Parse a SKILL.md file and extract its frontmatter metadata.
View in API reference
discoverSkill()
Discover a single skill at a given directory path.
View in API reference
discoverSkills()
Scan a directory for skill subdirectories, each containing a SKILL.md file.
View in API reference
discoverSkillsMulti()
Discover skills across multiple directories.
View in API reference
cloneRepo()
Clone a GitHub repo to a temp directory.
View in API reference
fetchRawFile()
Fetch a specific file from GitHub using the raw API.
View in API reference
repoExists()
Check if a GitHub repo exists.
View in API reference
cloneGitLabRepo()
Clone a GitLab repo to a temp directory.
View in API reference
fetchGitLabRawFile()
Fetch a specific file from GitLab using the raw API.
View in API reference
registerSkillsInstall()
Registers the skills install subcommand for installing skills from various sources.
View in API reference
registerSkillsList()
Registers the skills list subcommand for listing installed skills.
View in API reference
registerSkillsRemove()
Registers the skills remove subcommand for removing installed skills.
View in API reference
registerSkillsUpdate()
Registers the skills update subcommand for updating all outdated skills.
View in API reference
ValidationIssue
A single validation issue found during SKILL.md validation.
View in API reference
ValidationResult
Result of validating a SKILL.md file against the Agent Skills standard.
View in API reference
validateSkill()
Validate a SKILL.md file against the Agent Skills standard.
View in API reference
registerSkillsValidate()
Registers the skills validate subcommand for validating SKILL.md file format.
View in API reference
registerSkillsCommands()
Registers the skills command group with all skill management subcommands.
View in API reference