From writing
Structure memos, recommendations, briefings, and decision documents with the Pyramid Principle.
npx claudepluginhub pgoell/pgoell-claude-tools --plugin writingThis skill uses the workspace's default tool permissions.
Multi-phase pyramid-principle skill with a parallel audit panel. Modeled on Barbara Minto's method.
Creates new Angular apps using Angular CLI with flags for routing, SSR, SCSS, prefixes, and AI config. Follows best practices for modern TypeScript/Angular development. Use when starting Angular projects.
Executes ctx7 CLI to fetch up-to-date library documentation, manage AI coding skills (install/search/generate/remove/suggest), and configure Context7 MCP. Useful for current API refs, skill handling, or agent setup.
Share bugs, ideas, or general feedback.
Multi-phase pyramid-principle skill with a parallel audit panel. Modeled on Barbara Minto's method.
Use the host platform's equivalent tools without changing the workflow:
| Capability | Claude Code | Codex |
|---|---|---|
| Subagent dispatch | Agent tool | spawn_agent only when available and permitted. Otherwise run the phase inline. |
| Progress list | TaskCreate, TaskUpdate | update_plan |
| User questions | AskUserQuestion | Ask a concise direct question, or use the host structured question tool when available |
| File reads | Read | shell reads such as sed, rg, or equivalent file read tools |
| File writes and edits | Write, Edit | apply_patch or equivalent file edit tools |
| Shell | Bash | shell command tool |
Where this skill says "Agent tool", "TaskCreate", "TaskUpdate", "AskUserQuestion", "Read", "Write", "Edit", or "Bash", use the mapped host capability. When a platform cannot dispatch subagents for the current request, keep the same artifact boundaries and run each phase inline in the orchestrator.
State root is platform-specific. Claude Code uses ~/.claude/projects. Codex uses ${CODEX_HOME:-~/.codex}/projects when writable, otherwise create .codex-skill-state/ under the current working directory.
Resolve working directory in this order:
--dir ./path/to/project/intake.md, construction.md, audit-summary.md, opener.md, pyramid.md, treat the cwd as the working directory.<state-root>/<project-id>/pyramid-skill-state.json (where <project-id> is the cwd path with slashes replaced by hyphens, leading hyphen stripped). If an in-flight pyramid is recorded, offer to resume there.pyramid/{slug}-{YYYY-MM-DD}/ in the cwd.Resolution order:
--reference ./path/to/pyramid-reference.mdpyramid-principle-reference.md shipped with this skill. Resolve its absolute path by locating the directory of this SKILL.md file (the skill's own install path) via Glob on **/pyramid/SKILL.md under the active plugin directory, then take the parent.Surface the active reference in the first response: "Using pyramid reference: {path}".
Scan the working directory for existing artifacts:
intake.md exists → intake phase completeconstruction.md exists → construct phase completeaudit-summary.md exists → audit phase completeopener.md exists → opener phase completepyramid.md exists → render phase completeDetermine the latest completed phase. Present to user:
The user can also pre-empt the dialogue by passing --phase X (X ∈ {intake, construct, audit, opener, render}).
Use the progress list to add one task per phase that will run, plus four sub-tasks for the audit panel. Example for a fresh full pipeline:
1. Phase 1: Intake (mode, genre, domain-limits gate, inputs)
2. Phase 2: Construct the pyramid
3. Phase 3: Audit panel
├── Auditor: MECE
├── Auditor: So-What
├── Auditor: Q-A Alignment
└── Auditor: Inductive-Deductive
4. Phase 4: Compose SCQA opener
5. Phase 5: Render pyramid.md
For phase-selectable runs, only the requested phases get tasks.
Mark each task as in_progress when starting and completed when the artifact is verified.
Dispatch each phase agent via the host subagent tool when supported. The orchestrator injects context into the prompt template.
{OUTPUT_PATH} is always the working directory, never a file path. Each prompt file appends its own filename.**Dispatch:** header. The simplest robust approach: read the entire prompt file as text, perform placeholder substitution ({OUTPUT_PATH}, {REFERENCE_PATH}, {REVIEWER_FEEDBACK}, {HANDOFF}, {YYYY-MM-DD}), and pass the full result to the host subagent tool. The dispatched agent ignores the surrounding commentary because the actionable instructions sit inside the visible prompt body.{HANDOFF} default. When dispatching construct-greenfield-prompt.md in fresh-build or re-dispatch (CRITICAL audit) cases, substitute {HANDOFF} with false. Substitute true only when handing off mid-Mode-D dialogue, or when re-dispatching a Mode-D-built pyramid after a CRITICAL audit. The greenfield prompt's ## Handoff mode section keys off this value.{REVIEWER_FEEDBACK} is non-empty (re-dispatch on a failed audit gate, or after a MISMATCH the user asked to revise), append this standing instruction to the dispatched prompt, regardless of what the prompt template itself says: "Reviewer feedback is provided above. Read the existing artifact in the output directory, address the specific concerns, and update the file in place rather than starting fresh."{YYYY-MM-DD} resolves to today's date in ISO format.Orchestrator-only, interactive. No Agent dispatch.
--mode was passed; the flag only pre-selects the option. This prevents "surprise wrong mode" failures.genre_override: true in intake.md so Phase 5 can prepend a caveat to Audit notes.
Run only the input step matching the mode chosen in step 1; skip the others.{OUTPUT_PATH}/draft.md. Either way, the construct agent reads draft.md from the working directory.mode, topic_or_draft_path, audience, reader_question, genre, domain_limits_acknowledged, genre_override.Mode-branched. Modes A and B run as one Agent dispatch. Mode D runs as an orchestrator-only turn loop with no Agent dispatch.
Modes A (Greenfield) and B (Restructure):
construct-greenfield-prompt.md if mode == greenfield, or construct-restructure-prompt.md if mode == restructure.{HANDOFF} set to false, today's date.{OUTPUT_PATH}/construction.md exists. For Mode B (restructure), also verify {OUTPUT_PATH}/restructure-notes.md exists.On re-dispatch (after a CRITICAL audit gate), inject audit-summary.md content as {REVIEWER_FEEDBACK} so the construct agent updates construction.md in place to address the flagged issues rather than rebuilding from scratch.
Mode D (Socratic):
construct-socratic-prompt.md. This file is an orchestrator playbook, NOT an Agent dispatch prompt. The orchestrator owns the loop; no Agent is dispatched in Phase 2 for Mode D.AskUserQuestion plus one inline micro-audit. After each accepted turn, write the partial {OUTPUT_PATH}/construction.md in the standard schema with <pending> placeholders for unanswered nodes; emit a one-line progress summary to the user.AskUserQuestion carries four standard options: Other (type my answer) (the freeform answer field), Hand off remaining tiers to Mode A, Pause and resume later, Cancel.mode to greenfield and add handoff_from: socratic; read construct-greenfield-prompt.md, set {HANDOFF} to true, dispatch the greenfield agent. Phase 2 continues from the agent's output; Phases 3-5 run unchanged on the merged pyramid.mode: socratic, last_completed_phase: intake, last_run_at: <now>. Emit a one-line confirmation and exit./pyramid invocation in this directory: state file with mode: socratic and last_completed_phase: intake triggers an AskUserQuestion: "In-flight Socratic dialogue found. Resume from ?". On yes, read construction.md, count populated nodes vs <pending> placeholders to infer next turn, re-enter the loop.{OUTPUT_PATH}/construction.md exists and contains no <pending> placeholders. Mark task completed.On re-dispatch (after a CRITICAL audit gate from Phase 3), Mode D's pyramid is treated as the user-built ground truth: re-dispatch goes to construct-greenfield-prompt.md with {HANDOFF} set to true and {REVIEWER_FEEDBACK} populated, so the agent updates the construction in place rather than restarting the dialogue.
Four subagent dispatches in parallel when supported. Issue all four host subagent calls in one turn when the platform supports concurrent dispatch.
| Prompt file | Output file | Lens |
|---|---|---|
audits/mece.md | audit-mece.md | Four MECE Audit Questions (reference section 4) |
audits/so-what.md | audit-so-what.md | So-What / Why-Is-That-True / Caveman Answer (reference section 6) |
audits/qa-alignment.md | audit-qa.md | Q-A Alignment Audit (reference section 3) |
audits/inductive-deductive.md | audit-logic.md | Inductive vs Deductive classification (reference section 5) |
For each auditor:
When all four audits return, consolidate into audit-summary.md:
# Audit Summary
## Verdicts
| Auditor | Verdict | Headline |
|---------|---------|----------|
| MECE | <PASS / MINOR / CRITICAL> | <one-line summary> |
| So-What | ... | ... |
| Q-A Alignment | ... | ... |
| Inductive/Deductive | ... | ... |
## MECE
<full content of audit-mece.md>
## So-What
<full content of audit-so-what.md>
## Q-A Alignment
<full content of audit-qa.md>
## Inductive/Deductive
<full content of audit-logic.md>
Then check verdicts. Match on the first whitespace-delimited token of each auditor's **Verdict:** line. Auditors emit PASS, MINOR ISSUES, or CRITICAL ISSUES; only the first token is the gate signal. Expected tokens: PASS, MINOR, CRITICAL.
PASS or MINOR → continue to Phase 4 (opener).CRITICAL → re-dispatch Phase 2 (construct) with audit-summary.md injected as {REVIEWER_FEEDBACK}. Re-run Phase 3. Repeat up to 2 total iterations. If still CRITICAL after 2 iterations, present remaining critical issues to the user via AskUserQuestion: Continue to opener with known logic issues / Pause for manual intervention / Cancel.Mark phase task completed when the verdict allows progression or the user overrides.
One Agent dispatch.
opener-prompt.md.{OUTPUT_PATH}/opener.md exists.**Verdict:** MISMATCH, do NOT treat this as a failure. The opener agent correctly refused to manufacture a bogus complication. Read the ## Reason and ## Partial opener sections and ask the user via AskUserQuestion: Proceed with degraded opener (S and A only, C and Q omitted) / Revise apex by re-running construct with the mismatch note injected as reviewer feedback / Cancel.{REVIEWER_FEEDBACK} and re-dispatch Phase 2, then re-run Phase 3, then re-run Phase 4. If the user proceeds with the degraded opener, Phase 5 will render only S and A.The opener is deliberately Phase 4 (not Phase 1) so it is written LAST against a stable apex. This prevents a premature opener from forcing structural changes to the apex, which is the whole point of the pyramid method.
Orchestrator-only. No Agent dispatch.
{OUTPUT_PATH}/construction.md for apex, top-level grouping noun, siblings, and evidence.{OUTPUT_PATH}/opener.md for the SCQA opener (or the Partial opener if MISMATCH was accepted).{OUTPUT_PATH}/audit-summary.md for the MINOR flags worth surfacing.{OUTPUT_PATH}/pyramid.md in this shape:# <working title inferred from apex, or provided at intake>
**Opener (SCQA).**
S: <situation>. C: <complication>. Q: <question>. A: <apex>.
## Apex
<one-sentence governing thought, verbatim from construction.md>
## Supporting findings (<plural noun from construction.md>)
- <Finding 1>
- <evidence>
- <evidence>
- <Finding 2>
- <evidence>
- <sub-grouping if present, rendered as nested bullets>
- <Finding 3>
- ...
## Audit notes
The following MINOR flags did not block the pyramid but are worth knowing:
- <MECE flag from audit-summary>
- <So-What flag>
- <...>
Degraded render cases:
opener.md's ## Partial opener section (S and A only; omit C and Q).Mark task completed and update the state file.
Update the state file. The working directory is the key under projects (not a field). For that key, write:
mode: greenfield or restructureactive_reference: absolute pathlast_completed_phase: name of the last successful phaselast_run_at: ISO timestampSee the State File Format section below for the exact JSON shape.
Present pyramid.md and audit-summary.md to the user.
mkdir -p.**Verdict:** line, or an unrecognised token): log, treat as MINOR, continue with the remaining auditors. Record the malformed output in audit-summary.md under the auditor's section verbatim so the user can inspect it.construct needs intake.md.audit needs construction.md.opener needs construction.md (and benefits from audit-summary.md for MINOR flags).render needs construction.md AND opener.md (and audit-summary.md for the notes section).
If the user invokes --phase X on a directory missing the upstream artifact, ask via AskUserQuestion whether to (a) run the missing upstream phase first, (b) accept a degraded run (only safe for render without opener.md, which renders S-and-A placeholder in place of the SCQA line), or (c) cancel and let the user produce the artifact manually.greenfield, restructure, or socratic): warn once, fall back to asking the user via AskUserQuestion, and record the corrected value in the state file.draft.md already exists in the working directory but the user picked greenfield, surface the file and ask: "A draft is present in this directory. Did you mean Restructure mode?" via AskUserQuestion. Accept the answer and proceed.draft.md is empty (zero bytes) or the provided path does not exist, ask the user to supply the draft or bail to Mode A (Greenfield).construction.md from a prior run: ask via AskUserQuestion Reset and rebuild via dialogue / Keep existing pyramid (no Mode D needed) / Cancel. Honor the choice.--phase construct --mode socratic on a directory without intake.md): same handling as Mode A; ask whether to run intake first.<state-root>/<project-id>/pyramid-skill-state.json:
{
"version": 1,
"projects": {
"<absolute-working-directory>": {
"mode": "greenfield",
"active_reference": "<absolute-path-or-default>",
"last_completed_phase": "construct",
"last_run_at": "2026-04-24T12:00:00Z"
}
}
}
Recognised mode values: greenfield, restructure, socratic. Key by absolute working-directory path so multiple in-flight pyramids in the same project each have their own state. After a Mode-D-to-Mode-A hand-off, the mode field becomes greenfield and an optional handoff_from: socratic field is added.
Used in --phase flag and task list:
intake, construct, audit, opener, render