.claude/skills/build/SKILL.md
This skill should be used when the user has an approved AI Building Block Spec and wants to build platform artifacts for their AI workflow. It offers a build path choice, researches integration availability, generates platform-appropriate artifacts (prompts, skills, agents, configs), This is Step 4 (Build) of the Business-First AI Framework.
npx skillsauth add jamesgray-ai/handsonai buildInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Take an approved AI Building Block Spec and generate platform-appropriate artifacts: prompts, skills, agents, configs, and connectors.
Design principle: The skill is the framework, the model is the platform expert. No platform names, SDK references, API patterns, GUI walkthroughs, or tool-specific examples appear anywhere in the skill. All platform-specific knowledge is researched by the model at runtime via web search.
Role: You are an Agentic AI Architect. Your role is to build solutions that map business workflows to AI building blocks across all three layers — Intelligence (Model, Context, Memory, Project), Orchestration (Prompt, Skill, Agent), and Integration (MCP, API, SDK, CLI). You think in terms of system design, artifact generation, and platform-specific implementation.
Artifact generation begins only after the AI Building Block Spec has been approved in the Design phase.
Read the AI Building Block Spec from outputs/[workflow-name]-building-block-spec.md. If the user specifies a file path, use that. Otherwise, look for the most recent Building Block Spec in outputs/.
Confirm you've loaded the spec by summarizing: workflow name, orchestration mechanism, involvement mode, number of steps, number of skill candidates, and number of agents.
Verify the spec contains an Architecture Decisions section and Integration Options section. If either is missing, inform the user: "This spec appears to predate the current format. Some sections are missing. I can either (a) proceed with what's available and ask questions as needed, or (b) you can regenerate the spec by running the Design skill again."
Offer two paths:
"How would you like to proceed?
- I'll build it — I generate all artifacts (skills, agents, prompts, configs) based on the approved spec.
- I'll build it myself — The spec is your deliverable. I'll provide a Construction Guide with build sequence and platform-specific format guidance instead of generating artifacts."
If the user chooses path 2:
[skill-name] available. Invoke it (e.g., /[skill-name]) and pass the spec below as your starting context."/business-first-ai:run."Based on the orchestration mechanism, present ONLY the steps relevant to the user's mechanism:
Before starting any mechanism path: Check the Data Readiness Summary. For items with state "Partial" or "No", resolve required actions first — these gate dependent steps. If resolution requires user action (e.g., exporting data, granting access), present the action list and wait for confirmation before proceeding.
Prompt mechanism:
Skill-Powered Prompt mechanism:
Agent mechanism:
After presenting the mechanism-specific build path, proceed to Step 3.5 to discover available creation tools before generating any artifacts.
Before generating artifacts, discover what creation tools are available in this session. Skills are an open standard — they live in platform-specific directories but follow the same SKILL.md format everywhere.
Extract building block types from the loaded Building Block Spec — list each type and count (e.g., "3 skills, 1 agent, 1 MCP server config").
Discover available creation skills using two tiers:
Tier 1 — System-level discovery. Check if the current environment provides a list of available skills (typically shown in system reminders, session context, or tool listings). If available, scan skill names and descriptions for any that indicate the ability to create, generate, scaffold, or build one of the needed building block types. Match semantically — look for descriptions containing phrases like "create a skill", "build an agent", "scaffold a plugin", "create hooks", "generate MCP servers", etc.
Tier 2 — Filesystem discovery (fallback). If no system-level skill list is available, or if the list may be incomplete, scan the platform-appropriate skill directories for SKILL.md files. Read each file's YAML frontmatter (name and description fields) to identify creation-capable skills. Use the platform's skill directory:
| Platform | Skill Directories |
|----------|------------------|
| Claude Code | .claude/skills/ |
| Cursor | .cursor/skills/, .claude/skills/, .codex/skills/, .agents/skills/ |
| Codex CLI | .agents/skills/ |
| Gemini CLI | .gemini/skills/, .agents/skills/ |
| VS Code Copilot | .github/skills/, .agents/skills/ |
| Cowork / Claude.ai | System-managed (Tier 1 only) |
For the authoritative and up-to-date directory listing, read docs/agentic-building-blocks/skills/index.md (Platform Implementations table).
If neither tier finds any skills (e.g., ChatGPT web, Gemini app), state: "No creation skills detected in this environment — all building blocks will be generated inline." Then proceed.
Build a Creation Tools Map. For each building block type needed by the spec, record the matched creation skill (if any) or "Inline generation" as the fallback:
| Building Block Type | Count | Matched Creation Skill | Method | |---|---|---|---| | Skill | 3 | (matched skill name or "none") | Delegate / Inline | | Agent | 1 | (matched skill name or "none") | Delegate / Inline |
Present the map for confirmation. Show the user: "Here's how I plan to build each block type. For items with a matched creation skill, I'll delegate to that skill's full workflow. For items without, I'll generate inline using reference specifications. Does this look right?"
Wait for user confirmation before proceeding.
Before generating artifacts, resolve platform-specific format requirements and integration documentation so that artifact generation (Step 6) produces correctly formatted output on the first pass.
Caching note: The registry JSON is fetched once per session. If the Design phase already fetched it, use the cached copy.
Tier 1 — Platform Doc Resolution
Fetch the platform registry (or use session cache):
https://raw.githubusercontent.com/jamesgray-ai/handsonai/main/plugins/business-first-ai/registries/platform-registry.json
Look up the user's platform in the platforms section of the registry JSON.
Determine mode and language:
mode field (code or guided) for the matched platform.code mode: read the language field (e.g., markdown, python, yaml).guided mode: note that artifacts will be GUI workflow steps and configuration options rather than files.If platform not found: Fall back to model knowledge combined with web search to determine the platform's artifact format. Log a warning: "Platform not found in registry — using model knowledge and web search for format requirements."
For each building block needing an artifact, fetch the corresponding doc URL from the registry:
docs section (e.g., skills, agents, mcp, hooks, prompts).Extract artifact format requirements:
Pass format requirements forward. Store the resolved format requirements so Step 6 (Generate Platform Artifacts) can use them directly instead of re-researching.
Tier 2 — Integration Doc Resolver
For each integration listed in the Building Block Spec's "Integration Options" section, resolve platform-specific integration documentation:
Read integration-registries from the cached registry JSON. This section catalogs known sources for integration documentation (e.g., MCP registry, platform marketplaces, connector catalogs).
Search each cataloged source. For each integration needing research:
mcp-registry search), use it.WebFetch fallback for uncataloged sources. If the integration is not found in any cataloged source, or the cataloged source has no MCP tool available:
Present a summary of resolved platform format requirements and integration docs to the user before proceeding.
This is separate from Step 3.5's creation tool discovery — here you're checking for workflow skills that have already been built and should be incorporated, not for skills that create other skills.
Before generating artifacts:
Read the "Integration Options" section from the loaded Building Block Spec. This section already identifies each integration, its category (built-in, available with setup, possible with code, manual), and source URLs discovered during the Design phase.
Use the carried-forward URLs as starting points. The Design phase's Integration Discovery already answered "what's available?" — the focus here is "how do I connect it on the user's platform?"
For each integration listed in the spec:
Web search is used for platform availability research — verifying setup steps, finding platform-specific guides, and confirming compatibility. Discovery of integrations themselves is already done. If the environment doesn't support web search, instruct the user to switch to a tool that does.
Present the integration mapping and ask the user to confirm before generating artifacts. If any critical integration is manual-only, discuss implications for the orchestration mechanism (may need to downgrade or add human-in-the-loop steps).
If the Integration Options section is missing from the spec (older format), inform the user and offer two paths: (a) Run Integration Discovery now — research available integration approaches for each tool identified in the spec's Integration Options or Step-by-Step Decomposition tables, or (b) proceed with web-search-only research for each integration need as it arises during artifact generation.
Based on the platform from Architecture Decisions. Resolve any deferred decisions now: ask about shareability (will team members run this?) to determine artifact format (file-based vs. code-based), and resolve the specific platform offering if not yet determined (e.g., Claude Code vs. Claude.ai, ADK vs. Gemini web). Infer code comfort from the specific offering (Claude Code = code-comfortable, ChatGPT = no-code).
a. Resolve platform documentation from the registry. Use the platform doc URLs fetched in Platform Research (Step 3.6) from the registry's platforms section. These provide current, authoritative documentation for each building block's artifact format.
If playbook platform guides are available locally (e.g., docs/platforms/claude/index.md), use them as supplementary context — not as the primary source.
b. Verify currency (if needed). The registry provides current doc URLs maintained by the framework author. Use web search only if the fetched docs appear outdated or if the registry was unavailable in Step 3.6.
c. Follow the resolved artifact format specifications. For each building block in the spec, use the artifact format extracted during Platform Research (Step 3.6). If Platform Research did not resolve a format (registry unavailable, platform not found), fall back to:
references/skill-spec.mdreferences/agent-spec.mdd. Apply code vs guided mode branching. Based on the platform's mode from the registry (determined in Step 3.6):
language (Python, TypeScript, markdown). This is the standard behavior — proceed with artifact generation as described below.e. Generate each building block. For each building block in the spec, follow the Creation Tools Map from Step 3.5:
If a creation skill was matched for this block type:
If no creation skill was matched (inline generation):
https://agentskills.io/specification, fallback to references/skill-spec.md). Generate the skill following that spec. Apply platform-specific extensions as documented for the target platform.references/agent-spec.md. For other platforms, fall back to web search. Generate the agent following the resolved spec.f. Generate artifacts. The skill provides the specs (what each building block should do, its inputs/outputs/instructions from the Design phase). The model provides the implementation (how to build it on the user's platform, using the verified specification and platform documentation as authoritative sources).
After completing Build, tell the user: "To generate the Run Guide, run /business-first-ai:run (or say 'Generate the Run Guide for my workflow')."
Prompts, skills, agents, orchestration configs, and connector setups in whatever format is appropriate to the user's chosen platform. Generated by the model based on the Building Block Spec and Architecture Decisions. For code-mode platforms, these are source files; for guided-mode platforms, these are step-by-step GUI instruction documents. For building blocks with a matched creation skill (discovered at runtime in Step 3.5), artifacts are built by delegating to that skill's full workflow. For building blocks without a matched creation skill, artifacts are generated inline using the format resolved from the platform registry in Step 3.6 (falling back to references/skill-spec.md for skills, references/agent-spec.md for Claude Code agents, or web search for other platforms).
documentation
Write Standard Operating Procedure documentation for workflows and save as markdown files. Selects full or lightweight SOP template based on autonomy level (deterministic vs. guided/autonomous), then adapts for workflow type (Manual, Augmented, Automated). Use when the user asks to write an SOP, document a workflow, create procedure documentation, or capture how a workflow is executed. Triggers on "write an SOP", "document this workflow", "create operating instructions", "how is this workflow executed".
documentation
Write Business Process Guide documentation that explains when, why, and how to execute a complete business process with its component workflows, and save as markdown files. Use when documenting a business process end-to-end, creating playbooks, or explaining how multiple workflows fit together. Triggers on "write process guide", "document this process", "create a playbook for", "how do these workflows connect".
development
This skill should be used when the user wants to sync skills to GitHub, push skill changes to a remote repository, or back up local skills. Syncs Claude Agent Skills from ~/.claude/skills/ (local) to GitHub repository using git commands. Commits changes, pushes to remote, and updates Notion AI Building Blocks with GitHub URLs.
development
This skill should be used when the user wants to register or update AI building blocks (Skills, Agents, Prompts, Context MDs) in the Notion AI Building Blocks database. Triggers after skill creation, agent creation, prompt authoring, context MD updates, or when the user asks to register, add, or track a building block in Notion.