half-clone

A conversation-editing command that keeps the later half of the current chat and removes the earlier half.

In plain words
What is it for?
Use it when an ongoing conversation has become too long and the earlier discussion is no longer needed.
Why use it?
It reduces the amount of conversation context the agent must process while preserving recent work.

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/ykdojo/claude-code-tips/half-clone
Any agent
npx skills add ykdojo/claude-code-tips --skill half-clone
Clone the repo
git clone --depth 1 https://github.com/ykdojo/claude-code-tips

Made for: Claude Code, Codex.

Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 359 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00026 $0.00359
Opus 5 $0.00013 $0.00179
Sonnet 5 $0.00005 $0.00072
Haiku 4.5 $0.00003 $0.00036

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

Security

Grade B, and why

half-clone scanned grade B with 1 finding 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

1. Get the current session ID and project path: `tail -1 ~/.claude/history.jsonl | jq -r '[.sessionId, .project] | @tsv'`
skills/half-clone/SKILL.md · 22 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

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. 2d ago First seen · 22 lines · 26 tokens per session scan B dfed2360f59a

Subscribe to this mod's changes

half-clone is a skill published in the GitHub repository ykdojo/claude-code-tips (10,005 stars, last pushed 2d ago), with no licence file. It adds 26 tokens to every session and 359 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). 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

architecture-elevation

Validate the architectural ALTITUDE of a stated root cause or proposed fix before peer review or implementation. Interrogates the frame itself — whether the concern exists because of an abstraction that could be removed — before mapping enforcement sites within the concern. Tests whether a different boundary could…

stempeck/agentfactory · 113 tokens

architecture-docs

Generate or refresh /docs/architecture/ — the current-state source of architectural truth for this codebase, grounded in code and git history (NOT in .designs/). Produces an anchor-dense corpus (invariants.md, idioms.md, trust-boundaries.md, seams.md, subsystems/.md, history.md, gaps.md) plus a high-level overview…

stempeck/agentfactory · 164 tokens

github-issue

Creates well-documented GitHub issues (or comments on existing ones) from problems discussed in conversation. Investigates the codebase to map affected layers, files, and data flow, then writes up findings with acceptance criteria — without prescribing fixes. Use when a conversation has identified a problem that needs…

stempeck/agentfactory · 117 tokens

rootcause-review

Perform scientific peer review of a rootcauseanalysis.md document, validating all claims with independent verification. Appends review findings without modifying original content.

stempeck/agentfactory · 32 tokens

agentic-skill-eval

Evaluates a skill library to identify which SKILL.md files would produce valuable autonomous agents when converted via /formula-create. Use when assessing a repository of skills for agent creation candidates, prioritizing which skills to convert to formulas, or auditing an existing agent roster for gaps.

stempeck/agentfactory · 61 tokens

improve-agent

Improve an agent's formula TOML based on post-execution learnings. Use after a formula run required manual intervention, produced incorrect artifacts, or left cleanup work for the operator. Classifies the failure type, scans for sibling vulnerabilities, selects the appropriate fix pattern, and surgically inserts…

stempeck/agentfactory · 67 tokens