Skip to content

Commit 86b4202

Browse files
committed
Use configured executable paths when rendering skill templates
1 parent 436fa9e commit 86b4202

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

.ai/fluxui-free/skill/fluxui-development/SKILL.md renamed to .ai/fluxui-free/skill/fluxui-development/SKILL.blade.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
metadata:
66
author: laravel
77
---
8+
@php
9+
/** @var \Laravel\Boost\Install\GuidelineAssist $assist */
10+
@endphp
811
# Flux UI Development
912

1013
## When to Apply
@@ -48,7 +51,7 @@
4851
For icons not available in Heroicons, use [Lucide](https://lucide.dev/). Import the icons you need with the Artisan command:
4952

5053
```bash
51-
php artisan flux:icon crown grip-vertical github
54+
{{ $assist->artisanCommand('flux:icon crown grip-vertical github') }}
5255
```
5356

5457
## Common Patterns

.ai/fluxui-pro/skill/fluxui-development/SKILL.md renamed to .ai/fluxui-pro/skill/fluxui-development/SKILL.blade.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
metadata:
66
author: laravel
77
---
8+
@php
9+
/** @var \Laravel\Boost\Install\GuidelineAssist $assist */
10+
@endphp
811
# Flux UI Development
912

1013
## When to Apply
@@ -49,7 +52,7 @@
4952
For icons not available in Heroicons, use [Lucide](https://lucide.dev/). Import the icons you need with the Artisan command:
5053

5154
```bash
52-
php artisan flux:icon crown grip-vertical github
55+
{{ $assist->artisanCommand('flux:icon crown grip-vertical github') }}
5356
```
5457

5558
## Common Patterns

src/Console/InstallCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ protected function installSkills(): void
374374
emptyMessage: 'No agents are selected for skill installation.',
375375
headerMessage: sprintf('Syncing %d skills for skills-capable agents', $skills->count()),
376376
nameResolver: fn (SupportsSkills&Agent $agent): string => $agent->displayName(),
377-
processor: fn (SupportsSkills&Agent $agent): array => (new SkillWriter($agent))->sync($skills, $this->config->getSkills()),
377+
processor: fn (SupportsSkills&Agent $agent): array => (new SkillWriter($agent, $this->buildGuidelineConfig()))->sync($skills, $this->config->getSkills()),
378378
featureName: 'skills',
379379
beforeProcess: $skills->isNotEmpty()
380380
? fn () => grid($skills->map(fn (Skill $skill): string => $skill->displayName())->sort()->values()->toArray())

src/Install/SkillWriter.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Illuminate\Support\Collection;
99
use Laravel\Boost\Concerns\RendersBladeGuidelines;
1010
use Laravel\Boost\Contracts\SupportsSkills;
11+
use Laravel\Roster\Roster;
1112
use RecursiveDirectoryIterator;
1213
use RecursiveIteratorIterator;
1314
use RuntimeException;
@@ -24,11 +25,20 @@ class SkillWriter
2425

2526
public const FAILED = 2;
2627

27-
public function __construct(protected SupportsSkills $agent)
28+
public function __construct(protected SupportsSkills $agent, protected ?GuidelineConfig $config = null)
2829
{
2930
//
3031
}
3132

33+
protected function getGuidelineAssist(): GuidelineAssist
34+
{
35+
if ($this->config !== null) {
36+
return new GuidelineAssist(app(Roster::class), $this->config);
37+
}
38+
39+
return app(GuidelineAssist::class);
40+
}
41+
3242
public function write(Skill $skill): int
3343
{
3444
if (! $this->isValidSkillName($skill->name)) {

0 commit comments

Comments
 (0)