opencode-build-tool

opencode-build-tool is a skill for Claude Code, Codex from pantheon-org/tekhne. It costs 121 tokens per session (907 once invoked), scanned A, original, MIT.

A toolkit for building custom OpenCode tools and plugins with the OpenCode software libraries.

In plain words
What is it for?
Use it to create custom tools, execution handlers, event hooks, CI scripts, session controls, or integrations with external APIs.
Why use it?
It lets developers add agent-callable capabilities or automate OpenCode sessions when built-in tools are not enough.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md; mentions OpenCode.

Good fit Use it to create custom tools, execution handlers, event hooks, CI scripts, session controls, or integrations with external APIs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pantheon-org/tekhne/build-tool
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pantheon-org/tekhne --skill build-tool
Clone the repo
git clone --depth 1 https://github.com/pantheon-org/tekhne

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for opencode-build-tool

README.md
[![agentmods](https://agentmods.dev/badge/skills/pantheon-org/tekhne/build-tool/github.svg)](https://agentmods.dev/skills/pantheon-org/tekhne/build-tool)
Your own site
<a href="https://agentmods.dev/skills/pantheon-org/tekhne/build-tool"><img src="https://agentmods.dev/badge/skills/pantheon-org/tekhne/build-tool/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for opencode-build-tool

Your own site · 80×15
<a href="https://agentmods.dev/skills/pantheon-org/tekhne/build-tool"><img src="https://agentmods.dev/badge/skills/pantheon-org/tekhne/build-tool.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 907 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 10
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00121 $0.00907
Opus 5.5 $0.00048 $0.00363
Sonnet 5.5 $0.00024 $0.00181
Haiku 4.5 $0.00012 $0.00091

Measured 3mo ago against content hash 837842f8fa12, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

opencode-build-tool scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (references/basic-tool.ts, references/full-plugin.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

async execute({ url }) { return await fetch(url).then(r => r.text()) }
skills/agentic-harness/opencode-toolkit/build-tool/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenCode SDK Development

Quick Start: Custom Tool in 3 Steps

  1. Create .opencode/tool/my-tool.ts:
import { tool } from "@opencode-ai/plugin"

export default tool({
  description: "Brief description of what the tool does",
  args: {
    query: tool.schema.string().describe("Search query")
  },
  async execute({ query }, { abort }) {
    return `Result for: ${query}`
  }
})
  1. Restart OpenCode — tools are auto-discovered.
  2. Filename = tool name: my-tool.ts → my-tool.

Mindset

  • @opencode-ai/plugin — Tools + Hooks: Add LLM-callable tools, intercept execution, react to events
  • @opencode-ai/sdk — Client API: Control OpenCode from external scripts, session management

When to use: Adding new capabilities the agent doesn't have, automating OpenCode from CI/scripts, or integrating external APIs as first-class tools. When NOT to use: Built-in tool exists (client.tool.list()). Need shell (use $ from Bun). Logic belongs in system prompt (AGENTS.md). Need MCP.

Full decision guide in advanced-patterns.md.

Tool File Locations

.opencode/tool/*.ts          # project-specific
~/.config/opencode/tool/*.ts  # global

Multiple named exports per file → multiple tools: filename_exportname

Anti-Patterns

NEVER return non-string from execute. WHY: The tool runtime expects a string response; returning an object throws at runtime.

// BAD - throws at runtime
async execute({ query }) { return { results: [] } }
// GOOD - serialize first
async execute({ query }) { return JSON.stringify({ results: [] }) }

NEVER import { tool } from "@opencode-ai/sdk". WHY: The SDK package has no tool() export. The tool factory is only in @opencode-ai/plugin.

// BAD - import error at runtime
import { tool } from "@opencode-ai/sdk"
// GOOD
import { tool } from "@opencode-ai/plugin"

NEVER ignore the abort signal in long-running operations. WHY: Ignoring abort leaves processes dangling after the user cancels, consuming resources.

// BAD - dangling fetch after cancel
async execute({ url }) { return await fetch(url).then(r => r.text()) }
// GOOD - propagate abort
async execute({ url }, { abort }) { return await fetch(url, { signal: abort }).then(r => r.text()) }

Read the full file on GitHub · 92 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 92 lines · 121 tokens per session scan A 837842f8fa12

Subscribe to this mod's changes

opencode-build-tool is a skill published in the GitHub repository pantheon-org/tekhne (10 stars, last pushed 2d ago), licensed MIT. It adds 121 tokens to every session and 907 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

opencode-build-tool compared with skills from other repositories

opencode-build-tool next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
opencode-build-toolpantheon-org/tekhneSkill102d agoMITA121Claude Code, Codex
agent-platform-model-registrygoogle/skillsSkill25kyesterdayApache-2.0A60Claude Code, Codex
google-cloud-solution-agentic-analytics-spark-knowledge-cataloggoogle/skillsSkill25kyesterdayApache-2.0A132Claude Code, Codex
viteantfu/skillsSkill6.1k5d agoMITA49Claude Code, Codex
add-analyticsLeoYeAI/openclaw-master-skillsSkill2.2k10d agoMITA32Claude Code
remotion-best-practicesguanyang/open-agent-hubSkill1.0kyesterdayMITA116Claude Code
cwv-optimizeradobe/skillsSkill342todayApache-2.0A112Claude Code