Skip to content

SkillsSynchronizer

github-actions edited this page Apr 13, 2026 · 2 revisions

Synchronizes Fast Forward skills into consumer repositories.

This class manages the creation and maintenance of symlinks from a consumer repository to the skills packaged within the fast-forward/dev-tools dependency. It handles initial sync, idempotent re-runs, and cleanup of broken links.


  • Full name: \FastForward\DevTools\Agent\Skills\SkillsSynchronizer
  • This class is marked as final and can't be subclassed
  • This class implements: LoggerAwareInterface
  • This class is a Final class

Methods

__construct

Initializes the synchronizer with a filesystem and finder instance.

public __construct(\Symfony\Component\Filesystem\Filesystem $filesystem, \Symfony\Component\Finder\Finder $finder, \Psr\Log\LoggerInterface $logger): mixed

Parameters:

Parameter Type Description
$filesystem \Symfony\Component\Filesystem\Filesystem Filesystem instance for file operations
$finder \Symfony\Component\Finder\Finder Finder instance for locating skill directories in the package
$logger \Psr\Log\LoggerInterface Logger for recording synchronization actions and decisions

setLogger

{@inheritDoc}

public setLogger(\Psr\Log\LoggerInterface $logger): void

Parameters:

Parameter Type Description
$logger \Psr\Log\LoggerInterface

synchronize

Synchronizes skills from the package to the consumer repository.

public synchronize(string $skillsDir, string $packageSkillsPath): \FastForward\DevTools\Agent\Skills\SynchronizeResult

Ensures the consumer repository contains linked Fast Forward skills by creating symlinks to the packaged skills directory. Creates the target directory if missing, skips existing valid links, and repairs broken ones.

Parameters:

Parameter Type Description
$skillsDir string Absolute path to the consumer's .agents/skills directory
$packageSkillsPath string Absolute path to the packaged skills in the dependency

Return Value:

Result containing counts of created, preserved, and removed links


Clone this wiki locally