Creating a new tool
Guides agents through scaffolding, implementing, and integrating a new tool into a Hugo site build process.
What this file does
Guides agents through scaffolding, implementing, and integrating a new tool into a Hugo site build process.
When to use it
- Creating scaffolding and metadata for a new tool
- Integrating a new tool into the site build process
- Adding a tool file with inline JS/CSS or Python
- Verifying tool page renders and data generation
Assumes this stack
name: new-tool description: A set of resources to help agents create new tools and integrate them into the site build process for successful deployment
Creating a new tool
For guidance on what a tool is and design guidelines for tools in this repository, please refer to the Tool Design Guidelines section of Tools Repository Instructions.
When to use this skill
Use this skill when you need to:
- Create the scaffolding and metadata for a new tool
- Integrate the new tool into the site build process
Overview
Each "tool" is a Hugo page bundle within the content/tools/ directory.
The bundle contains a file (usually HTML/JS) that performs a specific function or task and the supporting metadata and documentation to make it easy to find, use, and understand.
The entire process of creating a new tool and getting it integrated into the site can be summarized in the following phases/steps:
Prep
-
Clarify requirements
- Confirm the tool’s purpose, inputs/outputs, and expected behavior.
- If not already instructed, decide the primary language (
htmlorpythonor other; strong bias towards HTML/JS).
-
Create the tool bundle
If the hugo binary is available, the steps below can be automated with the command:
# This assumes that this will be a HTML tool; adjust `html` to `python` or other as needed
❯ hugo new tools/html/new-tool-slug-here
Content dir "$repoRoot/content/tools/html/new-tool-slug-here" created
Else, follow these manual steps:
-
Create folder:
content/tools/<language>/<new-tool-slug-here>/. -
Add
index.mdwith front matter (title/description/tags/resources). See existing tools for examples.- The
datefield only needsYYYY-MM-DD(time is not required). - Hugo skips future-dated pages, so use the
datecommand to confirm the current date before setting it.
Regardless of method used to create the bundle, ensure the front matter includes:
- The
-
Add tool file as a page resource:
resources: - name: tool-file src: tool.html(ortool.py).
-
Add icon as a page resource if instructed to create one or one was provided:
resources: - name: tool-icon src: images/tool-icon.png.
Implement the tool
-
Build the tool file
- For HTML/JS tools, create
tool.htmlwith inline JS/CSS as per design guidelines. - Include the local tracking snippet: add
<script src="/analytics.js"></script>before</body>so usage is tracked. - For Python tools, create
tool.pywith necessary functionality and PEP-723 header.
- For HTML/JS tools, create
-
Test the tool
- For HTML tools, open
tool.htmlin a browser to verify functionality.playwrightcan be used for this if automated testing is needed.
- Run Python tools locally to ensure correct behavior.
pytestcan be used for automated testing if needed.- If tests are written for the tool, they should be included in the main tool file for maximum portability.
- For HTML tools, open
-
Add documentation
- Write a brief description in
index.md. - Include usage instructions, examples, and any relevant details.
- Write a brief description in
-
Add icon/image
- If an icon/image was provided or created, add it to
images/within the tool bundle. - When appropriate, issue a short creative brief to guide a designer, then generate a simple SVG icon asset and add it to
images/. - Reference it in front matter as
tool-icon. - Add
{{< tool-image >}}toindex.mdso the icon renders on the page.
- If an icon/image was provided or created, add it to
Integrate the tool into the site
-
Add page content
- Use
{{< tool-link >}}for links. - Use
{{< tool-image >}}to render the icon. - For Python tools, use
{{< py-usage >}}inside a fenced code block.
- Use
-
Test locally
- Run
hugo serverand verify the tool page renders. - Confirm the tool file loads and functions per spec.
- Run
-
Generate data
- Run the
ci/build_tools_data.pyto refreshdata/tools.yaml. - Confirm new entry is present and correct.
- Run the
-
Verify landing page
- Check that
hugo server -Ddoes not return any errors.
- Check that
What's inside
4 phases (Prep, Implement, Integrate, Verify) with 12 steps and 3 code examples
Change this for your project
- Replace
content/tools/with your own tools directory path - Replace
ci/build_tools_data.pywith your own data generation script - Replace
data/tools.yamlwith your own data file path - Replace
../../../AGENTS.md#tool-design-guidelineswith your own design guidelines reference
Where it goes
Save as SKILL.md inside a skill folder. Loaded when the agent selects that skill.
Worth borrowing
- Using Hugo page bundles to encapsulate a tool's files, metadata, and documentation
- Including a local analytics tracking snippet before
</body>for usage monitoring - Embedding tests inside the main tool file for portability
Related Documents
Video Script
Guides an AI to write ready-to-film two-column AV scripts with hooks, segment breakdowns, B-roll cues, text overlays, timing estimates, and shot lists.
Image Generation Skill
Provides Python functions for generating, editing, and transforming images via DALL-E 3, FLUX (Replicate/fal.ai), and local Stable Diffusion, plus utilities and prompt engineering helpers.
AI Artist — Engineering Specification
Defines a 21-section engineering specification for a prompt construction skill, covering contracts, deterministic design, error taxonomy, and production readiness.
Karis
Turns an AI agent into a marketing CMO with brand analysis, SEO audits, Reddit monitoring, and viral tweet optimization via CLI or API.