Skip to content
FunCoding

Search

Search docs, Skills and MCP

workflow-schema-tuning

Use when modifying `resources/workflow-schema.json` in cc-wf-studio to influence how AI agents generate workflows via the cc-workflow-ai-editor skill. Triggers include "AIが特定のノードタイプを選んでくれない", "ワークフロー生成のバイアスを調整したい", "スキーマの description を変えたい", "新しいノードタイプを追加したい", "嘘の制約がスキーマに混じっていないか確認したい". Covers what the schema actually does (instructions to AI, not runtime constraints), the design philosophy (align direction, do not prescribe rules), the build pipeline (.json → .toon auto-generated), and known bias sources to audit.

AI 与智能体5.4k.claude/skills/workflow-schema-tuning/SKILL.md

Install

Send this to Claude Code, Codex or Cursor. The agent checks the Skill for safety first and installs it only after you confirm.

读取 https://funcoding.ai/skills/breaking-brake/cc-wf-studio/workflow-schema-tuning/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

Workflow Schema Tuning

The schema (resources/workflow-schema.json) is the primary spec delivered to the AI editor at runtime via the get_workflow_schema MCP tool. It is not a runtime validator — the runtime barely validates anything. Whatever the schema says, the AI believes. Treat schema edits as prompt engineering, not type definitions.

Core principle: align direction, do not prescribe rules

AI agents already know how to choose between node types intuitively (e.g., when to delegate to a sub-agent vs. handle in-context). The fix for bad output is almost never "add more rules" — it is "remove what is biasing the AI in the wrong direction."

Defaults:

  • Prefer minimal description text that states each node's positional role (立ち位置). Example: "A step executed by the main orchestrating agent" vs. "A step executed by an isolated sub-agent." The contrast does the work.
  • Avoid aiGenerationGuidance lists of "when to use / when not to use / anti-patterns." They treat the AI as a rules engine, bloat tokens, and fail on unanticipated cases.
  • Test minimal first. Only add guidance after a concrete failure where the minimal change is provably insufficient.

Anti-pattern: writing detailed upgradeToSubAgentWhen / stayInPromptWhen lists. If you find yourself writing 3+ bullets explaining when to use a node, the description itself is probably wrong.

Schema architecture

FileRoleEditable?
resources/workflow-schema.jsonSingle source of truthYES
resources/workflow-schema.toonToken-efficient format consumed by AI via MCPNO — auto-generated
resources/ai-editing-skill-template.mdSkill template loaded at AI editor launchYES
scripts/generate-toon-schema.tsTOON generatorYES (rare)

After editing .json, regenerate .toon:

npm run generate:toon

The full build (npm run build) does this automatically as the first step.

Where biases hide (audit checklist)

When the AI consistently picks the wrong node type, look here in priority order:

  1. ai-editing-skill-template.md step 4 — strongest pull. A line like "use built-in sub-agents by default" overrides every other signal in the schema. Keep this neutral.
  2. nodeTypes.<type>.description — the AI's first impression of what each node means. Keep terse, contrastive, role-focused.
  3. nodeTypes.<type>.aiGenerationGuidance — when present, this is read closely. Audit for stale "default" framings or anti-patterns that no longer apply.
  4. examples[] — the AI learns strongly from examples. If every example uses one node type, expect that node to dominate output.
  5. Top-level constraints (connections.overview.forbidden, exportValidationRules, postGenerationChecklist) — these can encode false constraints (e.g., "no cycles allowed" when the runtime allows them, since the runtime is an AI that uses judgment, not a deterministic executor). Removing false constraints is itself a valid improvement.

Workflow for making changes

  1. Diagnose: identify the symptom (wrong node type chosen, false constraint cited in AI's reasoning, etc.).
  2. Locate the bias: walk the audit checklist above. Look for a single source pulling the AI in the wrong direction before adding new content.
  3. Minimal edit: prefer removing biased text or fixing one description over adding new sections.
  4. Regenerate TOON: npm run generate:toon.
  5. Validate: npm run check && npm run build.
  6. Test: npm run debug launches a fresh Extension Development Host. Trigger the AI editor with a node-type-agnostic prompt (no hints like "use a sub-agent for X") and inspect the generated workflow.
  7. Iterate: if the minimal change is insufficient, add the smallest additional signal — not a guidance section.

Important constraints

  • The framework is multi-agent (Claude Code, Codex, "other"). Schema text must be agent-agnostic. Avoid Claude-specific phrasing like "isolated Claude session" — use "isolated AI agent session" or "isolated sub-agent."
  • The runtime is an AI agent making judgments, not a deterministic program. Constraints that make sense in code (no cycles, no infinite loops) often do not apply here. Verify before transcribing programming-style constraints.
  • After generate:toon, confirm the change took effect by grepping the relevant string in workflow-schema.toon. The MCP delivers TOON, not JSON.

Commit conventions for schema changes

Per the project's conventional commit policy:

  • Description fixes / bias removal → improvement: (patch bump)
  • Build/tooling-only changes → chore: (no release)
  • Keep subjects ≤50 chars, body 3–5 bullets, "what changed" only
  • Split unrelated concerns into separate commits to make diffs reviewable

Similar Skills

brand-guidelines
anthropics/skills180k

brand-guidelines

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

AI & agents

internal-comms
anthropics/skills180k

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

AI & agents

template-skill
anthropics/skills180k

template-skill

Replace with description of the skill and when Claude should use it.

AI & agents

mcp-builder
anthropics/skills180k

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

AI & agents

algorithmic-art
anthropics/skills180k

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

AI & agents

academy-guide
anthropics/skills180k

academy-guide

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

AI & agents