Skip to content

feat: add --agent-skills switch to init command#1561

Open
dhilipkumars wants to merge 1 commit intogithub:mainfrom
dhilipkumars:agent-skills
Open

feat: add --agent-skills switch to init command#1561
dhilipkumars wants to merge 1 commit intogithub:mainfrom
dhilipkumars:agent-skills

Conversation

@dhilipkumars
Copy link

This change adds the --agent-skills switch to the init command, allowing users to automatically install agent skills from Prompt.MD templates. It also adds pyyaml as a dependency.

This change adds the --agent-skills switch to the init command, allowing users to automatically install agent skills from Prompt.MD templates. It also adds pyyaml as a dependency.
Copilot AI review requested due to automatic review settings February 4, 2026 19:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for automatically installing agent skills during project initialization by introducing the --agent-skills flag to the init command. The feature converts Prompt.MD template files from templates/commands/ into properly formatted SKILL.md files following the agentskills.io specification.

Changes:

  • Added install_agent_skills() function to convert Prompt.MD templates into agent skills with enhanced descriptions
  • Added --agent-skills CLI flag to init command (requires --ai flag)
  • Added pyyaml dependency for YAML frontmatter parsing

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/specify_cli/init.py Implements agent skills installation logic and adds CLI flag validation
pyproject.toml Adds pyyaml dependency and bumps version to 0.0.23
README.md Documents the new --agent-skills flag with usage examples
CHANGELOG.md Documents the feature addition for version 0.0.23

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

installed_count += 1

except Exception as e:
console.print(f"[yellow]Warning: Failed to install skill {command_name}: {e}[/yellow]")
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The error message references command_name which may not be defined if the exception occurs before line 1008. Consider using command_file.stem or wrapping in a try-except to ensure the variable is always available.

Suggested change
console.print(f"[yellow]Warning: Failed to install skill {command_name}: {e}[/yellow]")
skill_label = command_name if 'command_name' in locals() else command_file.stem
console.print(f"[yellow]Warning: Failed to install skill {skill_label}: {e}[/yellow]")

Copilot uses AI. Check for mistakes.
skill_content = f"""---
name: {skill_name}
description: {enhanced_desc}
compatibility: Requires git and spec-kit project structure with .specify/ directory
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

Inconsistent naming: the directory is referred to as .specify/ here but the actual skills are installed to .agent/ directory. This should be clarified or corrected to avoid confusion.

Suggested change
compatibility: Requires git and spec-kit project structure with .specify/ directory
compatibility: Requires git and spec-kit project structure with .agent/skills/ directory

Copilot uses AI. Check for mistakes.
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.

1 participant