InstallSkills
class InstallSkills extends Command
Artisan Command: Install Beartropy AI coding skills.
Auto-discovers skills from all installed beartropy/ packages using convention-based scanning (.claude/skills/bt-{pkg}- directories and docs/llms/*.md files) with optional skills.json overrides.
The component skill for each package is generated dynamically by
concatenating all per-component LLM reference docs from docs/llms/.
Constants
| protected AGENTS |
All supported agent identifiers. |
| protected AGENT_CONFIG |
Agent configuration map. |
Properties
| protected string | $signature | ||
| protected string | $description |
Methods
Execute the console command.
Discover all beartropy packages that expose skills.
Resolve skills for a single package root.
Get all skill contents from all discovered packages.
Build a component skill by concatenating LLM docs.
Build a dynamic README.md listing all installed skills grouped by package.
Extract a field value from YAML frontmatter.
Install skills for the given agents.
Install skills for a single agent.
Install modular format (Claude Code): one directory per skill with SKILL.md.
Install single-file format (Codex, Copilot): all skills concatenated into one file.
Install multi-file format (Cursor, Windsurf): one file per skill.
Remove skills for the given agents.
Remove skills for a single agent.
Remove modular skills (Claude Code).
Remove single-file skills (Codex, Copilot).
Remove multi-file skills (Cursor, Windsurf).
Strip YAML frontmatter from content.
Find existing Beartropy skill directories (bt- and legacy beartropy-).
Details
at line 86
int
handle()
Execute the console command.
at line 117
protected array
discoverPackages()
Discover all beartropy packages that expose skills.
Always includes self (beartropy/ui from source path). Scans vendor/beartropy/* for sibling packages.
at line 164
protected array|null
resolvePackageSkills(string $root, string $slug)
Resolve skills for a single package root.
Checks for skills.json first for explicit overrides, then falls back to convention-based scanning of .claude/skills/bt-{slug}-* directories.
at line 234
protected array
getSkillContents()
Get all skill contents from all discovered packages.
at line 300
protected string
buildComponentSkill(string $llmsDir, string|null $staticHeaderPath, string $skillName, string $packageName)
Build a component skill by concatenating LLM docs.
Uses a static SKILL.md as the header (intent-mapping / selection guides) if available, then appends all per-component LLM reference docs.
at line 348
protected string
buildReadme(array $skills)
Build a dynamic README.md listing all installed skills grouped by package.
at line 395
protected string|null
extractFrontmatterField(string $content, string $field)
Extract a field value from YAML frontmatter.
at line 423
protected int
installForAgents(array $agents)
Install skills for the given agents.
at line 451
protected int
installForAgent(string $agent, array $skills)
Install skills for a single agent.
at line 467
protected int
installModular(string $agent, array $skills)
Install modular format (Claude Code): one directory per skill with SKILL.md.
at line 541
protected int
installSingle(string $agent, array $skills)
Install single-file format (Codex, Copilot): all skills concatenated into one file.
at line 612
protected int
installMultiFile(string $agent, array $skills)
Install multi-file format (Cursor, Windsurf): one file per skill.
at line 690
protected int
removeForAgents(array $agents)
Remove skills for the given agents.
at line 710
protected bool
removeForAgent(string $agent)
Remove skills for a single agent.
at line 726
protected bool
removeModular(string $agent)
Remove modular skills (Claude Code).
Scans for all bt- and legacy beartropy- directories.
at line 770
protected bool
removeSingle(string $agent)
Remove single-file skills (Codex, Copilot).
at line 797
protected bool
removeMultiFile(string $agent)
Remove multi-file skills (Cursor, Windsurf).
Scans for all bt- and legacy beartropy- files.
at line 834
protected string
stripFrontmatter(string $content)
Strip YAML frontmatter from content.
at line 851
protected array
findExistingSkills(string $targetDir)
Find existing Beartropy skill directories (bt- and legacy beartropy-).