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

@soukadao/agent-skill-importer

v0.0.2

Published

[Agent Skills](https://agentskills.io/specification) を読み込むライブラリ。

Downloads

209

Readme

@soukadao/agent-skill-importer

Agent Skills を読み込むライブラリ。

Install

npm install @soukadao/agent-skill-importer

Usage

Load skills

loadSkills にスコープ付きパスの配列を渡すと、各 <path>/skills/ 配下を走査し、SKILL.md を解析して結果を返します。

先に読み込まれたスキルが優先されます(先勝ち)。同名スキルはプロジェクトレベルが優先されるべきなので、プロジェクトのパスをユーザーより前に配置してください。

import { loadSkills } from "@soukadao/agent-skill-importer";

const { skills, collisions } = await loadSkills([
  { path: "/path/to/project", scope: "project" },
  { path: "/home/user", scope: "user" },
]);

同名スキルが複数スコープに存在する場合、先に読み込まれたものが採用され、衝突情報が collisions に記録されます。

for (const c of collisions) {
  console.warn(
    `Skill "${c.name}" (${c.kept.scope}) shadowed (${c.shadowed.scope})`,
  );
}

Catalog

読み込んだスキルの namedescriptionlocation を返します。format 引数で出力形式を切り替えられます(デフォルト: "json")。

import { loadSkills, catalog } from "@soukadao/agent-skill-importer";

const { skills } = await loadSkills([
  { path: "/path/to/project", scope: "project" },
]);

// JSON (default)
const entries = catalog(skills);
// [{ name: "pdf-processing", description: "Extract PDF text...", location: "/path/to/project/skills/pdf-processing/SKILL.md" }, ...]

// XML
const xml = catalog(skills, "xml");
// <available_skills>
//   <skill>
//     <name>pdf-processing</name>
//     <description>Extract PDF text...</description>
//     <location>/path/to/project/skills/pdf-processing/SKILL.md</location>
//   </skill>
// </available_skills>

Activate

スキル名を指定して、SKILL.md の内容とリソースファイル一覧を取得します。

import { loadSkills, activate } from "@soukadao/agent-skill-importer";

const { skills } = await loadSkills([
  { path: "/path/to/project", scope: "project" },
]);
const detail = await activate(skills, "pdf-processing");
// {
//   name: "pdf-processing",
//   description: "Extract PDF text, fill forms, merge files.",
//   license: "Apache-2.0",
//   compatibility: "Requires poppler-utils",
//   metadata: { author: "example-org", version: "1.0" },
//   allowedTools: ["Bash(git:*)", "Read", "Write"],
//   scope: "project",
//   content: "# PDF Processing\n...",
//   resources: ["scripts/extract.py", "references/guide.md"]
// }

resources にはスキルディレクトリ内の全ファイル(SKILL.md を除く)が相対パスで含まれます。

Types

interface SkillPath {
  path: string;
  scope: string;
}

interface Skill {
  name: string;
  description: string;
  license: string | null;
  compatibility: string | null;
  metadata: Record<string, string>;
  allowedTools: string[];
  content: string;
  location: string;
  baseDir: string;
  scope: string;
}

type SkillCatalogEntry = Pick<Skill, "name" | "description" | "location">;

type SkillDetail = Omit<Skill, "location" | "baseDir"> & {
  resources: string[];
};

type CatalogFormat = "json" | "xml";

interface SkillCollision {
  name: string;
  kept: { location: string; scope: string };
  shadowed: { location: string; scope: string };
}

interface LoadResult {
  skills: Skill[];
  collisions: SkillCollision[];
}

Expected directory structure

<path>/skills/
├── pdf-processing/
│   ├── SKILL.md
│   ├── scripts/
│   │   └── extract.py
│   └── references/
│       └── guide.md
└── code-review/
    └── SKILL.md

License

MIT