Agent skill

Create AI Tool

by macro-inc in macro-inc/macro

Build a new AI tool end-to-end — Rust implementation, toolset wiring, infra, schema generation, and frontend UI.

AGPL-3.0Auto-check passedFrontend & Design

Install Create AI Tool

skills CLI
$ npx skills add macro-inc/macro --skill create-ai-tool -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install macro-inc/macro create-ai-tool --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/macro-inc/macro.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/create-ai-tool .claude/skills/create-ai-tool && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
create-ai-tool
GitHub stars
4.6k
Token cost
~1.6k tokens
SKILL.md length
704 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Build a new AI tool end-to-end — Rust implementation, toolset wiring, infra, schema generation, and frontend UI.

  • Works in 12 steps: Write the tool → Create the tool context → Add the toolset to all_tools in the… → …
  • Tasks that involve Frontend development
  • SKILL.md covers Step 1: Write the tool, Step 2: Create the tool context, Step 3: Add the toolset to… and Step 4: Add the context to…, plus 8 more sections
  • Calls bun, cargo and tsc

What it does

Create AI Tool is an agent skill from macro-inc/macro. Build a new AI tool end-to-end — Rust implementation, toolset wiring, infra, schema generation, and frontend UI.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Frontend development. It works with Rust. The repository describes itself as: Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory. The licence is AGPL-3.0.

When your agent uses it

  • Tasks that involve Frontend development

Example prompts

  • “/create-ai-tool”

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Write the tool
  2. Create the tool context
  3. Add the toolset to all_tools in the ai_tools crate
  4. Add the context to ToolServiceContext
  5. Wire up env vars and service construction
  6. Update infra (if new env vars or AWS resources are needed)
  7. Rust checks
  8. Generate frontend types
  9. Check what frontend UI is needed
  10. Read existing tool UI for patterns
  11. Write the tool UI
  12. Frontend checks

What it can do on your machine

Read from SKILL.md and the folder at commit 49418e7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bun
    • cargo
    • tsc

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Create AI Tool loads about 1.6k tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 704 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from macro-inc/macro at commit 49418e7, republished under its AGPL-3.0 licence (© macro-inc). 704 words, ~1,553 tokens.

Download SKILL.mdSave it as .claude/skills/create-ai-tool/SKILL.md (or your agent's skills folder).
name
create-ai-tool
description
Build a new AI tool end-to-end — Rust implementation, toolset wiring, infra, schema generation, and frontend UI.

Create AI Tool

This skill walks through building a new AI tool from scratch. Before writing any code, read the design guide at crates/ai_toolset/TOOL_DESIGN.md and the framework docs/examples in crates/ai_toolset/src/lib.rs.

IMPORTANT: Never modify the crates/ai_toolset/ crate. It is the framework — you build tools that use it.

Step 1: Write the tool

Decide which domain crate the tool belongs in. Tools live at crates/<crate>/src/inbound/toolset/.

Study an existing tool for patterns:

  • crates/documents/src/inbound/toolset/ — tools: read_content.rs, read_metadata.rs, create_document.rs
  • crates/email/src/inbound/toolset/ — tools: send_email.rs, get_thread.rs, update_thread_labels.rs
  • crates/soup/src/inbound/toolset/ — tool: list_entities.rs
  • crates/call/src/inbound/toolset/ — call-related tools

Each tool is a struct that derives JsonSchema and Deserialize, with #[schemars(title = "...", description = "...")] on the struct and #[schemars(description = "...")] on each field. The struct implements AsyncTool<Context> from the ai_toolset crate.

Create a new file for your tool (e.g. my_tool.rs), add it as a mod in the toolset's mod.rs, and wire it into the toolset's AsyncToolSet::new().add_tool::<...>() chain.

Step 2: Create the tool context

If your tool needs dependencies (DB connections, service clients) that aren't already in an existing context, define a new context struct in the toolset's mod.rs. See crates/documents/src/inbound/toolset/mod.rs for the DocumentToolContext pattern.

The context must be Clone and derivable from the parent ToolServiceContext via FromRef.

If the tool's dependencies are already available in an existing context (e.g. it only needs Arc<ToolScribe>), you can use that context directly — no new struct needed.

Step 3: Add the toolset to all_tools in the ai_tools crate

Edit crates/ai_tools/src/lib.rs:

  • Import your toolset function and context type
  • Add .add_tool::<YourTool, YourContext>() or .add_subtoolset::<YourToolContext>(your_toolset()) to the all_tools() function

Step 4: Add the context to ToolServiceContext

Edit crates/ai_tools/src/tool_context.rs:

  • Add any new type aliases for your service implementations (follow the Tool* naming pattern)
  • Add your tool context field to the ToolServiceContext struct
  • Implement FromRef<ToolServiceContext> for your context if needed (or derive it — the struct uses #[derive(FromRef)])

Step 5: Wire up env vars and service construction

Edit crates/ai_tools/src/build_context.rs:

  • Add any new env vars to the env_var! or maybe_env_var! blocks
  • Construct your service/context in build_tool_service_context_from_env
  • Add it to the returned ToolServiceContext

Step 6: Update infra (if new env vars or AWS resources are needed)

Edit infra/packages/shared/src/ai_tools.ts:

  • Add new env vars to the envVars array in getAiToolsInfra()
  • Add any new secret ARNs, queue ARNs, or bucket ARNs to the respective arrays
  • Add any new Pulumi stack references needed to resolve the values

Step 7: Rust checks

Run from the repository root:

bash
cargo fmt
cargo clippy -p ai_tools
cargo test -p <your_domain_crate>

Fix any warnings or errors before proceeding.

Step 8: Generate frontend types

Run from apps/web/:

bash
bun gen-tools

This builds crates/ai_tools/src/bin/gen_tool_schemas.rs, generates crates/ai_tools/schemas/tools.json, and transpiles the schemas into TypeScript at apps/web/src/lib/service-clients/service-cognition/generated/tools/.

Show full SKILL.md (293 more words)Show less

Step 9: Check what frontend UI is needed

Run from apps/web/:

bash
bun check

This runs tsc --noEmit and will report type errors — specifically, the toolHandlers map in apps/web/src/lib/core/component/AI/component/tool/handler.tsx will be missing your new tool name. The errors tell you exactly what to implement.

Step 10: Read existing tool UI for patterns

The tool UI components live at apps/web/src/lib/core/component/AI/component/tool/. Study existing renderers:

  • Search.tsx — search results rendering
  • ReadContent.tsx / ReadMetadata.tsx — document tool UI
  • SendEmail.tsx — email tool UI
  • ListEntities.tsx — list display
  • Properties.tsx — property get/set tools
  • ListCallRecords.tsx / ReadCallRecord.tsx — call tools
  • BaseTool.tsx — shared base component

Each tool needs a handler object implementing ToolHandler (from ToolRenderer.tsx) with at minimum a render component. Use createToolRenderer to create it.

Step 11: Write the tool UI

  1. Create a new component file at apps/web/src/lib/core/component/AI/component/tool/YourTool.tsx
  2. Export a handler using createToolRenderer
  3. Register it in apps/web/src/lib/core/component/AI/component/tool/handler.tsx:
    • Import your handler
    • Add it to the toolHandlers map with the key matching your tool's schema title

Every tool renderer must show results. Use the expandable dropdown pattern from Search.tsx / ListEntities.tsx:

  • Use BaseTool (from BaseTool.tsx) as the wrapper. It accepts a response prop for expandable content.
  • Create const [isExpanded, setIsExpanded] = createSignal(false) to track open/closed state.
  • Access the response via ctx.response?.data (typed from the generated schema).
  • Show a status summary (e.g. hit count, "No Results") on the right side of the tool row.
  • Render a CaretRight toggle button (@icon/regular/caret-right.svg?component-solid) that rotates 90deg when expanded.
  • Pass the expanded content into BaseTool's response prop, gated on isExpanded().

For tools that return text/string results (not entity lists), render the response string in a <pre> or similar block inside the response prop. The key point: the response data must always be surfaced in the UI via the dropdown — never silently swallowed.

Step 12: Frontend checks

Run from apps/web/:

bash
bun format
bun check

Fix any remaining type or formatting errors.

© macro-inc, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/create-ai-tool of macro-inc/macro.

Open the folder on GitHubat commit 49418e7

Compare with similar skills

Create AI Tool next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Create AI Tool compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Create AI Tool this skillmacro-inc/macro4.6k—~1.6kAutomated safety check: PassAGPL-3.0
NEAR dApp Builderinternet-court/internet-court-skill6.4k1 repos~684Automated safety check: PassCustom licence
Electronmajiayu000/claude-skill-registry6661 repos~2.9kAutomated safety check: PassMIT
Webapp Buildersidequery/sidemantic129—~5.5kAutomated safety check: PassAGPL-3.0
Warp TUI UI Guidelineswarpdotdev/warp65k1 repos~1.8kAutomated safety check: PassAGPL-3.0
Trust Hmi ContractsjohannesPettersson80/trust-platform221—~611Automated safety check: PassApache-2.0

Similar skills

  • NEAR dApp Builder

    internet-court/internet-court-skill

    Scaffolds new NEAR dApps with create-near-app or adds NEAR wallet sign-in, contract calls and transaction signing to an existing React or plain JavaScript app.

    6.4k GitHub starsUsed in 1 repo~684 tokens
    Frontend & DesignAuto-check passed
  • Electron

    majiayu000/claude-skill-registry

    A skill your agent uses when building, hardening, or shipping a cross-platform Electron desktop app — main/renderer/preload process model, typed contextBridge IPC, locking down…

    666 GitHub starsUsed in 1 repo~2.9k tokens
    Frontend & DesignAuto-check passed
  • Webapp Builder

    sidequery/sidemantic

    Build interactive analytics webapps, demos, dashboards, or embedded app surfaces from Sidemantic semantic models using copyable component primitives and deterministic query inspection.

    129 GitHub stars~5.5k tokensUpdated today
    DatabasesAuto-check passed
  • Warp TUI UI Guidelines

    warpdotdev/warp

    Rules for writing UI code in Warp's headless TUI front-end with the cell-grid TuiElement library, kept separate from the pixel-based GUI app.

    65k GitHub starsUsed in 1 repo~1.8k tokens
    DevelopmentAuto-check passed
  • Trust Hmi Contracts

    johannesPettersson80/trust-platform

    Implement and review trust-platform HMI schema/value/write contracts with safety guardrails.

    221 GitHub stars~611 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • React Router Development

    remix-run/react-router

    Guides work on React Router apps by first identifying whether the app uses Framework, Data or Declarative mode, then loading the matching reference and the installed package docs.

    57k GitHub starsUsed in 1 repo~1.5k tokens
    Frontend & DesignAuto-check passed

More from macro-inc/macro

All 19 skills in this repo
  • Mintlify API

    macro-inc/macro

    Interact with the Mintlify REST API to manage deployments, trigger builds, and query documentation site metadata programmatically.

    4.6k GitHub starsUsed in 2 repos~333 tokens
    Auto-check passed
  • Add Tour

    macro-inc/macro

    Add or change an in-app feature tour (a view's guided flyover) in the web app.

    4.6k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Define Feature Flag

    macro-inc/macro

    Define a frontend feature flag with defineFlag and wire its readers.

    4.6k GitHub stars~780 tokensUpdated today
    Auto-check passed
  • Run App

    macro-inc/macro

    Run the Macro app on Cursor Cloud and pick up edits. An agent skill from macro-inc/macro.

    4.6k GitHub stars~712 tokensUpdated today
    Auto-check passed
  • Add SDK Endpoint

    macro-inc/macro

    Wrap a new backend endpoint in the TypeScript SDK (packages/sdk), or record it as skipped.

    4.6k GitHub stars~1k tokensUpdated today
    Auto-check: notes
  • Enforce hexagonal architecture in the Rust backend. An agent skill from macro-inc/macro.

    4.6k GitHub stars~3k tokensUpdated today
    Auto-check passed

Works with

Questions about Create AI Tool

What does Create AI Tool do?

Build a new AI tool end-to-end — Rust implementation, toolset wiring, infra, schema generation, and frontend UI. Create AI Tool is an agent skill from macro-inc/macro. Build a new AI tool end-to-end — Rust implementation, toolset wiring, infra, schema generation, and frontend UI.

When should I use Create AI Tool?

Create AI Tool fits situations like: tasks that involve Frontend development.

How do I install Create AI Tool in Claude Code?

Run `npx skills add macro-inc/macro --skill create-ai-tool -a claude-code`. Or copy the skill folder (.agents/skills/create-ai-tool in macro-inc/macro) into .claude/skills/create-ai-tool in your project. Claude Code loads it when a task matches its description.

How do I install Create AI Tool in Codex?

Run `npx skills add macro-inc/macro --skill create-ai-tool -a codex`. Or copy the skill folder (.agents/skills/create-ai-tool in macro-inc/macro) into .agents/skills/create-ai-tool in your project. Codex loads it when a task matches its description.

Can I use Create AI Tool in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add macro-inc/macro --skill create-ai-tool -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/create-ai-tool, .gemini/skills/create-ai-tool, .github/skills/create-ai-tool and .opencode/skills/create-ai-tool in your project.

What does Create AI Tool need to run?

Going by SKILL.md and its folder, Create AI Tool needs the command-line tools its instructions call (bun, cargo and tsc).

Does Create AI Tool access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Create AI Tool safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Create AI Tool use?

Create AI Tool is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Create AI Tool use?

About 1.6k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Create AI Tool?

Skills that share tags, products or a category with Create AI Tool: NEAR dApp Builder (internet-court/internet-court-skill, 6.4k stars), Electron (majiayu000/claude-skill-registry, 666 stars), Webapp Builder (sidequery/sidemantic, 129 stars) and Warp TUI UI Guidelines (warpdotdev/warp, 65k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Create AI Tool?

macro-inc (a GitHub organization) maintains it in macro-inc/macro, which has 4,590 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 8, 2026.

Source: macro-inc/macro on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.