🥋

Sensei

Stop skill collisions.
Ship better agents.

Iteratively improve skill frontmatter compliance using the Ralph loop pattern.

npx skills add spboyer/sensei

Skills Without Frontmatter Break Things

Poor frontmatter leads to skill collision — agents invoking the wrong skill for a given prompt.

No triggers

Agent doesn't know when to activate the skill.

No anti-triggers

Agent doesn't know when NOT to use the skill.

Brief descriptions

Not enough context for accurate matching.

Token bloat

Oversized skills waste context window.


The Ralph Loop

Six steps, repeated until your skill reaches Medium-High compliance.

01

Read

Load skill state and count tokens

02

Score

Evaluate frontmatter compliance

03

Improve

Add triggers and anti-triggers

04

Verify

Run tests to confirm changes

05

Check

Analyze token usage and budget

06

Summary

Display before/after results


Before & After

From vague to precise — a single pass through the Ralph loop.

Before Low
---
name: pdf-processor
description: 'Process PDF files for various tasks'
---
After Medium-High
---
name: pdf-processor
description: |
  Process PDF files including text extraction,
  rotation, and merging.
  USE FOR: "extract PDF text", "rotate PDF",
  "merge PDFs", "split PDF", "PDF to text",
  "combine PDF files".
  DO NOT USE FOR: creating new PDFs
  (use document-creator), extracting images
  (use image-extractor), or OCR on scanned
  documents (use ocr-processor).
---

Scoring Levels

Sensei targets Medium-High — the sweet spot between completeness and token efficiency.

01

Low

No triggers, short description

02

Medium

Has triggers, missing anti-triggers

03

Medium-High

Triggers + anti-triggers present

← Target
04

High

Full routing clarity with INVOKES


Quick Start

One command to install. Three ways to run.

npx skills add spboyer/sensei
Run sensei on my-skill-name Improve a single skill
Run sensei on my-skill-name --fast Skip tests for faster iteration
Run sensei on all skills Batch-improve every skill in your project