本文へ移動
cccskills
無料GitHub で公開

spell-builder

Create, edit, and validate spell definitions (YAML/JSON) that compose connectors and step commands into end-to-end spells. Use when building new spell definitions, modifying existing ones, or exploring available spell components.

インストール方法を見る

含まれるファイル(19)

  • SKILL.md12.9 KB
  • architecture.md8.5 KB
  • connectors/github-cli/README.md2.0 KB
  • connectors/http/README.md1.4 KB
  • connectors/local-outlook/README.md1.9 KB
  • connectors/playwright/README.md1.7 KB
  • permissions.md4.3 KB
  • preflight.md4.1 KB
  • steps/agent/README.md1.8 KB
  • steps/bash/README.md1005 B
  • steps/browser/README.md2.1 KB
  • steps/condition/README.md1.1 KB
  • steps/github/README.md1.6 KB
  • steps/loop/README.md1.2 KB
  • steps/memory/README.md1.6 KB
  • steps/outlook/README.md2.9 KB
  • steps/parallel/README.md1.1 KB
  • steps/prompt/README.md923 B
  • steps/wait/README.md667 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Spell Builder

Purpose: produce production-ready spell definitions (YAML/JSON) that compose step commands and connectors into end-to-end automated spells, with proper data flow, validation, and engine integration.

Read First — Companion Files

FileWhen to read
architecture.mdAlways — three-layer model (spell → step → connector); putting logic in the wrong layer is the most common mistake
permissions.mdWhen defining or editing any step — required disclosure & dry-run report format
preflight.mdWhen the step depends on runtime state (clean git tree, logged-in CLI, reachable host)

Prerequisites

  • MoFlo project with cli/spells package
  • Familiarity with YAML syntax

Quick Start

Ask the user:

What would you like to do?

  1. Create a new spell definition from scratch
  2. Edit an existing spell definition
  3. Discover available step commands and connectors
  4. Validate an existing spell file

Then follow the appropriate section below.


Section 1: Create a New Spell

Step 1: Gather Spell Metadata

FieldRequiredExample
NameYes (kebab-case)deploy-staging, security-audit
DescriptionRecommendedDeploy to staging with smoke tests
VersionOptional (default 1.0)1.0
AbbreviationOptionalds (short lookup key for /flo -wf ds)
MoFlo LevelOptional (default none)none, memory, hooks, full, recursive

Step 2: Define Arguments (Optional)

If the spell needs runtime parameters, define each argument:

FieldRequiredDescription
NameYesArgument identifier (e.g., target, severity)
TypeYesstring, number, boolean, or string[]
RequiredOptional (default false)Whether the argument must be provided
DefaultOptionalDefault value if not provided
EnumOptionalAllowed values (e.g., [low, medium, high])
DescriptionOptionalHelp text

Arguments are referenced via {args.argumentName}.

Step 3: Define Steps

Walk the user through adding steps one at a time. For each step:

FieldRequiredDescription
IDYes (unique)Step identifier (kebab-case, e.g., run-tests)
TypeYesOne of the available step command types (see Discovery section)
ConfigYesType-specific configuration (see per-step README)
OutputOptionalVariable name to store step output (for downstream steps)
Continue on ErrorOptionaltrue to proceed even if this step fails
MoFlo LevelOptionalOverride spell-level mofloLevel (can only narrow, not escalate)
Permission LevelOptionalreadonly, standard, elevated, autonomous — auto-derived from capabilities when omitted

Data flow between steps: Use {stepId.outputKey} syntax to reference output from a previous step. For example, if step fetch-data outputs a url field, a later step can use {fetch-data.url}.

Special variable references:

  • {args.name} — references a spell argument
  • {credentials.NAME} — references a credential (resolved at runtime)
  • {stepId.outputKey} — references output from a previous step

REQUIRED: Permission disclosure on step creation

After defining each step, display its permission profile. See permissions.md for the required format and per-capability warnings. Apply automatically — users must understand what each step can do before it becomes part of a spell.

REQUIRED: Preflight checks with human-readable hints

When a step depends on runtime state the user controls (clean git tree, logged-in CLI, reachable host, etc.), declare a preflight: block so the spell fails fast with a helpful message before any side effects. Every preflight MUST include a hint: field — the user-visible message on failure. See preflight.md for the full guide (severity levels, resolutions, hint copywriting rules).

Step 4: Generate the Spell YAML

Assemble the definition into:

name: <spell-name>
abbreviation: <optional-abbreviation>
description: <optional-description>
version: "<version>"
mofloLevel: <optional-level>

arguments:
  <arg-name>:
    type: <string|number|boolean|string[]>
    required: <true|false>
    default: <optional-default>
    enum: [<optional-values>]
    description: <optional-help-text>

steps:
  - id: <unique-step-id>
    type: <step-command-type>
    config:
      <type-specific-config-fields>
    output: <optional-variable-name>
    continueOnError: <optional-true>
    mofloLevel: <optional-level>

Step 5: Validate the Spell

Validate against the engine schema. The following rules must pass:

  1. name is required and must be a non-empty string
  2. steps is required and must be a non-empty array
  3. Each step must have a unique id (no duplicates)
  4. Each step must have a valid type matching a known step command
  5. Variable references ({stepId.outputKey}) must not be forward references
  6. Argument references ({args.name}) must match declared arguments
  7. mofloLevel must be one of: none, memory, hooks, full, recursive
  8. Step-level mofloLevel cannot exceed the spell-level mofloLevel
  9. No circular condition jumps (condition steps referencing each other in a loop)
  10. Argument definitions must have valid types, and defaults must match their declared type
  11. permissionLevel (if declared) must be one of: readonly, standard, elevated, autonomous

If validation fails, show the specific errors and guide the user to fix them.

Step 5b: REQUIRED — Permission Dry-Run Report

After schema validation passes, display the full spell-wide permission report and require user acceptance before the spell can be cast. See permissions.md for the exact format. On acceptance the permission hash is stored — subsequent runs do not re-prompt unless the spell's permissions change.

Step 6: Write the File

Ask the user where to save:

  • Project spells: spells/<name>.yaml (user-level, project-specific)
  • Claude spells: .claude/spells/<name>.yaml (Claude Code integration)

Prefer the MCP tool when available:

mcp__moflo__spell_create — name, definition (YAML string), description

Or write the file directly to the chosen directory.


Section 2: Edit an Existing Spell

Step 1: Load the Spell

Ask for the spell file path, or use mcp__moflo__spell_list to browse available spells. Read the YAML/JSON file and parse the current definition.

Step 2: Present Current Structure

Show a summary: name, description, version, abbreviation, arguments (if any), steps list with id/type/output variable/continueOnError.

Step 3: Apply Changes

OperationDescription
Add stepInsert a new step at a given position
Remove stepDelete a step by id (warn about broken references)
Reorder stepsMove a step to a new position (warn about broken forward refs)
Update step configModify a step's configuration fields
Update step typeChange a step's command type (reset config to match)
Add/remove argumentsModify spell argument definitions
Update metadataChange name, description, version, abbreviation, mofloLevel

After each change, re-validate and show any errors introduced. When adding or modifying a step, display its permission report (see permissions.md). If the change introduces new destructive capabilities or raises the permission level, call this out explicitly.

Step 4: Save

Write the updated YAML back to the original file (or a new path if requested).


Section 3: Discover Available Spell Components

Step Commands

Each step type has its own self-contained README under .claude/skills/spell-builder/steps/:

.claude/skills/spell-builder/steps/
  <step-name>/README.md    — config, outputs, usage examples, source path

To find available steps, Glob .claude/skills/spell-builder/steps/*/README.md and read each H1.

Runtime source: src/cli/spells/commands/ — each step is a TypeScript file registered in index.ts.

Adding a new step: create steps/<name>/README.md (use existing READMEs as templates and follow .claude/guidance/moflo-guidance-rules.md); the step source goes in src/cli/spells/commands/ and is registered in index.ts. No changes to this SKILL.md needed.

Connectors

Each connector has its own self-contained README under .claude/skills/spell-builder/connectors/:

.claude/skills/spell-builder/connectors/
  <connector-name>/README.md    — actions, capabilities, usage, source path

To find available connectors, Glob .claude/skills/spell-builder/connectors/*/README.md.

Runtime source: src/cli/spells/connectors/ — each connector is a TypeScript file registered in index.ts.

Adding a new connector: create connectors/<name>/README.md; the connector source goes in src/cli/spells/connectors/ and is registered in index.ts. When to create a new connector vs composing existing ones: see architecture.md.


Section 4: Validate an Existing Spell

Step 1: Load and Parse

Read the spell file (YAML or JSON). The parser auto-detects format.

Step 2: Run Validation

Check against all engine validation rules from Section 1, Step 5.

Step 3: Report Results

  • Valid: confirm the spell passes all checks.
  • Invalid: list each error with its path and message, then offer to fix.

Reference

Type Definitions

  • Spell definition: src/cli/spells/types/spell-definition.types.ts — SpellDefinition, StepDefinition, ArgumentDefinition, ArgumentType
  • Step command interface: src/cli/spells/types/step-command.types.ts — StepCommand, StepConfig, StepOutput, CastingContext, MofloLevel, CapabilityType
  • Connector interface: src/cli/spells/types/spell-connector.types.ts — SpellConnector, ConnectorAction, ConnectorOutput, ConnectorAccessor

Engine Components

  • Schema validator: src/cli/spells/schema/validator.ts — validateSpellDefinition()
  • YAML/JSON parser: src/cli/spells/schema/parser.ts — parseSpell()
  • Grimoire (registry): src/cli/spells/registry/spell-registry.ts — Grimoire
  • Definition loader: src/cli/spells/loaders/definition-loader.ts — two-tier loading (shipped + user)

MCP Tools

ToolPurpose
mcp__moflo__spell_createCreate a new spell definition
mcp__moflo__spell_listList available spells
mcp__moflo__spell_castCast (execute) a spell
mcp__moflo__spell_statusCheck spell execution status

MoFlo Integration Levels

LevelAccess
noneNo MoFlo integration (default)
memoryRead/write MoFlo memory
hooksMemory + hook triggers
fullHooks + swarm/agent spawning
recursiveFull + nested spell invocation

Variable Reference Syntax

PatternDescriptionExample
{args.name}Spell argument{args.target}
{credentials.NAME}Runtime credential{credentials.GITHUB_TOKEN}
{stepId.key}Previous step output{fetch-data.url}

Example: Complete Spell

name: security-audit
abbreviation: sa
description: Run security checks on a target directory
version: "1.0"
mofloLevel: memory

arguments:
  target:
    type: string
    required: true
    description: Directory to audit
  severity:
    type: string
    default: medium
    enum: [low, medium, high, critical]
    description: Minimum severity to report

steps:
  - id: scan-deps
    type: bash
    preflight:
      - name: "npm available"
        command: "npm --version"
        hint: "npm isn't installed or isn't on your PATH. Install Node.js from https://nodejs.org and try again."
    config:
      command: "npm audit --json"
      cwd: "{args.target}"
    output: audit-result

  - id: analyze-findings
    type: bash
    config:
      command: |
        claude -p "Analyze these npm audit results and filter for severity >= {args.severity}.
        Audit output: {scan-deps.stdout}"
      timeout: 300000
    output: analysis

  - id: save-report
    type: memory
    config:
      operation: write
      namespace: security
      key: "audit-{args.target}"
      value: "{analysis.summary}"

Related Skills

  • /connector-builder — scaffold new connectors and step commands when the spell needs a component that doesn't exist yet

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

commune

無料

Turn a vague idea into a concrete, actionable spec through a short Socratic dialogue, then hand the result off to an existing moflo surface — a /flo ticket, a spell, or memory. Use BEFORE you have a defined unit of work, when the goal is still fuzzy.

日本語の概要は準備中です。原文の説明を表示しています。

eric-cielo/moflo182026年10月1日 更新

Scaffold new spell step commands and connectors. Use when building new step commands for spells or extending the spell engine with new capabilities. Connectors are for new I/O transport types OR platforms requiring complex multi-step interaction (e.g., browser-based automation).

日本語の概要は準備中です。原文の説明を表示しています。

eric-cielo/moflo182026年10月1日 更新

distill

無料

Alias for /flo-simplify — see that skill's description.

日本語の概要は準備中です。原文の説明を表示しています。

eric-cielo/moflo182026年10月1日 更新

divine

無料

Structured multi-hop web research with explicit confidence gating — plan the inquiry, search (WebSearch/WebFetch), score your own confidence, and keep digging until the answer is well-supported or a hop cap is hit, then emit a cited synthesis. Learns across sessions by storing each research case to memory and reusing prior strategies. Use when a question needs more than one search — comparisons, current-best-practice questions, anything where a single lookup leaves you unsure.

日本語の概要は準備中です。原文の説明を表示しています。

eric-cielo/moflo182026年10月1日 更新

eldar

無料

Consult the Eldar — audit a project's moflo + Claude Code setup for portable, high-leverage gaps and guide remediation. Default mode is read-only audit with severity-ranked findings; --fix presents an interactive triage menu and walks the user through each chosen fix (healer, missing CLAUDE.md, sparse guidance, hook/MCP wiring, empty memory namespaces, stack→guidance gaps). Use when starting in a new project, when Claude feels lost or inefficient, when guidance/CLAUDE.md is sparse, or as a periodic health check.

日本語の概要は準備中です。原文の説明を表示しています。

eric-cielo/moflo182026年10月1日 更新

flfl

無料

Run /fl on a ticket with moflo's three standing considerations loaded first — cross-platform (Rule

日本語の概要は準備中です。原文の説明を表示しています。

eric-cielo/moflo182026年10月1日 更新

eric-cielo のスキルをすべて見る

このスキルの問題を報告する