dynamic-skill-insertion-before-builtins

dynamic-skill-insertion-before-builtins is a skill for Claude Code, Codex from ychampion/cskill-agents. It costs 41 tokens per session (541 once invoked), scanned A, original, MIT.

A rule for adding commands discovered while a program is running to an existing command list. It removes duplicates and places new entries just before the built-in commands while keeping the built-in order unchanged.

In plain words
What is it for?
Use it when a command-line tool discovers commands at runtime. It helps merge those commands into the currently enabled list without rebuilding or reordering the built-in section.
Why use it?
It prevents repeated commands and keeps the command menu stable when plugins or other external sources add entries. Disabled or unavailable base commands do not incorrectly block replacements.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when a command-line tool discovers commands at runtime. It helps merge those commands into the currently enabled list without rebuilding or reordering the built-in section.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ychampion/cskill-agents/dynamic-skill-insertion-before-builtins
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 ychampion/cskill-agents --skill dynamic-skill-insertion-before-builtins
Clone the repo
git clone --depth 1 https://github.com/ychampion/cskill-agents

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 dynamic-skill-insertion-before-builtins

README.md
[![agentmods](https://agentmods.dev/badge/skills/ychampion/cskill-agents/dynamic-skill-insertion-before-builtins.svg)](https://agentmods.dev/skills/ychampion/cskill-agents/dynamic-skill-insertion-before-builtins)
Your own site
<a href="https://agentmods.dev/skills/ychampion/cskill-agents/dynamic-skill-insertion-before-builtins"><img src="https://agentmods.dev/badge/skills/ychampion/cskill-agents/dynamic-skill-insertion-before-builtins.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 541 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.
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.00041 $0.00541
Opus 5 $0.00020 $0.00270
Sonnet 5 $0.00008 $0.00108
Haiku 4.5 $0.00004 $0.00054

Measured 8d ago against content hash 3f61c2faeb27, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

dynamic-skill-insertion-before-builtins 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 8d 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.

agents/claude-code/skills/dynamic-skill-insertion-before-builtins/SKILL.md · 30 lines

How it starts

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

SKILL: Dynamic Skill Insertion Before Builtins

Domain: Command Architecture Trigger: Use when commands can be discovered at runtime and must be added to a prebuilt command list without duplicating enabled entries or scrambling the established built-in ordering. Source Pattern: Distilled from reviewed command-surface, skill-discovery, and CLI capability implementations.

Core Method

First compute the user-visible base command list, then treat that enabled surface as the dedupe authority for any newly discovered runtime commands. Filter dynamic entries by stable command name against that base set so you only add commands that are truly absent for the current session. Instead of re-sorting or rebuilding the whole registry, locate the first built-in command and splice the new dynamic entries immediately before it. This keeps plugin and external discoveries ahead of the built-in block while preserving the built-ins' internal order and keeping the command surface stable across refreshes.

Key Rules

  • Deduplicate against the already filtered base surface, not against every raw registered command, so disabled or unavailable commands do not wrongly block a dynamic replacement.
  • Use a stable identity key such as the command name when checking whether a dynamic entry is already present.
  • Keep a fast path that returns the base list unchanged when no dynamic commands exist or when all of them collapse during dedupe.
  • Derive the insertion anchor from the built-in command set, then splice once at that boundary instead of globally reordering the registry.
  • If no built-in boundary exists in the current list, append the dynamic entries so discovery still succeeds without special-case failures.

Example Application

If a CLI can discover new slash commands while scanning the working tree, first build the enabled command list the user can actually run, remove any discovered commands whose names already appear there, then insert the remaining discoveries just before the first built-in help or config command. The runtime additions stay visible near other extensible commands without shuffling the built-in command block on each scan.

Read the full file on GitHub · 30 lines

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. 8d ago First seen · 30 lines · 41 tokens per session scan A 3f61c2faeb27

Subscribe to this mod's changes

dynamic-skill-insertion-before-builtins is a skill published in the GitHub repository ychampion/cskill-agents (36 stars, last pushed 5mo ago), licensed MIT. It adds 41 tokens to every session and 541 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-30.

Related

Other skills, from other repositories