create-m4-skill

create-m4-skill is a skill for Claude Code, Codex from hannesill/m4. It costs 69 tokens per session (879 once invoked), scanned A, original, MIT.

A guided process for creating skills for the M4 library, including their purpose, activation cues, source history, category, and level.

In plain words
What is it for?
Use it to document clinical ideas such as scores or patient groups, or M4 framework features, data structures, and workflows.
Why use it?
It helps contributors record enough background and structure for a new skill to be reviewed and reused.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Good fit Use it to document clinical ideas such as scores or patient groups, or M4 framework features, data structures, and workflows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hannesill/m4/create-m4-skill
View source ↗ hannesill/m4
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 hannesill/m4 --skill create-m4-skill
Clone the repo
git clone --depth 1 https://github.com/hannesill/m4

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 create-m4-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/hannesill/m4/create-m4-skill/github.svg)](https://agentmods.dev/skills/hannesill/m4/create-m4-skill)
Your own site
<a href="https://agentmods.dev/skills/hannesill/m4/create-m4-skill"><img src="https://agentmods.dev/badge/skills/hannesill/m4/create-m4-skill/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 create-m4-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/hannesill/m4/create-m4-skill"><img src="https://agentmods.dev/badge/skills/hannesill/m4/create-m4-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 879 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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 high

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 →

  • high Rogue Agent · line 208
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
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.00069 $0.00879
Opus 5.5 $0.00028 $0.00352
Sonnet 5.5 $0.00014 $0.00176
Haiku 4.5 $0.00007 $0.00088

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

Security

Grade A, and why

create-m4-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 1mo 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/m4/skills/system/create-m4-skill/SKILL.md · 52 lines

How it starts

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

Create an M4 Skill

The contributor supplies the knowledge; you write it in M4's skill format and test it. Read the format first: src/m4/skills/SKILL_FORMAT.md in an M4 checkout, otherwise the copy that python -c "import m4.skills, pathlib; print(pathlib.Path(m4.skills.__file__).with_name('SKILL_FORMAT.md'))" prints. It defines the frontmatter (including the optional kind), the body, PROVENANCE.yaml and the tiers.

Steps

  1. Location. In an M4 checkout (src/m4/skills/ exists), write to src/m4/skills/<clinical|system>/<name>/. Otherwise write to the user's skill folder (.claude/skills/<name>/, .agents/skills/<name>/, or wherever their agent reads skills) and tell them the skill is local only; contributing it takes a pull request to M4.
  2. Interview. Ask in one message for what you cannot infer: the concept and the questions it answers (they become the triggers), clinical or system, the source (published code, paper, or the contributor's own expertise) with URL and license, components and thresholds, the mistakes people make, 2-3 references, and the contributor's name and credentials. Every clinical fact must come from the contributor or a cited source; ask about gaps instead of filling them. Done when you can fill every required field of SKILL_FORMAT.md.
  3. SKILL.md. The description is the trigger: what the skill does first, then the words a user would say, one trigger per distinct case. In the body, put what every use needs first, then the gotchas that would otherwise give wrong results, then references; leave out what a capable model already knows. Keep the body dataset-agnostic. Dataset SQL goes in scripts/, one file per table it builds, named after it (sofa.sql, kdigo_stages.sql), with a folder per dataset when there are several (scripts/mimic-iv/charlson.sql).
  4. Test the example. Write the example query or code yourself and run it on a usable dataset ("prepared": true in m4 list-datasets --json) with m4 query --dataset <name> --sql "..." or execute_query. Show the contributor the output and fix the example until it runs and they confirm the result. mimiciv_derived exists only on full MIMIC-IV after m4 init-derived. If no dataset is usable, tell the contributor the example is untested; never download or initialise data yourself.
  5. PROVENANCE.yaml. created holds the contributor's name and credentials, the role (authoring, clinical-extraction or adaptation) and today's date; sources lists URL, description and license of anything extracted or adapted; changelog starts at "1.0". A new skill is tier community with no reviews. Add a review only once it has happened, with reviewer, date and scope, and raise the tier only when the reviews meet SKILL_FORMAT.md's requirements for it.
  6. Register. In an M4 checkout, add the skill to the matching table in src/m4/skills/SKILLS_INDEX.md and run uv run pytest tests/test_skills_index.py tests/test_skills_catalog.py. Finish by showing the contributor both files and where they were written.

Read the full file on GitHub · 52 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. 1mo ago Changed · -190 lines · +17 tokens per session 71ff0eec227f
  2. 2mo ago Changed · +1 lines cfb53414bcb5
  3. 3mo ago First seen · 241 lines · 52 tokens per session scan A 3e5c5c9196fe

Subscribe to this mod's changes

create-m4-skill is a skill published in the GitHub repository hannesill/m4 (52 stars, last pushed 1mo ago), licensed MIT. It adds 69 tokens to every session and 879 once invoked, about $0.0003 per session on Opus 5.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-30.

Related

create-m4-skill compared with skills from other repositories

create-m4-skill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
create-m4-skillhannesill/m4Skill521mo agoMITA69Claude Code, Codex
reflection-coachpaperclipai/paperclipSkill118kyesterdayMITA38Claude Code, Codex
agents-autogptdavila7/claude-code-templatesSkill34kyesterdayMITA38Claude Code, Codex
paperclip-capsulespaperclipai/paperclipSkill118kyesterdayMITA41Claude Code, Codex
arbor-research-agentRUC-NLPIR/ArborSkill1.2k27d agoApache-2.0A74Claude Code, Codex
arbor-agent-executorRUC-NLPIR/ArborSkill1.2k27d agoApache-2.0A63Claude Code, Codex
arbor-agent-setup-intakeRUC-NLPIR/ArborSkill1.2k27d agoApache-2.0A65Claude Code, Codex