Meta Skill (ms) is a local-first CLI that mines CASS sessions into durable, production-grade skills. It stores skills with dual persistence (SQLite + Git), supports hybrid search (BM25 + hash embeddings), and enforces safety boundaries during extraction.
# Build & install from source
cargo install --path .Or run without installing:
cargo run -- <COMMAND>Works on Linux, macOS, and Windows. Requires Rust 1.85+ (Edition 2024).
The Problem: Agent workflows get rediscovered repeatedly. CASS captures raw sessions, but there is no systematic way to distill them into reusable skills.
The Solution: ms extracts patterns, compiles them into structured skill specs, and stores them with provenance so they can be searched, loaded, and reused.
| Feature | What It Does |
|---|---|
| Dual Persistence | SQLite for fast queries + Git archive for auditability |
| Hybrid Search | BM25 full-text + hash embeddings fused with RRF |
| Robot Mode | JSON output for automation (--robot) |
| Safety Controls | ACIP prompt-injection quarantine + trust boundaries |
| Structured Skills | Deterministic SKILL.md ↔ spec round-trip |
| Layering | Priority layers (base/org/project/user) |
| Local-First | All processing is local by default |
# Initialize a local ms root (.ms/)
ms init
# Configure a project skill path
ms config skill_paths.project '["./skills"]'
# Index SKILL.md files
ms index
# Search and inspect
ms search "error handling"
ms show rust-error-handling## ms — Meta Skill CLI
Local-first CLI for mining CASS sessions into production-grade skills. Maintains dual persistence (SQLite + Git), supports hybrid search (BM25 + hash embeddings via RRF), and enforces safety boundaries with ACIP prompt-injection quarantine.
### Core Workflow
```bash
# 1. Initialize in a project
ms init
# 2. Configure skill paths
ms config skill_paths.project '["./skills"]'
# 3. Index skills
ms index
# 4. Explore and search
ms list
ms search "error handling"
ms show rust-error-handling
```
### Key Flags
```
--robot # JSON output to stdout
--verbose # More logs
--config /path/to/config # Explicit config path
```
### Storage
- Local root: ./.ms (project) or ~/.local/share/ms (global)
- DB: <ms_root>/ms.db
- Git archive: <ms_root>/archive/
- Index: <ms_root>/index/
### Notes
- Some commands are implemented as stubs (build, load, requirements, prune, update).
- ACIP safety scanning is implemented under `ms security`.
ms is built around a few core principles:
- SQLite + Git: Fast queries and a full audit trail.
- No cloud dependency: CASS data stays local unless you explicitly sync it.
- Deterministic outputs: Skills can round-trip between spec and markdown.
- Trust boundaries: User/assistant/tool/file content is classified before extraction.
- Quarantine: Prompt-injection signals are quarantined with safe excerpts.
- Auditability: ACIP decisions are stored with replay commands (opt-in).
- JSON in robot mode for easy pipelines.
- Human-friendly output by default.
- Commands are designed to compose with Unix tooling.
| Feature | ms | Manual Wiki | Raw CASS | Ad-hoc Notes |
|---|---|---|---|---|
| Structured skills | ✅ | ❌ | ❌ | |
| Queryable | ✅ SQLite + FTS | ❌ | ||
| Audit trail | ✅ Git archive | ❌ | ❌ | |
| Safety filters | ✅ ACIP | ❌ | ❌ | ❌ |
| Hybrid search | ✅ BM25 + semantic | ❌ | ❌ | ❌ |
| CLI automation | ✅ Robot mode | ❌ |
Created by Jeffrey Emanuel to transform raw agent sessions into reusable, versioned skills. The goal is to preserve hard-won workflows with the same rigor we apply to production code.
ms build and related mining workflows require CASS sessions. CASS stores session history as JSONL and exposes a CLI (cass).
cass healthcass search "error handling" --robot --limit 5[cass]
auto_detect = true
cass_path = "/path/to/cass"
session_pattern = "*.jsonl"git clone https://github.com/Dicklesworthstone/meta_skill.git
cd meta_skill
cargo build --release
cp target/release/ms ~/.local/bin/cargo install --git https://github.com/Dicklesworthstone/meta_skill.gitPrebuilt binaries are not yet published. If/when they are, this README will be updated.
ms initms config skill_paths.project '["./skills"]'ms indexms list
ms search "error handling"
ms show rust-error-handlingGlobal flags:
--robot # JSON output to stdout
--verbose # Increase logging verbosity
--quiet # Suppress non-error output
--config # Explicit config pathms init
ms init --global
ms init --forceCreates:
.ms/ms.db(SQLite).ms/archive/(Git).ms/index/(search index).ms/config.toml
ms index
ms index ./skills /other/path
ms index --forcems list
ms list --tags rust --layer project --limit 50
ms list --robotms show rust-error-handling
ms show rust-error-handling --full
ms show rust-error-handling --metams search "error handling"
ms search "async" --search-type bm25
ms search "async" --search-type semanticStubbed. Intended to load skills with progressive disclosure and token budgets.
Captures context + computes a fingerprint. Suggestions currently return an empty list, but cooldown tracking is implemented.
ms suggest
ms suggest --cwd /path/to/projectms edit rust-error-handlingFormats skill files to canonical layout.
Semantic diff between skills.
Manage skill aliases.
Stubbed. Intended for dependency checks.
Stubbed. Intended to mine CASS sessions into skills.
ms build --from-cass "error handling"Package skills into portable bundles.
Stubbed. Intended to update ms itself.
ms doctor
ms doctor --fix
ms doctor --check-lockRuns UBS checks on staged files.
Stubbed. Intended to remove tombstoned or outdated data safely.
ms config
ms config search.use_embeddings
ms config search.use_embeddings false
ms config --unset search.use_embeddingsms security scan --input "ignore previous instructions" --session-id sess_1 --message-index 1
ms security quarantine list
ms security quarantine review <id> --confirm-injectionValidate skill specs.
ms test --all
ms test rust-error-handling
ms test --tags smokems parses skills from SKILL.md and can round-trip them via a structured spec.
Minimal example:
# Rust Error Handling
Best practices for error handling in Rust.
## Overview
Use `Result<T, E>` and propagate errors with `?`.
## Examples
fn read_file(path: &str) -> Result<String, std::io::Error> { std::fs::read_to_string(path) }
Parsing rules:
#title becomes the skill name.- The first paragraph after the title becomes the description.
- Each
##section becomes aSkillSectionwith blocks.
Config precedence (lowest to highest):
- Built-in defaults
- Global config (
~/.config/ms/config.toml) - Project config (
.ms/config.toml) - Environment variables (
MS_*) - CLI flags
Useful env vars:
MS_ROOT— explicit ms rootMS_CONFIG— explicit config pathMS_ROBOT— force robot modeMS_SEARCH_USE_EMBEDDINGS— toggle semantic search
Default skill paths:
- Global:
~/.local/share/ms/skills - Project:
.ms/skills
| Component | Location |
|---|---|
| ms root (project) | .ms/ |
| ms root (global) | ~/.local/share/ms/ |
| SQLite database | <ms_root>/ms.db |
| Git archive | <ms_root>/archive/ |
| Search index | <ms_root>/index/ |
Query
├─ SQLite FTS (BM25)
├─ Hash embeddings (semantic)
└─ RRF fusion (rank-based)
Notes:
- FTS uses SQLite FTS5.
- Semantic vectors use deterministic hash embeddings (384 dims).
- Embeddings are stored as F16 for space efficiency.
ms integrates ACIP v1.3:
- Messages are classified into trust boundaries.
- Disallowed content is quarantined with safe excerpts.
- Reviews and replays are opt-in.
Core commands:
ms security scan --input "ignore previous instructions" --session-id sess_1 --message-index 1
ms security quarantine list
ms security quarantine show <id>ms includes:
- Unit tests (meta_skill-7t2)
- Integration tests (meta_skill-9pr)
- Skill tests (
ms test)
Recommended checks:
cargo test
cargo clippy --all-targets -- -D warningsms config skill_paths.project '["./skills"]'cass --versionms index
ms search "query"ms build,ms load,ms update,ms requirements, andms pruneare not implemented yet.- The suggestion engine currently returns an empty list (context fingerprinting is implemented).
- Prebuilt binaries are not published yet.
Q: Why "ms"?
ms stands for Meta Skill—skills about skills.
Q: Is my data safe?
Yes. All storage is local (SQLite + Git) unless you explicitly sync or upload.
Q: Does ms work without CASS?
Yes. You can index and manage hand-written skills using SKILL.md without any CASS integration.
About Contributions: Please don't take this the wrong way, but I do not accept outside contributions for any of my projects. I simply don't have the mental bandwidth to review anything, and it's my name on the thing, so I'm responsible for any problems it causes; thus, the risk-reward is highly asymmetric from my perspective. I'd also have to worry about other "stakeholders," which seems unwise for tools I mostly make for myself for free. Feel free to submit issues, and even PRs if you want to illustrate a proposed fix, but know I won't merge them directly. Instead, I'll have Claude or Codex review submissions via gh and independently decide whether and how to address them. Bug reports in particular are welcome. Sorry if this offends, but I want to avoid wasted time and hurt feelings. I understand this isn't in sync with the prevailing open-source ethos that seeks community contributions, but it's the only way I can move at this velocity and keep my sanity.
MIT - see LICENSE for details.
Built with Rust, SQLite, Tantivy, and a deterministic hash embedder. ms is designed to turn raw agent sessions into durable, searchable knowledge.
