self-skill

self-skill is a skill for Claude Code, Codex from JansenAnalytics/claudex. It costs 56 tokens per session (904 once invoked), scanned A, original, MIT.

Meta-skill for detecting when a solved problem is worth packaging as a reusable skill, then scaffolding it. Runs automatically after completing any non-trivial task. Also use when explicitly asked to create, draft, or propose a new skill from something just built.

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/jansenanalytics/claudex/self-skill
Any agent
npx skills add JansenAnalytics/claudex --skill self-skill
Clone the repo
git clone --depth 1 https://github.com/JansenAnalytics/claudex

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/jansenanalytics/claudex/self-skill.svg)](https://agentmods.dev/skills/jansenanalytics/claudex/self-skill)
Your own site
<a href="https://agentmods.dev/skills/jansenanalytics/claudex/self-skill"><img src="https://agentmods.dev/badge/skills/jansenanalytics/claudex/self-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 904 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00056 $0.00904
Opus 5 $0.00028 $0.00452
Sonnet 5 $0.00011 $0.00181
Haiku 4.5 $0.00006 $0.00090

Measured today against content hash cc47c4783e39, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

self-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 today.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/draft-skill.sh), 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.

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.

skills/self-skill/SKILL.md · 103 lines

How it starts

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

Self-Skill — Autonomous Skill Creation

When This Runs

Automatically — after every non-trivial task, run the 5-question filter mentally:

  1. Will this come up again?
  2. Did I have to look something up or think hard?
  3. Did I write more than 20 lines of non-trivial code?
  4. Does it involve a specific tool/API with non-obvious usage?
  5. Would the user benefit from knowing how to trigger this?

2+ yes answers → create or propose a skill.

See references/heuristics.md for the full decision framework.


Improve an Existing Skill (patch-on-friction)

Creating skills is only half the loop — maintaining them matters just as much. Right after you used a skill this turn, run a quick friction check:

  1. Missing steps — did you have to do something the skill didn't mention?
  2. Outdated / wrong — a stale command, wrong path, or wrong flag?
  3. Boilerplate — did you hand-write something the skill could have provided?
  4. Unclear — did you misread an instruction that should be clearer?

2+ yes → patch it now. Edit that skill's SKILL.md with the smallest diff that fixes it, add/refresh a patched: YYYY-MM-DD line in the frontmatter, and keep it to one skill per turn (don't go on a refactor spree mid-task). Don't wait to be asked — an unmaintained skill is a liability.

The self-edit gate (a PostToolUse hook) automatically audits every SKILL.md you edit — frontmatter, ≤15 KB size, external-path leaks, and secrets — and warns you if a patch breaks something. So patch freely; the gate is your safety net.


Scaffold a New Skill

bash ${CLAUDE_SKILLS_DIR:-$HOME/.claude-agent/.claude/skills}/self-skill/scripts/draft-skill.sh <name> \
  --desc "what it does in plain language" \
  --resources "scripts,references"

This creates the full directory structure and pre-fills SKILL.md.


Full Skill Creation Checklist

When creating a skill (auto or on request):

[ ] 1. Run draft-skill.sh to scaffold the structure
[ ] 2. Write SKILL.md — description, triggers, quick reference
[ ] 3. Write scripts/ — working, tested, standalone
[ ] 4. Write references/ — detailed docs for complex topics
[ ] 5. Test all scripts before documenting them
[ ] 6. Write <skill-name>-guide.md in workspace (plain language, user-facing)
[ ] 7. Send guide as Telegram file attachment
[ ] 8. Paste raw guide markdown in chat — ONE continuous code block (split max 2 if too long)
[ ] 9. Commit: git add -A && git commit -m "feat: add <name> skill"

Read the full file on GitHub · 103 lines

Files

What ships with it

2 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.

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. today First seen · 103 lines · 56 tokens per session scan A cc47c4783e39

Subscribe to this mod's changes

self-skill is a skill published in the GitHub repository JansenAnalytics/claudex (5 stars, last pushed 2mo ago), licensed MIT. It adds 56 tokens to every session and 904 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories