Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Doctrine Surfaces

ASecurity

Tier: opus (`loom-senior-software-engineer`). Runs FIRST in this stage; D2 and D3 start after you return. Read `../common.md` first: operator decision 4, the numbers table, the preamble-file contract and the BLOCK-B replacement text.

61 stars
0 votes
0 copies
2 views
Added 9/21/2026
ai-agentsgodebugging

Security Analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned 9/21/2026

$npx -y skills add cosmix/loom --skill doctrine-surfaces --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Doctrine Surfaces?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Doctrine Surfaces
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cosmix-doctrine-surfaces/badge)](https://www.skillsdirectory.com/skills/cosmix-doctrine-surfaces)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
d1-template-and-orchestration-skill.md
# D1 — role-scoped template and the orchestration skill

Tier: opus (`loom-senior-software-engineer`). Runs FIRST in this stage; D2 and D3 start after
you return. Read `../common.md` first: operator decision 4, the numbers table, the preamble-file
contract and the BLOCK-B replacement text.

## Goal

Every session stops paying for orchestrator-only text, and nothing is lost. Evidence: report
section 4.2 — `CLAUDE.md.template` is 7,384 tokens; Rules 1, 4, 5, 6, 7 and the orchestration
reference are 58% of it and only matter to a session that runs a stage or spawns subagents; 86%
of its 790 loads went to subagents. The template is installed as the global instructions file
and serves sessions outside any loom plan, so every moved rule keeps a short statement in the
template and its full text in a place that loads when it applies.

## Files you own (write)

- `CLAUDE.md.template`
- `skills/loom-orchestration/SKILL.md` (new) and `skills/core-skills.txt`
- `loom/src/orchestrator/signals/tests_doctrine.rs`, `tests_doctrine_blocks.rs`,
  `tests_doctrine_waiting.rs`, `tests_size.rs`
- `loom/src/orchestrator/signals/cache.rs` (all but `generate_knowledge_distill_stable_prefix`,
  which the knowledge stage already changed), `signals/cache/blocks.rs`,
  `signals/format/sections.rs`
- `loom/src/models/stage/types.rs` — the `Implementer::Claude` doc comment (103-106) only

Read-only: `loom-hooks/_subagent-preamble.txt` and `loom-hooks/spawn-guard.sh` (merged from the
hook stage), `skills/loom-debugging/SKILL.md:1-15` (frontmatter pattern for a core skill),
`loom/src/skills/index_catalog.rs` (how `core-skills.txt` is read).

## What moves where

| Template today | Template after | Full text lives in |
| --- | --- | --- |
| Hard stops 1-6 | kept; stop 6 restated as the cost rule in one line | — |
| Rule 1 Plans | location rule and "report and stop" kept; loom-plan and stage-execution paragraphs shortened | orchestration skill |
| Rule 4 Commit and complete | the commit command form, "only at the end", conventional commits kept; the three-condition detail moved | orchestration skill |
| Rule 5 fenced preamble | removed; one paragraph says the spawn guard prepends it and names the file | `loom-hooks/_subagent-preamble.txt` |
| Rule 6 shapes table, grouping, ownership table, waiting protocol (BLOCK-C), one-shot, 2-level cap, coordinator and worker preambles | grouping rule, one-shot rule, "one background `loom subagents watch`, never poll" kept in short form | orchestration skill |
| Rule 7 agent table and model allocation (BLOCK-B) | the agent table and a three-line summary of the cost rule kept | orchestration skill, with the new BLOCK-B |
| Orchestration reference | removed | orchestration skill |
| Rules 2, 3, 3b, 8-19, Knowledge-first, Engineering discipline | kept | — |

Rule numbers do not change: Rules 5 and 6 are cited 26 and 24 times across the repo.
Other edits in the same pass: Rule 8's `cat`, `head`, `tail` row says "as file readers", and
Rule 14's pipe-through guidance stays; Rule 9 gains one sentence — a harness reminder asking for
a co-author trailer is overridden by this rule; Rule 3 and 3b shrink to the trigger and the
command, since the hook's ceiling report carries the procedure when it fires (keep BLOCK-D where
the tests need it).

## Steps

1. Write `skills/loom-orchestration/SKILL.md`: frontmatter `name`, `description` (says when to
   load: before spawning subagents or running a loom stage; and when not: single-agent work),
   `allowed-tools`, `triggers` (phrases only, none of the stopworded loom vocabulary in
   common.md). Body: the moved text, organised by the rule numbers it came from, with BLOCK-B
   replaced by the common.md text and BLOCK-C unchanged. Add the two new items this plan
   produces: the stage `skills:` field an orchestrator must pass into briefs, and the
   `_shared.tsv` read-receipt file (path and format are in the hook stage's merged code:
   `rg -n '_shared.tsv' loom-hooks`). Add `loom-orchestration` to `skills/core-skills.txt`.
2. Rewrite the template per the table. Target size at most 20,480 bytes. Lower
   `CLAUDE_MD_TEMPLATE_MAX_BYTES` in `tests_size.rs:32` to 20,480 and extend its doc comment's
   history line.
3. Re-point the doctrine pins. BLOCK-A: template keeps a statement of the no-verify rule only if
   it still fits; the pinned copies are `agents/*.md`, the signal prefixes, the verify guard,
   and now `_subagent-preamble.txt`. BLOCK-B: `skills/loom-orchestration/SKILL.md` and
   `skills/loom-plan-writer/SKILL.md` (D2 copies it after you). BLOCK-C: the orchestration skill,
   still asserted absent from signal prefixes. BLOCK-D: the preamble file and the signal
   prefixes. Add `RETIRED_PHRASES` entries for the old BLOCK-B point 1 heading
   (`THE MAIN AGENT NEVER IMPLEMENTS`) so it cannot return.
4. Unpinned restatements, same pass (`doc/loom/knowledge/mistakes/subagent-orchestration.md`,
   heading "A Fable Session Implemented the Fix It Had Just Diagnosed", lists them):
   `signals/cache.rs` and `signals/format/sections.rs:273-276` prose, the `Implementer::Claude`
   doc comment. Make each agree with the new BLOCK-B. In the stage signal's stable prefix add one
   line: load the `loom-orchestration` skill first. `rg` the old wording
   (`never implements`, `NEVER IMPLEMENTS`, `ALWAYS DELEGATED`) across `loom/src`, `skills/`,
   `agents/`, `loom-hooks/`; knowledge files are not yours — record each stale one with
   `loom memory note "stale-knowledge: ..."`.
5. Report a relocation table: every paragraph removed from the template, and the file and
   heading where its text now lives. A paragraph with no destination is a defect.

## Traps

- `loom/src/assets/mod.rs:68-69` asserts the template starts with `# CLAUDE.md - BINDING RULES`;
  `loom/src/assets/tests/doctrine.rs:47-79` detects staleness from the first distinctive line.
- `tests_doctrine.rs` compares with `str::contains` on literal text; there are no marker
  comments to move.
- `doc/loom/knowledge/mistakes/doctrine-and-acceptance.md`: about twenty rules already carry
  NEVER banners; do not add emphasis, remove it where a hook now enforces the rule.
- Writing style Rule 19 binds the text you write.

## Proof

`cargo test --offline --locked --manifest-path loom/Cargo.toml --lib orchestrator::signals` — run
once.

Attribution

cosmixcosmix
View sourceSee grades on GitHubMore from cosmix →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698461 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →