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

@stylusnexus/skill-loop

v0.3.2

Published

Core engine for self-improving AI coding tool skills

Readme

@stylusnexus/skill-loop

Core engine for self-improving AI coding tool skills.

Skills are static prompt files. Codebases are not. skill-loop closes the feedback loop so skills improve automatically when they degrade.

SKILL --> RUN --> OBSERVE --> INSPECT --> FIX
  ^                                       |
  +---------------------------------------+

Which package do I need?

There are two skill-loop packages. You probably want the other one.

| Package | What it is | Who it's for | |---------|-----------|-------------| | @stylusnexus/skill-loop-cli | CLI + MCP server | Most users. Install this to use skill-loop from the terminal or connect it to Claude Code, Cursor, Windsurf, or any MCP-compatible tool. | | @stylusnexus/skill-loop (this package) | Core library | Developers building custom integrations, plugins, or programmatic workflows on top of skill-loop. |

If you're not sure, install @stylusnexus/skill-loop-cli -- it includes this package as a dependency, so you get everything.

Install

npm install @stylusnexus/skill-loop

Usage

import {
  RegistryManager,
  TelemetryWriter,
  Inspector,
  Amender,
  Evaluator,
  DetectionPipeline,
  loadConfig,
  logSkillRun,
} from '@stylusnexus/skill-loop';

// Log a skill run from any platform
await logSkillRun({
  skillName: 'my-skill',
  platform: 'codex',  // 'claude' | 'codex' | 'copilot' | 'cli'
  outcome: 'success',
  taskContext: 'refactor auth module',
});

// Or use the full pipeline programmatically
const config = await loadConfig(projectRoot);
const registry = new RegistryManager(projectRoot, telemetryDir, config);
await registry.scan();

const inspector = new Inspector(telemetryDir);
const result = await inspector.inspect();
// result.flagged contains skills with problems

What it includes

  • Parser -- Reads SKILL.md frontmatter, extracts referenced files and tools
  • Registry -- Scans skill paths, assigns stable UUIDs, detects broken references
  • Detection -- Auto-detects skill usage via tiered confidence scoring
  • Telemetry -- Append-only run logging to local JSONL files
  • Inspector -- Finds failure patterns, staleness, content drift, dead skills
  • Amender -- Proposes targeted SKILL.md patches on isolated git branches
  • Evaluator -- Tests amendments against baseline data before merging
  • Adapters -- Pre/post hook handlers for Claude Code, plus logSkillRun() for any platform

Platform adapters

Claude Code hooks

import { preHook, postHook } from '@stylusnexus/skill-loop';

These are used by the skill-loop-claude binary (included in this package) to feed Claude Code's PreToolUse/PostToolUse hook events into the detection pipeline.

Any platform

import { logSkillRun } from '@stylusnexus/skill-loop';

await logSkillRun({
  skillName: 'my-skill',
  platform: 'copilot',
  outcome: 'failure',
  errorDetail: 'Referenced file not found',
});

Security

  • All data is local-only in .skill-telemetry/ (gitignored)
  • Zero runtime dependencies
  • No network calls, no telemetry, no analytics
  • Git operations are always local -- never pushes, never force-pushes
  • Amendments are created on isolated branches, never on your working branch

Troubleshooting

Import errors after updating

Clear your build cache and rebuild:

npm run clean && npm run build

logSkillRun returns null

The skill name wasn't found in the registry. Run skill-loop init first to scan and register skills, then verify the name matches exactly.

Registry not finding all skills

The registry scans both project-local and global paths. Pass globalSkillPaths to scan():

const config = await loadConfig(projectRoot);
const registry = new RegistryManager(projectRoot, telemetryDir);
await registry.scan(config.skillPaths, config.globalSkillPaths);

Full documentation

See the GitHub repository for complete documentation, configuration options, and CLI reference.

License

MIT