skills: publish the index, leave the body on disk
the inverse of an affordance, and deliberately so: affordance body always compiled in, description never sent skill description always compiled in, body read on demand an affordance is a fact about the surface — short, and every conversation needs it. a skill is reference material that is dead weight in a conversation about something else. so what reaches the prompt is the index: name, when to reach for it, and the path. measured on the first one: 608 characters in the prompt against 6,070 bytes left on disk. no protocol. progressive disclosure is normally a harness feature — claude code discovers .claude/skills, opencode has its own conventions, the next one will have a third — and pointing at a file needs none of that, because every harness worth running can already read a file. the cost is that the agent has to CHOOSE to open it, which is what the description is for and why a vague one makes a skill useless rather than merely verbose. the first skill is the email database, moved out of tools/email-db/TOOL.md where NOTHING has been reading it: the loader parses frontmatter and discards the body, so that schema and its eight queries have never reached any claude code session. written for pi, inert since pi left. it carries two things the schema alone gets wrong, both measured against the real 19,097-message database rather than copied from the old doc: `read` is populated on 93 rows, so the documented unread query returns essentially the whole mailbox; and `labels` is a comma-separated string with real values like `updates,inbox`, so `labels = 'inbox'` misses most of the inbox. plugins can ship skills, published and unpublished on install like affordances and notification catalogues. flat namespace unlike those two — a skill's directory name is the path an agent reads, and `officerdev/gitea/SKILL.md` in a prompt is noise. a skill has no authority to usurp, so nothing needs protecting. wired to claude code. opencode still gets NOTHING — its runner sends no system prompt at all, and session create takes only a directory. that needs its own channel and a guess would be worse than the gap.
This commit is contained in:
@@ -4,6 +4,7 @@ import { createRouter } from '../../create-router';
|
||||
import { ITEM_TYPES, itemsDir, ensureItemDirs, type ItemType } from '../../data-path';
|
||||
import { ensureToolLoader } from '../../ensure-tool-loader';
|
||||
import { AFFORDANCES_DIR, loadAffordances } from '../../affordances/load';
|
||||
import { loadSkills } from '../../skills/load';
|
||||
|
||||
// Re-applies the boot-time item setup so changes under OFFICER_ITEMS_DIR take effect without a
|
||||
// server restart. Item lists are already read fresh from disk on every request; this ensures the
|
||||
@@ -54,6 +55,9 @@ rescanRouter.post('/', async (ctx) => {
|
||||
// rather than "markdown files present" — one with no body is skipped by the loader and should not be
|
||||
// reported as though it were working.
|
||||
const affordances = loadAffordances().length;
|
||||
// Loaded, not file-counted, for the same reason: a SKILL.md with no `description` is skipped by the
|
||||
// loader and would otherwise be reported as working.
|
||||
const skillsOffered = loadSkills().length;
|
||||
|
||||
return ctx.json({ ok: true, counts: { ...counts, affordances } });
|
||||
return ctx.json({ ok: true, counts: { ...counts, affordances, skillsOffered } });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user