Logo de Create Tool

Create Tool

Comunidade
lploc94
create-tool

Use to create or customize a Raw tool plugin or executable variable provider through files or dashboard. Covers contracts, registration and verification; use create-package to distribute components.

Add to TypingMind

Visão geral

Publicado porlploc94
Repositórioraw-cli
Nome da habilidadecreate-tool
Estrelas
107
Forks
14
Arquivos incluídos
2
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 2

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por lploc94 no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Create Tool no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/lploc94/raw-cli/tree/main/examples/skills/create_tool
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lploc94/raw-cli.git /tmp/raw-cli
mkdir -p .claude/skills
cp -r /tmp/raw-cli/examples/skills/create_tool .claude/skills/create-tool
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Create Tool em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Create Tool automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Create Tool não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Create a Raw tool plugin

Create callable tools or executable variable providers; reusable instructions belong in create_skill. Tools have manifests and ESM handlers; providers are scripts returning configured data.

Read references/packages.md for sharing and references/dashboard.md for browser authoring with read_file.

Choose the task and contract

Establish agent/inputs/output/side effects; diagnose failures from the exact error.

Define inputs/results/limits/failures in English. Preflight does not make I/O transactional: document partial execution and cwd/path semantics. Reuse suitable existing tools.

Layout and schema

  • agent/<id>: tools/<id>/ beside the selected config; portable with that directory.
  • local/<id>: $XDG_CONFIG_HOME/raw/tools/<id>/, otherwise ~/.config/raw/tools/<id>/.
  • builtin/<id>: installed package-owned tools. Fork examples/tools into a user root; rename folder/manifest/name together.

--config changes the agent root, not the global root. Folder/manifest id matches [a-z][a-z0-9_-]*; model-visible name matches [A-Za-z_][A-Za-z0-9_-]{0,63} and must be unique among selected tools. version is a three-component numeric string.

tool.json requires api_version:2, id, version, name, nonempty description, object input_schema, and entry:"./index.mjs". Optional condition_sources, effects_schema and panels declare inspection and UI capabilities. Schema defaults to draft 2020-12; $schema can select draft-07. Remote $ref and $async are unsupported. Use explicit properties, required fields and additionalProperties:false. Manifests/schemas are validated before handler imports; unselected code stays inert. Symlinks cannot escape their root/folder.

index.mjs exports async handler(args, context) and may export synchronous validateArgs(args), returning an error string or undefined. Semantic preflight runs before approval and execution. context.cwd resolves paths; context.signal communicates abort. Return {content:[...], isError?:boolean, code?:string}; content may be {type:"text",text}, {type:"json",value} or a supported typed image. A JSON value must be serializable. Keep imports free of side effects. The handler runs with Raw's OS permissions; cwd and approval rules are not filesystem isolation.

Working example

Prefer one action per call with a flat schema, and put a complete example call in the description: models repeat a simple call more reliably than they fill a batch array. For local/append_notes, create tool.json in the global tools/append_notes/ folder:

json
{
  "api_version": 2,
  "id": "append_notes",
  "version": "1.0.0",
  "name": "append_notes",
  "description": "Append one newline-terminated note to a file, creating the file and its parent directories if needed. Example: {\"path\":\"notes.txt\",\"text\":\"Ship the docs\\n\"}. Relative paths use the session cwd. The result names the file and the bytes appended. To add notes to several files, make several calls.",
  "input_schema": {
    "type": "object",
    "properties": {
      "path": { "type": "string", "minLength": 1, "description": "File path, absolute or relative to the session cwd." },
      "text": { "type": "string", "minLength": 1, "description": "The note, ending with a newline." }
    },
    "required": ["path", "text"],
    "additionalProperties": false
  },
  "entry": "./index.mjs"
}

Create its index.mjs. The semantic validator rejects a note without a final newline before anything is written, and its error shows a valid call. The handler checks abort before writing and returns one text line:

js
import { appendFile, mkdir } from "node:fs/promises";
import { dirname, resolve } from "node:path";

export function validateArgs(args) {
  if (typeof args.path !== "string" || !args.path.trim()) return "path must be a nonempty string";
  if (typeof args.text !== "string" || !args.text.endsWith("\n"))
    return 'text must end with a newline, for example {"path":"notes.txt","text":"Ship the docs\\n"}';
  return undefined;
}

export async function handler(args, context) {
  if (context.signal?.aborted) return { isError: true, code: "aborted", content: [{ type: "text", text: "aborted" }] };
  const path = resolve(context.cwd, args.path);
  await mkdir(dirname(path), { recursive: true });
  await appendFile(path, args.text, "utf8");
  return { isError: false, content: [{ type: "text", text: `Appended ${Buffer.byteLength(args.text)} bytes to ${args.path}` }] };
}

Append the exact ID to agents.<name>.tools.use, preserving existing entries and order. This is an agent fragment, not a complete config:

json
{ "tools": { "use": ["builtin/read_file", "local/append_notes", "builtin/bash"] } }

Use agent/append_notes for a config-adjacent folder.

Implement and verify

  1. Inspect the target agent's selected names and policy. Create the manifest and handler in the chosen root. Validate the whole input before side effects; handle aborts and genuine runtime failures without claiming rollback.
  2. Back up existing config, add the exact selection, and keep config mode 0600. Run raw config list or raw --config PATH config list for static config validation; this alone does not import or execute the plugin.
  3. With the installed library, use loadConfig({configPath,requireModel:false}), then createRuntimeTools({runtime,cwd}). Dispatch the model-visible name through tools.registry.dispatch(name,args,{cwd,maxOutputBytes:8192}); close tools.mcp in finally. This verifies registration/schema/preflight without inference.
  4. For this example, first send a note without a final newline; confirm the validation error and that no file was created. Then send {"path":"notes.txt","text":"first\n"} and verify the file contents and the result Appended 6 bytes to notes.txt. Repeat to check append behavior, reject unknown properties, and test abort when relevant. Host output caps still apply.
  5. Add tools.rules only for requested policy. Match the canonical ID, e.g. {"match":"local/append_notes","effect":"ask"}. Last matching rule wins; unmatched calls run, and -y does not bypass explicit ask. Only ask accepts a when predicate on a schema-bound string path. Verify a requested rule with harmless inputs.

Check failed loads for ID/entry/exports/schema/containment. Report partial runtime effects. Selected source/schema edits rotate generated cache keys on resume; unselected edits do not. Report paths/registration/checks.

Variable consumers and providers

For a configured data value, write an executable provider instead of a tool manifest. Save host.mjs beside the config:

js
import { hostname } from "node:os";
let input = "";
for await (const part of process.stdin) input += part;
const request = JSON.parse(input);
if (request.protocol_version !== 1) throw new Error("unsupported protocol");
process.stdout.write(JSON.stringify({value:hostname()}) + "\n");

Root var_providers.host={command:"node",args:["host.mjs"]} and vars.host={description:"Host name",access:"read",type:"string",source:{kind:"provider",name:"host"}}; append host to agent.vars. Select builtin/list_vars and builtin/read_var for discovery/reads. Test raw --config PATH vars get host. No model call is needed. Provider receives {protocol_version:1,name,params}; params come from config. Output exactly {value,observed_at?} JSON, exit 0; logs stderr. Raw bounds time/bytes. Paths/cwd default to config directory; configure_raw covers limits/cache/source schema.

Selected handlers receive context.vars: list(), read(name,{signal}), validateEnvRefs(refs), resolveEnv(refs,{signal}). Pass selected scalar values to a child through env, not shell interpolation; code can still print them. Respect context.signal. Unselected names and use-only reads fail. Bash and process start support env_refs; MCP has no implicit vars rewriting.

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Create Tool faz?

Use to create or customize a Raw tool plugin or executable variable provider through files or dashboard. Covers contracts, registration and verification; use create-package to distribute components.

Por que usar Create Tool no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Create Tool é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Create Tool no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/lploc94/raw-cli/tree/main/examples/skills/create_tool. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Create Tool?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Create Tool?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Create Tool com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Create Tool é gratuita?

Sim. A habilidade é publicada no GitHub por lploc94 sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇