add-tool

Create OhMyCode tools with JSON Schema parameters and pytest validation.

131|4|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/AlphaLab-USTC/OhMyCode --skill add-tool-alphalab-ustc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-tool
Source: https://github.com/AlphaLab-USTC/OhMyCode/tree/main/.agents/skills/add-tool
Command: npx skills add https://github.com/AlphaLab-USTC/OhMyCode --skill add-tool-alphalab-ustc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you extend OhMyCode with a new tool when you need the assistant to perform a capability it does not yet have, such as querying databases, calling external utilities, or automating a project-specific action.

Core Features & Use Cases

  • Tool Design Guidance: Defines the tool name, description, parameters, and concurrency safety before implementation.
  • Implementation Workflow: Shows how to create the tool file from the template, wire in the logic, and keep it compatible with OhMyCode's auto-import system.
  • Test-Driven Validation: Includes a repeatable testing workflow so the new tool is verified before use.
  • Use Case: If a user wants the assistant to run SQL queries or manage a Docker action, this Skill guides the full process from specification to tests.

Quick Start

Use the add-tool skill to help me design and implement a new tool for OhMyCode that runs SQL queries.

Frequently Asked Questions about add-tool

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a custom tool to my Python assistant for shell automation?

To add a custom tool for shell automation, you define the tool specification, edit the source files from a template, define JSON Schema parameters, and validate the behavior with pytest before use.

What's the best way to extend an AI assistant with database query capabilities?

The best way to extend an assistant with database query capabilities is to design the tool name and parameters, implement the logic compatible with an auto-import system, and verify the behavior with pytest.

Do I need to define JSON Schema parameters when creating a custom assistant tool?

Yes, you need to define JSON Schema parameters when creating a custom tool to specify the input structure, ensure concurrency safety, and wire the logic into the tool source files correctly.

How does test-driven validation work for new Python tooling extensions?

Test-driven validation for new Python tooling uses a repeatable pytest workflow to verify the new tool's behavior, ensuring the implementation meets the original specification before deployment.

Can I use pytest to validate project-specific integrations before wiring them into the assistant?

Yes, you can use pytest to validate project-specific integrations by running a repeatable testing workflow that checks the tool logic and parameters before the tool is integrated.

Why does my custom assistant tool fail to auto-import after implementation?

Custom assistant tools fail to auto-import when the implementation is not kept compatible with the auto-import system, making it necessary to follow the template structure and validate with pytest.