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.
npx skills add squadcodercom/squadcoder --skill self-extendgit clone --depth 1 https://github.com/squadcodercom/squadcoderWrote 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.
[](https://agentmods.dev/skills/squadcodercom/squadcoder/self-extend)<a href="https://agentmods.dev/skills/squadcodercom/squadcoder/self-extend"><img src="https://agentmods.dev/badge/skills/squadcodercom/squadcoder/self-extend/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.
<a href="https://agentmods.dev/skills/squadcodercom/squadcoder/self-extend"><img src="https://agentmods.dev/badge/skills/squadcodercom/squadcoder/self-extend.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00056 | $0.00973 |
| Opus 5 | $0.00028 | $0.00487 |
| Sonnet 5 | $0.00011 | $0.00195 |
| Haiku 4.5 | $0.00006 | $0.00097 |
Grade D, and why
self-extend scanned grade D with 3 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 6d 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
if (args.command.includes("sudo")) return "Error: sudo not allowed" Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
if (input.tool === "bash" && output.args.command?.includes("rm -rf /")) { Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
import { execSync } from "child_process" This is a copy
91% identical to self-extend — 22 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Self-Extension
Overview
You can extend your own capabilities by writing files to .squadcoder/. Changes to tools, hooks, and skills take effect immediately (next turn) — no restart needed.
Creating Tools
Write to .squadcoder/tools/<name>.ts:
import { tool } from "@squadcoder/plugin"
export default tool({
description: "What this tool does",
args: {
param1: tool.schema.string().describe("Parameter description"),
},
async execute(args, ctx) {
// ctx.directory — project root
// ctx.worktree — git worktree root
// ctx.abort — AbortSignal
return `Result: ${args.param1}`
},
})
Multiple tools per file: use named exports instead of default.
Creating Hooks
Write to .squadcoder/hooks/<name>.ts — export a Hooks object:
export default {
"tool.execute.before": async (input, output) => {
if (input.tool === "bash" && output.args.command?.includes("rm -rf /")) {
output.cancel = true
output.cancelReason = "Blocked dangerous command"
}
},
"experimental.chat.system.transform": async (input, output) => {
output.system.push("Additional instruction here.")
},
}
Hook Events
| Event | Capability |
|---|---|
tool.execute.before |
Modify args or cancel=true to block |
tool.execute.after |
Modify tool output |
tool.definition |
Modify tool description/parameters |
chat.params |
Modify temperature, topP, maxOutputTokens |
experimental.chat.system.transform |
Append to system prompt |
experimental.chat.messages.transform |
Modify message list sent to LLM |
permission.ask |
Auto-allow/deny permission requests |
shell.env |
Inject environment variables |
Tool Override
A custom tool with the same id as a built-in replaces it:
// .squadcoder/tools/bash.ts — overrides built-in bash
import { tool } from "@squadcoder/plugin"
import { execSync } from "child_process"
export default tool({
description: "Shell with safety checks",
args: { command: tool.schema.string() },
async execute(args, ctx) {
if (args.command.includes("sudo")) return "Error: sudo not allowed"
return execSync(args.command, { encoding: "utf-8", cwd: ctx.directory })
},
})
What ships with it
4 files 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.
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.
- 6d ago First seen · 132 lines · 56 tokens per session scan D f1ab8fee4ee5
self-extend is a skill published in the GitHub repository squadcodercom/squadcoder (11 stars, last pushed 2mo ago), licensed MIT. It adds 56 tokens to every session and 973 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it D with 3 findings (asks for root, recursive force delete, runs shell commands). It is 91% identical to self-extend, differing in 22 lines, and is treated as a copy.
Other skills, from other repositories
grade-and-fix-daedalus
How to grade a Daedalus run (or pasted agent transcript), root-cause the failure, and ship the fix to Daedalus CORE as a stacked PR — without modifying the prompt-vault sandbox (read-only grading). Covers recurring bug archetypes (Unicode punctuation patch mismatch, syntax-vs-type mislabel, emoji box misalignment…
add-slash-command
How to add a new slash command to Daedalus (src/commands), including the docs-sync step that breaks CI if skipped.
fix-typescript-build
How to fix a failing tsc/npm run build (type-check) run in a project, batching fixes into sprints to preserve context.
repo-scan
Fast orientation for a new codebase.
safe-refactor
Refactor checklist with guardrails.
rework-rate
Measure and interpret PR rework rate — the emerging 5th DORA metric.