Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Skill Md Laravel Package

stolt/skill-md

View on GitHub
Deep Wiki
Context7

skill-md

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky