Skip to content

Split SKILL.md into a short router with on-demand flows, tidy prompts/ - #209

Merged
titanwings merged 5 commits into
dot-skillfrom
skill/router-and-flows
Oct 13, 2026
Merged

titanwings merged 5 commits into
dot-skillfrom
skill/router-and-flows

Conversation

@titanwings

Copy link
Copy Markdown
Owner

Requested by Tianyi · project thread

Summary

Before: hosts loaded all 782 lines of SKILL.md on every trigger, so an owner's first run read about 700 lines it never used. Colleague prompts sat in the prompts/ root (so prompts/intake.md looked generic), and the two celebrity research prompts were near-copies.

After: SKILL.md is a 41-line router. On first run the owner path reads the router plus a 19-line prompts/flows/owner.md. Every prompt has a folder named after who uses it, and there is one research prompt.

Stacked on #206. It should be retargeted to dot-skill once #206 merges.

Changes

  • Tests first: tests/test_skill_entrypoint_docs.py no longer pins ~35 phrases to SKILL.md. It now checks the contract: the frontmatter name and invocations, that every bundled path the instructions mention exists, that every prompt is loaded by something, that the router stays under 80 lines and reaches every flow, and that the documented research floors are metrics merge_research.py actually reports. The other tests in that file are unchanged.
  • Router + flows: SKILL.md keeps the skill-root contract, a request→flow table and the rules every flow shares (storage, writes through skill_writer.py, credentials). Flows live in prompts/flows/: owner, create, sources, celebrity_research, evolve, manage.
  • No restating prompts: the flows point to the prompts instead of copying them (intake questions, persona builder list, research taste rules). This removes the wrong "4-question celebrity intake" claim; the intake has 5. Import options are now in A-E order, and list/rollback/delete is one {character} template.
  • Folders: prompts/colleague/ holds the colleague intake, analyzer, builder and merger. prompts/shared/ holds the work analyzer, work builder and correction handler. references/ is folded into prompts/celebrity/budget_unfriendly/ (framework.md, template.md) and dropped from package.json / bin/distilly.mjs.
  • One research prompt: prompts/celebrity/research.md holds the shared principles, hierarchy, blacklist, tooling and six dimension briefs once. Where the two copies differed it uses the fuller wording. It ends with a separate output contract per budget, and each keeps its own files, floor and checkpoint.

Motivation

The project goal is a light first-run install for personal agents, and the user asked what in the repo was redundant or inelegant.

Testing

  • python -m unittest discover -s tests -p 'test_*.py' passed (114 tests)
  • python -m compileall tools/ passed
  • Manually tested:
    • Installed with install_distilly.py --host codex and --host openclaw into a temp HOME. Every flow and owner prompt the router names exists in the installed copy, and there is no references/.
    • Ran the owner first run from the installed copy: owner_sources.py discover, then owner_profile.py save, link --dry-run and link for Claude Code and OpenClaw (dry run), then unlink.
    • Created a colleague skill with skill_writer.py. Its meta.json now records prompts/colleague/* and prompts/shared/*.
    • node bin/distilly.mjs --check-package and npm pack --dry-run include prompts/flows/.

Checklist

  • Docs updated if behavior or usage changed (SKILL.md)
  • No secrets, tokens, or personal data committed
  • Tests added/updated for new functionality

Note: skills generated before this change keep the old prompt paths in their meta.json. Nothing reads those paths back, so they still work.

🤖 Generated with Claude Code

https://claude.ai/code/session_017tXoVWiktX2vSUJzrrdBLJ


Generated by Claude Code

@titanwings titanwings self-assigned this Oct 12, 2026
The entrypoint test pinned ~35 phrases to SKILL.md, so any reshaping of
the instructions broke it. It now checks the contract instead: the
frontmatter name and invocations, that every bundled path the
instructions mention exists, that every prompt is loaded by something,
and that the documented research floors are metrics merge_research.py
actually reports.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tXoVWiktX2vSUJzrrdBLJ
The colleague prompts sat in the prompts/ root, so prompts/intake.md read
like a generic intake when it is the colleague one. Colleague prompts now
live in prompts/colleague/ and the three family-agnostic ones in
prompts/shared/. references/ only held the two budget-unfriendly celebrity
files, which move next to the prompts that read them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tXoVWiktX2vSUJzrrdBLJ
Hosts load SKILL.md in full on every trigger, so an owner's first run
read 782 lines to use about 80. SKILL.md is now a 41-line router: the
skill-root contract, which flow to read for each request, and the rules
every flow shares. The flows live in prompts/flows/ (owner, create,
sources, celebrity_research, evolve, manage) and each names the prompts
it needs.

While moving the text, the router and flows stop restating the prompts:
the intake questions, the per-family persona builder list and the
research taste rules now live only in the prompt that owns them. That
also drops the wrong claim that the celebrity intake has four questions
(it has five). Import options are in A-E order, and the list, rollback
and delete commands are one template instead of three copies.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tXoVWiktX2vSUJzrrdBLJ
prompts/celebrity/research.md and budget_unfriendly/research.md shared
the taste principles, source hierarchy, blacklist, tooling and the six
dimension briefs, with small drift between the copies. One prompt now
holds the shared part once (taking the fuller wording of each section)
and ends with a budget-friendly and a budget-unfriendly output contract,
each keeping its own files, quality floor and checkpoint.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tXoVWiktX2vSUJzrrdBLJ
- Point each celebrity research profile at its own output contract in the
  merged research prompt, so the budget-friendly pass does not also follow
  the six-file contract.
- Evolve reads prompts/{character}/merger.md directly instead of loading
  the whole create flow for its matrix.
- Drop a duplicated sentence and a doubled persona-builder line in the
  create flow, restore the Whisper backend list and the 'long copied
  dialogue' copyright rule, and keep the Grok Bot caveat self-contained
  (INSTALL_EN.md has no Grok Bot section).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tXoVWiktX2vSUJzrrdBLJ
@titanwings
titanwings force-pushed the skill/router-and-flows branch from abaa22e to 1c59330 Compare October 12, 2026 08:56
@titanwings
titanwings changed the base branch from cleanup/unused-files-and-installers to dot-skill October 12, 2026 08:56
@titanwings
titanwings marked this pull request as ready for review October 12, 2026 08:56
@titanwings
titanwings merged commit 2caf58e into dot-skill Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants