SkillMachine
All skills

Skill / Hook / Subagent Architecture Advisor

Report

Maps a workflow to the right agent primitive — a justified decision plus a working skeleton.

Live output preview

Input Format: Input FormatOutputWatch the Output: Watch the Output

A plan is required to view this content

Choose a plan to access input format, sample outputs, and live previews.

View Plans →

About the skill

What it does

Takes a business process or automation need and maps it to the right component across Skill / Hook / Subagent (hybrid where needed). It first decomposes the process into atomic steps (Phase 1) and labels each on four axes: trigger type (manual / event / scheduled), determinism (rule vs. judgment), side-effect (does it write to the outside world), and context load (does it bloat the main thread). It then row-matches each step against a Primitive-Selection Matrix (R1–R8) and assigns a primitive via ordered decision rules:

  • "Must it run on every event, even if the LLM forgets?" → Hook (PreToolUse / PostToolUse / SessionStart / UserPromptSubmit / Stop; exit 2 to block).
  • Isolated/deep/parallel and would pollute >~25% of the main context? → Subagent (Task / claude -p, its own token budget).
  • A repeatable procedure / expertise package? → Skill (body <500 lines, progressive disclosure).

It outputs a 0–100 Automation Suitability Score (5 weighted axes), an ROI payback gate, a minimal working skeleton per chosen primitive (Skill frontmatter, Hook settings.json registration + flock'd shell guard, Subagent spawn line), and an inter-component C4 contract (who calls whom in what format).

When to use it

For requests like "How do I automate this process?", "Should this be a Skill or a Hook?", "Should I split it into a Subagent?", "design an agent architecture", "make this prompt reusable", or "do X on every commit / every tool call". Input can be a process description, an existing prompt/script, an internal workflow, or a code fragment. Especially where the wrong primitive is costly: leaving a deterministic rule to LLM judgment, dumping a lightweight task into a needless Subagent, or writing a guaranteed side-effect into a prompt.

Method / frameworks

Decisions bind to named canon, not intuition: (1) Anthropic's 3-primitive agent-building doctrine — Tools / Skills (model-invoked, progressive disclosure) / Subagents (isolated context), with Claude Code Hooks as a fourth event-driven axis; (2) Single Responsibility Principle (SOLID) plus context-isolation — one reason-to-change per component, split into a Subagent past ~25% token pollution; (3) the Decision-Table method — a matrix mapping condition combinations to single actions; (4) ROI / NPV automation feasibility — payback >12 months is flagged warn regardless of score; (5) the C4 model (Simon Brown) — component + dependency contracts; (6) idempotency & failure-mode — every event-triggered write is flock'd and idempotent, with no silent failure. Threshold numbers (>500 lines, >12 months, >300-line diff, ~25% context) are typical practical ranges; for a firm decision the advisor asks the user for real volume/cost data rather than fabricating false precision.

How do I use this skill?

You don't "run" a skill — after installing it you just tell the agent your task (e.g. ask for the relevant job), and the skill kicks in by itself when its description matches.

Upload the skill-hook-subagent-mimari-danismani.zip you downloaded as-is — no packaging needed, the format is already correct (folder at root).

  1. Open Settings → Customize → Skills
  2. Upload → select the skill-hook-subagent-mimari-danismani.zip you downloaded
  3. Claude reads SKILL.md; the name + description appear. Ready ✅

Scripts run in Anthropic's code-execution environment (sandbox) — not on your machine.