承接 agents/skills 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

agents/skills

Composer 安装命令:

composer require agents/skills

包简介

Discover and install AI agent skills from Composer dependencies

README 文档

README

Discover and install AI agent skills from Composer dependencies. This library provides a mechanism for PHP packages to distribute AI agent skills (prompts, instructions, templates) that can be automatically discovered and synced into your project.

Key features:

  • Automatic skill discovery from installed Composer packages
  • Sync skills to your project with a single command
  • Override protection to preserve local modifications
  • Custom target directory support
  • Post-update hook for automatic syncing
your/library
  ├── .claude
  │   └── skills
  │       ├── commit
  │       │   └── SKILL.md
  │       └── review
  │           └── SKILL.md
  └── composer.json

Installation

This library requires PHP 8.2 or higher.

composer require agents/skills

Quick Start

  1. Install the package via Composer
  2. Configure automatic syncing in your composer.json:
{
  "require": {
    "php": ">=8.2"
  },
  "require-dev": {
    "agents/skills": "^0.1.0"
  },
  "scripts": {
    "post-update-cmd": [
      "@composer agents:skills --override"
    ]
  },
  "config": {
    "allow-plugins": {
      "agents/skills": true
    }
  }
}
  1. Run composer update to automatically sync skills, or use the commands manually via composer skills.

Console

composer agents:skills [options]
Option Short Description
--skill -s Sync only the specified skill by name
--override -o Override existing files instead of skipping them
--target -t Target directory for skills (default: .claude/skills)

Examples

composer agents:skills              # Syncs all skills (default)
composer agents:skills -s commit -o # Sync specific skill with override

Custom Skill

Package authors can distribute skills by adding configuration to their composer.json. Both skills and agentskills keys are supported (with skills taking precedence).

Skill Structure

your-package/
├── composer.json
└── .claude/
    └── skills/
        ├── commit/
        │   └── SKILL.md
        └── review/
            └── SKILL.md

Discovery Mode (Recommended)

The simplest way to distribute skills. Each subfolder in the source directory becomes a skill, and all files within are included.

{
    "extra": {
        "skills": {
            "discovery": {
                "source": [".claude/skills"]
            }
        }
    }
}

Features:

  • Each folder name becomes the skill name
  • All files in each folder are included (non-recursive)
  • Hidden files/folders (starting with .) are skipped
  • Supports multiple source directories as an array
  • Also supports a single string: "source": ".claude/skills"

Explicit Mode

For fine-grained control over file mappings and output paths.

{
    "extra": {
        "skills": {
            "skills": [
                {
                    "name": "commit",
                    "description": "Git commit helper",
                    "source": ".claude/skills/commit",
                    "files": [
                        {"input": "SKILL.md", "output": "commit/SKILL.md"}
                    ]
                }
            ]
        }
    }
}

Mixed Mode

Combine discovery with explicit overrides. Explicit skills take precedence over discovered ones.

{
    "extra": {
        "skills": {
            "discovery": {
                "source": [".claude/skills"]
            },
            "skills": [
                {
                    "name": "commit",
                    "description": "Custom commit description",
                    "source": ".claude/skills/commit",
                    "files": [
                        {"input": "SKILL.md", "output": ".claude/custom/commit.md"}
                    ]
                }
            ]
        }
    }
}

Configuration Reference

Field Required Description
discovery.source No Array of directories to scan for folder-based skills
skills No Array of explicit skill definitions
skills[].name Yes Unique identifier for the skill
skills[].description No Human-readable description
skills[].source Yes Path to skill files relative to package root
skills[].files Yes Array of file mappings
skills[].files[].input Yes Source file path relative to source
skills[].files[].output Yes Destination path relative to target directory

Example

See the playground for a complete example of skills in action.

统计信息

  • 总下载量: 401
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固