publish-skill

publish-skill is a skill for Claude Code, Codex from opensquad-ai/opensquad. It costs 35 tokens per session (695 once invoked), scanned A, original, MIT.

A publishing guide for adding a local coding-agent skill to the public OpenSquad skill library. It explains the required SKILL.md format and common file-path and encoding problems.

In plain words
What is it for?
Use it to prepare a skill directory, check and fix its SKILL.md file, and publish the skill to the OpenSquad library.
Why use it?
It helps avoid publishing failures caused by incorrect paths, missing YAML frontmatter, or hidden UTF-8 BOM bytes at the start of a file.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/opensquad-ai/opensquad/publish-skill
Any agent
npx skills add opensquad-ai/opensquad --skill publish-skill
Clone the repo
git clone --depth 1 https://github.com/opensquad-ai/opensquad

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 publish-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/opensquad-ai/opensquad/publish-skill.svg)](https://agentmods.dev/skills/opensquad-ai/opensquad/publish-skill)
Your own site
<a href="https://agentmods.dev/skills/opensquad-ai/opensquad/publish-skill"><img src="https://agentmods.dev/badge/skills/opensquad-ai/opensquad/publish-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 695 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00035 $0.00695
Opus 5 $0.00017 $0.00347
Sonnet 5 $0.00007 $0.00139
Haiku 4.5 $0.00003 $0.00069

Measured 5d ago against content hash 08529b0ec91b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

publish-skill scanned grade A with 0 findings 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 5d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/skills/publish-skill/SKILL.md · 72 lines

How it starts

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

Purpose

Publish a local skill directory to the OpenSquad public skill library.

Prerequisites

  • You have a complete local skill directory containing a SKILL.md file.
  • The SKILL.md file must start with YAML frontmatter (delimited by ---).

Steps

Step 1: Create the SKILL.md file

In the skill directory, create SKILL.md in this format:

---
name: skill-name
description: Short description
version: 1.0.0
author: YourName
---

## Purpose
...

Step 2: ⚠️ Check for a BOM header (the most critical step!)

The filesystem.write_file tool on Windows automatically prepends a UTF-8 BOM (\xef\xbb\xbf) to written files, but the YAML parser used by publish_skill does not tolerate the BOM.

❌ Error symptom: SKILL.md must have YAML frontmatter delimited by --- ✅ Even when the file's visible content starts with ---, the actual file may begin with hidden BOM bytes.

Check for BOM:

python -c "data=open('SKILL.md','rb').read(); print('BOM:', data[:3]==b'\xef\xbb\xbf')"

Strip the BOM (if present):

python -c "data=open('SKILL.md','rb').read(); open('SKILL.md','wb').write(data[3:] if data[:3]==b'\xef\xbb\xbf' else data)"

Step 3: ⚠️ Use an absolute path (mandatory!)

The skill_dir argument of publish_skill must be an absolute path.

❌ Wrong: publish_skill(skill_dir="skills\\my-skill") — the filesystem tool performs internal path mapping, so a relative path may be remapped under workspace/, where the on-disk directory doesn't actually exist.

✅ Correct: publish_skill(skill_dir="C:\\path\\to\\project\\skills\\my-skill")

Step 4: Run the publish

agent_setup.publish_skill(skill_dir="absolute-path", overwrite=True)

Step 5: Activate

Once publish succeeds, call agent_setup.reload_plugins() or restart the Agent for the change to take effect.

Verification

  • After a successful publish, the response includes success: true along with the source and target paths.
  • Use agent_setup.list_skills() to confirm the skill appears in the list.

Read the full file on GitHub · 72 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 72 lines · 35 tokens per session scan A 08529b0ec91b

Subscribe to this mod's changes

publish-skill is a skill published in the GitHub repository opensquad-ai/opensquad (5 stars, last pushed 21d ago), licensed MIT. It adds 35 tokens to every session and 695 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.