agentleFS
nordinitnordinit/agent-hq/skills/create-tool/SKILL.md

create-tool

Skill1 starsChanged 48 days agoMITView on GitHub

Create or repair Agent HQ capability tools in the Tools registry. Use when adding a new tool, fixing a broken tool record, updating a tool’s schema/permissions/tags, or preventing malformed tool payloads in Agent HQ. Especially useful when a user asks to create a tool for agents to use in the Capabilities tab.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. VapiAI/skills★ 69same name
    2. awaku7/agentcli★ 12same name
    3. timohaa/scopewalker-mcp★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository7 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 16 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create Agent HQ tool records carefully.

    line 8
  2. Distinctive:

    Read a few live tool records from the Agent HQ API before writing a new one.

    line 18
  3. Distinctive:

    Use existing healthy tools as the schema reference, not memory.

    line 20
  4. Distinctive:

    Always populate the required tool fields

    line 22
  5. Distinctive:

    Do not double-encode either field

    line 36
  6. Distinctive:

    Before writing, validate that:

    line 37
  7. Distinctive:

    Prefer one atomic tool over a fragile multi-step operator sequence

    line 42
  8. Distinctive:

    Keep destructive power narrow and explicit

    line 43
  9. Distinctive:

    Add input validation inside the tool script, not only in the schema

    line 44
  10. Distinctive:

    Add locking or idempotence when multiple agents could collide

    line 45
  11. Distinctive:

    Prefer structured JSON success/error output when the tool will be consumed by agents

    line 46
  12. Distinctive:

    After creating or updating the tool, verify it live

    line 48
  13. Very specific:

    If the tool targets the Capabilities UI, confirm the returned shape would not break tags.map(...) style consumers

    line 52
  14. Distinctive:

    Before creating or updating a tool, verify this checklist:

    line 56
  15. Distinctive:

    When reporting back after creating/updating a tool, include:

    line 70
  16. Distinctive:

    Always round-trip parse what you are about to send before writing it.

    line 85
  17. Distinctive:

    avoid assuming environment variables exist unless you check them

    line 94
  18. Very specific:

    If you need an example pattern or a live-safe checklist, read references/tool-payload-checklist.md.

    line 98

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create Tool

Create Agent HQ tool records carefully. A malformed tool can break the Capabilities UI or leave agents with unsafe or unusable automation.

Workflow

  1. Resolve whether the request is for:
    • a brand new tool
    • an update to an existing tool
    • a repair of a malformed tool record
  2. Inspect existing tool shape first
    • Read a few live tool records from the Agent HQ API before writing a new one.
    • Confirm the exact payload format expected by the registry.
    • Use existing healthy tools as the schema reference, not memory.
  3. Always populate the required tool fields
    • name
    • slug
    • description
    • implementation_type
    • implementation_body
    • input_schema
    • permissions
    • tags
    • enabled
  4. Serialize fields exactly the way Agent HQ expects
    • input_schema must be stored as a JSON string representing an object schema
    • tags must be stored as a JSON string representing an array of strings
    • Do not double-encode either field
    • Before writing, validate that:
      • json.loads(input_schema) returns an object/dict
      • json.loads(tags) returns an array/list
  5. Validate tool safety and usability
    • Prefer one atomic tool over a fragile multi-step operator sequence
    • Keep destructive power narrow and explicit
    • Add input validation inside the tool script, not only in the schema
    • Add locking or idempotence when multiple agents could collide
    • Prefer structured JSON success/error output when the tool will be consumed by agents
  6. After creating or updating the tool, verify it live
    • Fetch the created tool back from the API
    • Confirm input_schema parses cleanly as an object
    • Confirm tags parses cleanly as an array
    • If the tool targets the Capabilities UI, confirm the returned shape would not break tags.map(...) style consumers

Required payload checklist

Before creating or updating a tool, verify this checklist:

  • name: human-readable label
  • slug: stable lowercase identifier, snake_case or project-standard slug
  • description: concise but specific purpose
  • implementation_type: one of the registry-supported values
  • implementation_body: the actual script/function handler body
  • input_schema: JSON string of a valid JSON Schema object
  • permissions: correct execution scope (read_only, read_write, exec, etc.)
  • tags: JSON string of string array
  • enabled: 1 or true unless intentionally disabled

Output standard

When reporting back after creating/updating a tool, include:

  • tool name
  • slug
  • whether it was created or updated
  • whether input_schema round-trip validation passed
  • whether tags round-trip validation passed
  • any cautions before assigning it to agents

Common failure mode to avoid

The most common Agent HQ tool creation mistake is double-encoding:

  • bad: input_schema saved as a JSON string of a JSON string
  • bad: tags saved as a JSON string of a JSON string
  • result: Capabilities UI can break with errors like t.map is not a function

Always round-trip parse what you are about to send before writing it.

When a tool is script-based

For bash tools:

  • use set -euo pipefail
  • validate required inputs early
  • return machine-readable JSON on failure when practical
  • guard shared resources with a lock when collisions are possible
  • avoid assuming environment variables exist unless you check them

Reference

If you need an example pattern or a live-safe checklist, read references/tool-payload-checklist.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.