moai-adk: Skill for Claude Code

.claude/skills/hns-lsel-curator/SKILL.md

hns-lsel-curator is a skill for Claude Code from modu-ai/moai-adk. It costs 135 tokens per session (5,610 once invoked), scanned A, original, Apache-2.0.

A local self-evolution curator that drains and groups tool-failure records from a JSON Lines inbox. JSON Lines is a text format with one JSON record per line; the process prepares recurring lessons but does not approve or apply changes.

In plain words
What is it for?
Reading the lessons inbox, filtering low-value failures, clustering similar events, and staging candidate improvement proposals or shadow self-critiques.
Why use it?
It turns scattered failure reports into grouped candidates for review and filters out known Bash-timeout and sandbox noise. This makes recurring problems easier to examine without changing project memory or code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is modu-ai/moai-adk's own configuration. It tells Claude Code how to work on moai-adk itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything moai-adk configures →

About the project

MoAI-ADK is a Go-based harness that organizes and verifies Claude Code work across planning, implementation, synchronization, and review stages. Developers use it to structure agentic coding tasks, apply quality gates, and route work across language models, while the catalogue entries extend its workflow with skills, hooks, commands, MCP servers, instructions, and settings.

modu-ai/moai-adk · 1,207 stars · on GitHub · adk.mo.ai.kr

Reuse

Borrowing it

Nothing to install: this file belongs to modu-ai/moai-adk. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/modu-ai/moai-adk/main/.claude/skills/hns-lsel-curator/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/modu-ai/moai-adk

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hns-lsel-curator

README.md
[![agentmods](https://agentmods.dev/badge/skills/modu-ai/moai-adk/hns-lsel-curator/github.svg)](https://agentmods.dev/skills/modu-ai/moai-adk/hns-lsel-curator)
Your own site
<a href="https://agentmods.dev/skills/modu-ai/moai-adk/hns-lsel-curator"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-adk/hns-lsel-curator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hns-lsel-curator

Your own site · 80×15
<a href="https://agentmods.dev/skills/modu-ai/moai-adk/hns-lsel-curator"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-adk/hns-lsel-curator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 135 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,610 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 205
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00135 $0.05610
Opus 5 $0.00068 $0.02805
Sonnet 5 $0.00027 $0.01122
Haiku 4.5 $0.00014 $0.00561

Measured 12d ago against content hash a2d1abd6ed9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

hns-lsel-curator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 11 executable files (backlog_check_test.sh, backlog_check.sh, csa_refusal_test.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/hns-lsel-curator/SKILL.md · 402 lines

How it starts

The opening of the file, as written. The whole thing — 402 lines — stays where its author put it; the contents beside it link to each section on GitHub.

hns-lsel-curator — LSEL CLUSTER + drain engine

Namespace: hns-lsel-* is user-owned dogfood (CLAUDE.local.md §24). This skill is NOT mirrored into internal/template/templates/ — it lives only in this repo. Graduation to moai-lsel-* + 16-language distribution is a separate SPEC (out of scope per spec.md §G).

M1 scope: drain + cluster + stage candidates. NO APPROVE, NO APPLY (M3). M2 scope: drain + cluster + PROPOSE shadow (no APPROVE, no APPLY). The PROPOSE stage emits shadow proposals + self-critiques; APPROVE/APPLY land in M3 via the fresh hns-lsel-applier path. M2 does NOT write to memory/ — the first feedback_*.md topic file is an M3+ deliverable after APPROVE.

What this skill does

The MoAI-ADK repo accumulates tool-failure stubs in .moai/lessons-inbox.jsonl (624 stubs at M1 start, re-measured — a moving target). The constitution names the orchestrator as the drain actor, but until this skill there was zero mechanical drain code — the drain existed only as a doctrine paragraph (moai-constitution.md:147). This skill closes that gap in user-owned surfaces, without touching the frozen Go applier (internal/harness/applier.go:22 — its write-flag stays false; REQ-LSEL-003: bypass, never unfreeze).

The drain is split into a mechanical core (drain.sh, deterministic, testable) and a model-mediated layer (this SKILL.md + your judgment, invoked for M2+ importance refinement and proposal drafting).

The mechanical core — drain.sh

drain.sh is a portable bash + jq script that lives next to this SKILL.md. It performs the deterministic half of the drain:

drain.sh --inbox <path-to-lessons-inbox.jsonl> --state-dir <path-to-lsel-state>

Pipeline (REQ-LSEL-009 + AC-LSEL-009 / AC-LSEL-010):

  1. Companion offset — read <state-dir>/drain-offset.json (seed {"offset":0} if absent). The inbox is append-only and is NEVER mutated; the offset marks consumed stubs (SPEC-HARNESS-RATCHET-REWIRE-001 D3 companion-offset pattern).
  2. Slice — read stubs from the offset onwards (tail -n +<offset+1>).
  3. Drain-side severity filter (AC-LSEL-010) — discard noise BEFORE clustering:
    • tool_failure:Bash:UnknownFailure — the opaque ~65% timeout/sandbox bucket (the dominant noise share; report §2).
    • tool_failure:Bash:SandboxViolation — environment constraint, not a code defect.
    • any *:TimeoutError (Bash + MCP timeouts). The filter is drain-side because internal/hook/failure_observer.go (the inbox writer) is OUTSIDE the six loop-writable surfaces (plan.md §F.1 [DECISION RESOLVED]), so the loop cannot edit the writer — it filters on read instead.
  4. Cluster by event_key with frequency count, first/last seen, and up to 3 sample summaries.
  5. Singleton gate — discard clusters with frequency < 2 (single-occurrence noise per the constitution Lessons Protocol drain paragraph).
  6. Importance — score each survivor with a Generative-Agents-style 1-10 gate: importance = min(10, frequency) (frequency as proxy; the model augments this in M2+ with a severity hint and retrieval-weighted judgment).
  7. Emit candidates to <state-dir>/clusters.json; advance the companion offset.

Read the full file on GitHub · 402 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 402 lines · 135 tokens per session scan A a2d1abd6ed9e

Subscribe to this mod's changes

hns-lsel-curator is a skill published in the GitHub repository modu-ai/moai-adk (1,207 stars, last pushed today), licensed Apache-2.0. It adds 135 tokens to every session and 5,610 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories