tweakcc: Skill for Claude Code

.claude/skills/patch-creation/SKILL.md

patch-creation is a skill for Claude Code from Piebald-AI/tweakcc. It costs 23 tokens per session (1,575 once invoked), scanned A, original, MIT.

A guide and workflow for creating code patches that customize Claude Code. A patch is a targeted change applied to existing program code.

In plain words
What is it for?
Use it to add a tweakcc customization, define the matching pattern and replacement, show the change, and register the patch.
Why use it?
It provides a repeatable way to find specific parts of Claude Code's bundled code and inject or replace behavior.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code.

This is Piebald-AI/tweakcc's own configuration. It tells Claude Code how to work on tweakcc itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tweakcc configures →

About the project

tweakcc is a command-line tool for customizing Claude Code, including its prompts, tools, appearance, and selected features. Claude Code users use it to tailor their coding-agent experience, and the catalogue contains instructions and a skill for applying these customizations.

Piebald-AI/tweakcc · 2,565 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to Piebald-AI/tweakcc. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Piebald-AI/tweakcc/main/.claude/skills/patch-creation/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Piebald-AI/tweakcc

Made for: Claude Code.

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 patch-creation

README.md
[![agentmods](https://agentmods.dev/badge/skills/piebald-ai/tweakcc/patch-creation/github.svg)](https://agentmods.dev/skills/piebald-ai/tweakcc/patch-creation)
Your own site
<a href="https://agentmods.dev/skills/piebald-ai/tweakcc/patch-creation"><img src="https://agentmods.dev/badge/skills/piebald-ai/tweakcc/patch-creation/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 patch-creation

Your own site · 80×15
<a href="https://agentmods.dev/skills/piebald-ai/tweakcc/patch-creation"><img src="https://agentmods.dev/badge/skills/piebald-ai/tweakcc/patch-creation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,575 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 medium

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 →

  • medium MCP Rug Pull · line 211
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
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.00023 $0.01575
Opus 5.5 $0.00009 $0.00630
Sonnet 5.5 $0.00005 $0.00315
Haiku 4.5 $0.00002 $0.00158

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

Security

Grade A, and why

patch-creation 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.

.claude/skills/patch-creation/SKILL.md · 214 lines

How it starts

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

Patch Creation & Registration

Overview

Patches are code modifications applied to Claude Code's cli.js (or native binary). Each patch finds specific patterns in the minified code and replaces/injects new behavior.

Creating a New Patch

1. Create the patch file

Create src/patches/myPatch.ts:

// Please see the note about writing patches in ./index

import { showDiff } from './index';

/**
 * Description of what this patch does.
 *
 * CC X.Y.Z:
 * ```diff
 *  // Show before/after of the code change
 * -oldCode
 * +newCode
 * ```
 */
export const writeMyPatch = (
  file: string,
  configValue: string // Add parameters as needed
): string | null => {
  // Pattern to find in minified code
  // IMPORTANT: Use [$\w]+ for identifiers (not \w+) because $ is valid in JS identifiers
  // IMPORTANT: Start patterns with a boundary char (,;}{) for HIGH performance (e.g. 1.5s -> 30ms)
  const pattern = /,somePattern([$\w]+)/;

  const match = file.match(pattern);

  if (!match || match.index === undefined) {
    console.error('patch: myPatch: failed to find pattern');
    return null;
  }

  const replacement = `,newCode${match[1]}`;

  const startIndex = match.index;
  const endIndex = startIndex + match[0].length;

  const newFile =
    file.slice(0, startIndex) + replacement + file.slice(endIndex);

  showDiff(file, newFile, replacement, startIndex, endIndex);

  return newFile;
};

2. Add config type (if patch is configurable)

Edit src/types.ts - add to MiscConfig or create a new interface:

export interface MiscConfig {
  // ... existing fields ...
  myNewSetting: string | null; // null = disabled
}

3. Add default value

Edit src/defaultSettings.ts:

misc: {
  // ... existing fields ...
  myNewSetting: null,  // or a sensible default
},

4. Register in index.ts

Edit src/patches/index.ts:

4a. Add import:

import { writeMyPatch } from './myPatch';

4b. Add patch definition (in PATCH_DEFINITIONS array):

Read the full file on GitHub · 214 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. 1mo ago First seen · 214 lines · 23 tokens per session scan A a5975379646c

Subscribe to this mod's changes

patch-creation is a skill published in the GitHub repository Piebald-AI/tweakcc (2,565 stars, last pushed yesterday), licensed MIT. It adds 23 tokens to every session and 1,575 once invoked, about $0.0001 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.