Skip to content

feat(cli): add install-skills command#6

Merged
bercianor merged 3 commits into
masterfrom
feat/install-skill-command
May 27, 2026
Merged

feat(cli): add install-skills command#6
bercianor merged 3 commits into
masterfrom
feat/install-skill-command

Conversation

@bercianor
Copy link
Copy Markdown
Contributor

Add a new top-level install-skills command to install official Flamingock skills into ./.agents/skills for the current project.

Accept -g/--global for future compatibility, but return a clear not-implemented message for now.

Use Java-native HTTP/ZIP/NIO APIs to download and extract the official skills archive without depending on external tools like git, curl, or wget.

Implement full per-skill replacement for official flamingock-* directories while preserving user-defined custom skill folders.

Harden failure handling with actionable user-facing errors, HTTP timeouts, zip-slip protection, and robust temporary-workspace cleanup.

Add a new top-level `install-skills` command to install official Flamingock skills into `./.agents/skills` for the current project.

Accept `-g/--global` for future compatibility, but return a clear not-implemented message for now.

Use Java-native HTTP/ZIP/NIO APIs to download and extract the official skills archive without depending on external tools like git, curl, or wget.

Implement full per-skill replacement for official `flamingock-*` directories while preserving user-defined custom skill folders.

Harden failure handling with actionable user-facing errors, HTTP timeouts, zip-slip protection, and robust temporary-workspace cleanup.
Copy link
Copy Markdown
Member

@dieppa dieppa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very well structured, with separation of concerns, simple interfaces and components that interact with each other, and everything orchestrated in the SkillsInstallationPipeline, which makes the actual CLI operation simple and easy to understand and follow.

The only thing is that most of the components should be generic. Then the caller pass the specific parameters.

Most of the components(if not all) should be generic file utility components

Comment thread src/main/java/io/flamingock/cli/executor/skills/InstallDestinationResolver.java Outdated
Comment thread src/main/java/io/flamingock/cli/executor/skills/InstallModeResolver.java Outdated
Comment thread src/main/java/io/flamingock/cli/executor/skills/SkillArchiveEnumerator.java Outdated
Comment thread src/main/java/io/flamingock/cli/executor/skills/SkillDirectoryReplacer.java Outdated
Comment thread src/main/java/io/flamingock/cli/executor/skills/SkillsArchiveDownloader.java Outdated
Comment thread src/main/java/io/flamingock/cli/executor/skills/SkillsArchiveExtractor.java Outdated
Comment thread src/main/java/io/flamingock/cli/executor/skills/SkillsFileUtils.java Outdated
@bercianor
Copy link
Copy Markdown
Contributor Author

I updated the implementation following the direction you suggested, while keeping the refactor intentionally small and simple.

What changed:

  • Generic low-level helpers were moved out of the skills package into more appropriate reusable areas (filesystem, http, archive).
  • Install-skills-specific orchestration stayed in InstallSkillsCommand and SkillsInstallationPipeline.
  • Hardcoded install-skills values were pushed upward to the composition level, mainly in the pipeline, instead of being embedded inside reusable helpers.
  • The trivial mode resolver abstraction was removed.

Also:

  • The install flow is now prepared to resolve explicit installation targets instead of assuming a single destination path.
  • SkillsInstallationPipeline now supports applying one download/extract/enumerate pass to one or many resolved targets, which prepares the structure for the future --global flow without changing current behavior.

What stayed specific on purpose:

  • InstallSkillsCommand
  • SkillsInstallationPipeline
  • the install-skills flow and user-facing behavior

Copy link
Copy Markdown
Member

@dieppa dieppa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like, just few comments to nail it:

  • we can move the utilities(inside filesystem and http folders) to util folder. You can have the filesystem and http subfolder if you wish.
  • I think the class InstallationTarget can be generic too, but it's not wrong if it stays as skill-specific class. But if so, name it with skill, like the others. Something like `SkillsInstallationTarget"

@bercianor bercianor merged commit 6db0a05 into master May 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants