npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@4meta5/skill-loader

v0.5.3

Published

Parse and load SKILL.md files for Claude Code skills

Readme

@4meta5/skill-loader

Parse and load SKILL.md files for Claude Code skills.

Installation

npm install @4meta5/skill-loader

Usage

Load a skill from a directory

import { loadSkillFromPath } from '@4meta5/skill-loader';

const skill = await loadSkillFromPath('.claude/skills/tdd');

console.log(skill.metadata.name);        // 'tdd'
console.log(skill.metadata.description); // 'Test-driven development workflow'
console.log(skill.content);              // Skill instructions
console.log(skill.supportingFiles);      // ['references/guide.md']

Load all skills from a directory

import { loadSkillsFromDirectory } from '@4meta5/skill-loader';

// Load all skills, including nested ones
const skills = await loadSkillsFromDirectory('.claude/skills');

for (const skill of skills) {
  console.log(`${skill.metadata.name}: ${skill.metadata.description}`);
}

// Limit search depth
const shallowSkills = await loadSkillsFromDirectory('skills', { maxDepth: 2 });

Parse SKILL.md content directly

import { parseFrontmatter } from '@4meta5/skill-loader';

const content = `---
name: my-skill
description: A helpful skill
category: development
---

# My Skill

Instructions here.
`;

const parsed = parseFrontmatter(content);

console.log(parsed.frontmatter.name);     // 'my-skill'
console.log(parsed.frontmatter.category); // 'development'
console.log(parsed.body);                 // '# My Skill\n\nInstructions here.'

Format skill metadata to SKILL.md

import { formatSkillMd } from '@4meta5/skill-loader';

const content = formatSkillMd(
  {
    name: 'my-skill',
    description: 'A helpful skill',
    category: 'development',
    'user-invocable': true
  },
  '# Instructions\n\nDo the thing.'
);

// Returns formatted SKILL.md content

Check if a directory is a skill

import { isSkillDirectory } from '@4meta5/skill-loader';

if (await isSkillDirectory('./my-skill')) {
  console.log('Valid skill directory');
}

SKILL.md Format

A valid SKILL.md file has YAML frontmatter followed by markdown content:

---
name: skill-name
description: Brief description of what the skill does
category: testing
user-invocable: true
disable-model-invocation: false
allowed-tools: Read, Write, Bash
context: inline
agent: my-agent
---

# Skill Name

Skill instructions and content here.

Required Fields

  • name: Unique identifier (kebab-case)
  • description: Brief description

Optional Fields

  • category: One of meta, audit, principles, habits, hot
  • user-invocable: Whether skill can be invoked via /skill-name
  • disable-model-invocation: Prevent automatic loading
  • allowed-tools: Comma-separated list of allowed tools
  • context: fork or inline
  • agent: Specific agent to use

Types

interface Skill {
  metadata: SkillMetadata;
  content: string;
  path: string;
  supportingFiles?: string[];
}

interface SkillMetadata {
  name: string;
  description: string;
  category?: SkillCategory;
  'disable-model-invocation'?: boolean;
  'user-invocable'?: boolean;
  'allowed-tools'?: string;
  context?: 'fork' | 'inline';
  agent?: string;
}

type SkillCategory =
  | 'meta'
  | 'audit'
  | 'principles'
  | 'habits'
  | 'hot';

License

MIT