定制 stolt/skill-md 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

stolt/skill-md

最新稳定版本:v0.0.3

Composer 安装命令:

composer require stolt/skill-md

包简介

A library abstracting a SKILL.md file.

README 文档

README

Test Status Lint Status Version Downloads PHP Version PDS Skeleton Lean dist package

A PHP library to abstract a SKILL.md file.

Installation

composer require stolt/skill-md

Usage

Creating a SKILL.md representation from an array

 $skillMdData = [
    'name' => 'Code Review',
    'description' => 'Performs automated code reviews.',
    'body' => '# Some longer, skill describing Markdown content.',
    'version' => '1.0.0',
    'tags' => ['php', 'qa'],
];

$skillMd = SkillMd::fromArray($skillMdData);

Creating a SKILL.md representation via class properties

$skillMd = new SkillMd(
    'Code Review',
    'Performs automated code reviews.',
    '# Some longer, skill describing Markdown content.',
    ['version' => '1.0.0', 'license' => 'MIT', 'tags' => ['php', 'qa']]
);

$skillMdViaFactory = SkillMd::create(
    'Code Review',
    'Performs automated code reviews.',
    '# Some longer, skill describing Markdown content.',
    ['version' => '1.0.0', 'license' => 'MIT', 'tags' => ['php', 'qa']]
);

Accessing SKILL.md data

$skillName = $skillMd->name();
$skillDescription = $skillMd->description();
$skillBody = $skillMd->body();
$skillVersion = $skillMd->version();
$skillTags = $skillMd->tags();
$skillLicense = $skillMd->get('license');

if ($skill->has('unsupported-field') === false) {
    echo 'This field is not supported.';
}

if ($skill->get('unsupported-field') === null) {
    echo 'This field is not supported and has no value.';
}

Turning a SKILL.md representation into Markdown

The programmatical representation:

$skillMd = new SkillMd(
    'Code Review',
    'Performs automated code reviews.',
    '# Some longer, skill describing Markdown content',
    ['version' => '1.0.0', 'license' => 'MIT', 'tags' => ['php', 'qa']]
);

$markdown = $skillMd->toMarkdown();

The Markdown representation:

---
name: code-review
description: Performs automated code reviews.
version: 1.0.0
license: MIT
tags:
- php
- qa
---

# Some longer, skill describing Markdown content

Running tests

composer test

License

This library is licensed under the MIT license. Please see LICENSE.md for more details.

Changelog

Please see CHANGELOG.md for more details.

Contributing

Please see CONTRIBUTING.md for more details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固