Skill forge

From infinition/LaRuche · View interactive version

Skill forge is an AI agent skill from the GitHub repository infinition/LaRuche. Write a skill, or forge a script tool, so a solved problem survives.

How to use this skill

Skill file

Skill forge

A skill is a written procedure the agent can reopen later. When you solve something the

hard way, the fix is worthless unless it becomes a skill. This is how you write one from

inside a session.

Read skills/AUTHORING.md before creating one. It is the canon: what the frontmatter

does, why the description matters more than the body, and what a good body contains.

Reading

creating anything, to check the procedure does not already exist.

descriptions; the body is fetched on demand, so open the skill before following it.

Do not act from the description alone.

installing it is your job, not a question for the user.

Creating

skill_create requires name, description and body. It also accepts tools and

scripts, two optional arrays written into the frontmatter.

tools grants nothing and forbids nothing. It earns its place elsewhere: the tools whose

signatures reach you on a given turn are picked from the user's message, before any skill

is opened, so a skill's own tools are frequently absent. When the skill is opened, every

listed tool that is registered but missing from the turn is named back to you, with the

instruction to reach it through tool_call. Fill it with real tool names, and only real

ones: anything the registry does not know is dropped without a word.

  1. skill_list first. If something close exists, skill_patch it instead. Two

overlapping skills make the model hesitate and pick the wrong one.

  1. Choose name: lowercase, hyphens, no spaces. It becomes the folder name and the

handle used by skill_view.

  1. Write description: one sentence, 80 characters or fewer, starting with a verb,

naming the TRIGGER rather than the technology. The catalog drops everything after a

- , then everything after the first . , then cuts at 80 characters. Go over and

the model reads an amputated sentence. This single line is injected into the system

prompt on every turn, for every skill, and is the whole reason it will ever be opened.

  1. Write body as markdown following AUTHORING.md: what it achieves, prerequisites with

exact install commands, a numbered procedure where each step says how to verify it

worked, traps, failure modes.

  1. Call skill_create, then skill_view on the new name to confirm it round-tripped.

A skill you create is stored immediately and you can open it with skill_view by name

right away. It appears in the SKILL CATALOG of your prompt only from the next mission on,

because that catalog is assembled once at mission start to keep the cached prefix stable.

Its absence from the list is not a failure and must not trigger a second skill_create.

Editing

skill_patch takes name, old and new, and replaces an exact string.

and copy from its output rather than from memory.

until the fragment is unique.

fall back to recreating the skill, that loses the rest of the file.

For a rewrite too large to express as a patch, skill_file_write with skill set to the

skill name and path set to SKILL.md replaces the whole file.

Bundled files

A skill can carry scripts and data next to SKILL.md.

path is relative to the skill folder. Scripts belong under scripts/.

Forging your own tools

You are not limited to the built-in tools. When no tool does what you need, WRITE ONE.

Python, Node, a shell script: anything the machine can run. This is normal work, not a

last resort, and it does not require asking the user.

Three levels, in increasing cost. Take the cheapest that works.

1. A one-off script. Write it to a temp path and run it with shell_exec. For

something you will do once, stop here. Do not bundle or register it.

2. A script bundled in a skill. Use skill_file_write with path under scripts/

when the script IS the procedure: too long to inline, and only meaningful inside this

skill. It lands in skills/<name>/scripts/, and the skill body then says which script to

run and with which arguments. It stays inert until the skill is loaded, so it costs

nothing on turns where the skill is not in play.

3. A registered tool. When the capability is useful OUTSIDE this skill and you want

to call it by name like any built-in, register it as a Forged Tool with forged_tool_create.

It lands in its own folder, forged_tools/<name>/, with the manifest and

the script side by side, and it is callable from the moment it exists, with no skill

loaded. Full procedure in the extend-toolset skill. This is how a script you wrote today

becomes a tool available on every future turn.

The test between 2 and 3: must it work without anyone knowing the skill exists? Then it

is a Forged Tool. Does it only make sense inside the procedure you are writing? Then it is a

bundled script.

Rules for anything you write, at every level:

to the caller, and the agent then builds on a result that does not exist. This is the

single most damaging mistake in a self-written tool.

go to stderr.

the import you need. If a package is missing, install it: that is your job, not a

reason to stop. Record the install command in the skill's Prerequisites section so the

next run does not rediscover it.

baked in works exactly once, on one machine.

working directory, not the user's folder.

Only then register it or reference it from a skill body. Registering an untested script

hides the failure behind a tool name.

surprise nobody consented to.

When a script has proved itself, write the skill around it: the install command, the

invocation, what its output looks like, and what to do when it fails. That is the loop.

Solve it once, script it, register it, document it, and the next occurrence is one call.

Deleting

skill_delete with name. Use it for a skill that is wrong or fully superseded, not for

one that is merely unused. Confirm with skill_list afterwards: the entry must be gone

from the catalog, not just from disk.

Traps

nothing. Commit staged work with a message that explains why matches an intent.

prerequisites.commands and enabled are read. version, author, license,

platforms, tags are ignored by the runtime; adding them teaches the next reader

that metadata here is fiction.

skill_view while still appearing in skill_list.

to directories that do not exist here, and the failure is unreadable.

than a documented sequence, you want a Forged Tool. See the extend-toolset skill.

dashboard's parser used to reject the whole file over it. Put the description on one

line, which is also what skill_create writes.

Failure modes

skill_view returns nothing for a skill that skill_list shows. The name in the

frontmatter disagrees with the folder. Fix the frontmatter with skill_file_write.

A newly created skill never gets picked. The description does not describe a trigger,

or it overlaps another skill. Rewrite the description; the body is not the problem.

skill_patch keeps failing on an exact-looking string. Invisible difference: line

endings, a non-breaking space, or trailing whitespace. Copy the fragment from

skill_view output verbatim, or replace the whole file with skill_file_write.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.